|
@@ -13,6 +13,8 @@ import com.uas.pda_smart_com.R;
|
|
|
import com.uas.pda_smart_com.util.AndroidUtil;
|
|
|
import com.uas.pda_smart_com.util.FakeX509TrustManager;
|
|
|
import com.uas.pda_smart_com.util.SoundUtil;
|
|
|
+import com.umeng.analytics.MobclickAgent;
|
|
|
+import com.umeng.commonsdk.UMConfigure;
|
|
|
|
|
|
import java.io.ByteArrayInputStream;
|
|
|
import java.io.IOException;
|
|
@@ -82,6 +84,31 @@ public class PdaApplication extends Application {
|
|
|
mSoundMap.put(SoundUtil.SOUND_SALACIA, mSoundPool.load(this, R.raw.salacia, 1));
|
|
|
mSoundMap.put(SoundUtil.SOUND_TETHYS, mSoundPool.load(this, R.raw.tethys, 1));
|
|
|
mSoundMap.put(SoundUtil.SOUND_TITAN, mSoundPool.load(this, R.raw.titan, 1));
|
|
|
+ //友盟统计SDK
|
|
|
+ initUmeng();
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ private void initUmeng() {
|
|
|
+ //2.在Application.oncreate()中调用预初始化函数
|
|
|
+ UMConfigure.preInit(this, "6170b8b61c91e0671bb0da5a","umeng");
|
|
|
+ UMConfigure.setLogEnabled(true);
|
|
|
+ //3.客户端用户同意隐私政策后,正式初始化友盟+SDK
|
|
|
+ UMConfigure.init(
|
|
|
+ this,
|
|
|
+ "6170b8b61c91e0671bb0da5a",
|
|
|
+ "umeng",
|
|
|
+ UMConfigure.DEVICE_TYPE_PHONE, ""
|
|
|
+ );
|
|
|
+ // 页面数据采集模式
|
|
|
+ // setPageCollectionMode接口参数说明:
|
|
|
+ // 1. MobclickAgent.PageMode.AUTO: 建议大多数用户使用本采集模式,SDK在此模式下自动采集Activity
|
|
|
+ // 页面访问路径,开发者不需要针对每一个Activity在onResume/onPause函数中进行手动埋点。在此模式下,
|
|
|
+ // 开发者如需针对Fragment、CustomView等自定义页面进行页面统计,直接调用MobclickAgent.onPageStart/
|
|
|
+ // MobclickAgent.onPageEnd手动埋点即可。此采集模式简化埋点工作,唯一缺点是在Android 4.0以下设备中
|
|
|
+ // 统计不到Activity页面数据和各类基础指标(提示:目前Android 4.0以下设备市场占比已经极小)。
|
|
|
+ MobclickAgent.setPageCollectionMode(MobclickAgent.PageMode.AUTO);
|
|
|
+
|
|
|
}
|
|
|
|
|
|
@Override
|