91嫩草国内在线,韩国理论电影免费看,6969精品视频在线观看,1024在线视频精品免费,色中色污,饭冈佳奈子在线
跳至內(nèi)容
Cobub文檔中心
用戶工具
登錄
站點(diǎn)工具
工具
顯示頁(yè)面
修訂記錄
反向鏈接
媒體管理器
網(wǎng)站地圖
登錄
媒體管理器
網(wǎng)站地圖
本頁(yè)面只讀。您可以查看源文件,但不能更改它。如果您覺得這是系統(tǒng)錯(cuò)誤,請(qǐng)聯(lián)系管理員。
====== Cobub Razor Android Developer Guide ====== - [[#Overview|Overview]] - [[#Basic Setup Guide|Basic Setup Guide]] - [[#Advanced Setup Guide|Advanced Setup Guide]] - [[#App Update|App Update]] - [[#Data Sending|Data Sending]] - [[#Online Configuration|Online Configuration]] ===== 1 Overview ===== ==== 1.1 Documentation Goal ==== The goal of this document is to explain usage rules of Cobub Razor Android SDK for facilitating developers. ==== 1.2 Application Scope ==== This document is for Android SDK developers, who use the Open Source Mobile Analytics – Cobub Razor. ==== 1.3 Terms and Abbreviations ==== Cobub Razor - [[en:razor:|The Open Source Mobile Analytics]] ===== 2 Basic Setup Guide ===== ==== 2.1 Register App,Obtain AppKey,Download Developer Documentation ==== First please setup the Web Server of Cobub Razor ([[en:razor:installation|instruction]]), then register App on web server and fill App info after login. Once App is created successfully, you could obtain AppKey. ==== 2.2 SDK Usage Step ==== === 2.2.1 Import com.wbkit1.0.jar === Open android_sdk in the directory you uploaded on the server. Import android_sdk to Eclipse and Eclipse will compile src and produce a bin folder. Zip the com folder in bin\classes as com.wbkit1.0.jar. Eclipse users right click own project root directory and select Properties —>Java Build Path —>libraries. Then click Add External JARs and select path of com.wbkit1.0.jar. Finally, click OK and then import is completed. === 2.2.2 Configure AndroidManifest.xml === * Add App **AppKey** (mandatory) Add AppKey obtained by App to meta-data of AndroidManifest.xml. (Note: String must be ‘UMS_APPKEY‘) * Add permission **android.permission.INTERNET** (mandatory) Send user analytic data to server. * Add permission **android.permission.READ_PHONE_STATE** (mandatory) Obtain relevant status info of phone. * Add permission **android.permission.ACCESS_FINE_LOCATION** (mandatory) Obtain current user’s location info. * Add permission **android.permission.ACCESS_WIFI_STATE** (mandatory) Visit Wi-Fi network status info. * Add permission **android.permission.GET_TASKS** (mandatory) Obtain recent running task info. * Add permission **android.permission.WRITE_EXTERNAL_STORAGE** (mandatory) Read and write file to sdcard. * Add permission **android.permission.READ_LOGS**(mandatory) Read program error log. * Add permission **android.permission.ACCESS_NETWORK_STATE**(mandatory) Visit GSM network info. The AndroidManifest.xml file as shown below: <code><manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.wbtech.test_sample" android:versionCode="1" android:versionName="1.0" > <uses-sdk android:minSdkVersion="8" android:targetSdkVersion="15" /> <uses-permission android:name="android.permission.INTERNET"/> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/> <uses-permission android:name="android.permission.READ_PHONE_STATE"/> <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/> <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/> <uses-permission android:name="android.permission.GET_TASKS"/> <uses-permission android:name="android.permission.READ_LOGS"/> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/> <application android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/AppTheme" > <activity android:name=".MainActivity" android:label="@string/title_activity_main" > <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> <meta-data android:name="UMS_APPKEY" android:value="bb08202a625c2b5cae5e2632f604352f "/> </application> </manifest></code> === 2.2.3 Add Code === * Add Reference import com.wbtech.ums.UmsAgent; * Set web server URL Call UmsAgent.setBaseURL(String url)in onCreate() method of App enter Activity, note that this method should be placed before all other methods. * Obtain UserID Call UmsAgent.bindUserIdentifier(String userID) method where you can obtain the unique identifier of user, and this method will record the userID on behalf of the user of using this application. * Bind Tags Call UmsAgent.postTags(final Context context, final String tags) method where you can obtain the attributes to tag the user. The tag values will be sent to server. * Register Activity Call UmsAgent.onResume(Context) in onResume method of every Activity. The passed parameter is the reference of current context. This method will read AppKey from AndroidManifest.xml automatically and record the time of user enters into this activity. Do not pass global application context.
en/razor/android-developer-guide.1426663680.txt.gz
· 最后更改: 2017/07/14 11:12 (外部編輯)
頁(yè)面工具
顯示頁(yè)面
修訂記錄
反向鏈接
回到頂部
? Copyright 2012 - 2015
南京西橋科技有限公司
Western Bridge Tech Co., Ltd.
蘇ICP備13039116號(hào)-1