|
|
@@ -82,6 +82,27 @@ 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));
|
|
|
+ initUmeng();
|
|
|
+ }
|
|
|
+ private void initUmeng() {
|
|
|
+ //2.在Application.oncreate()中调用预初始化函数
|
|
|
+ UMConfigure.preInit(this, "618dba65ba403559f31049e9","umeng");
|
|
|
+ UMConfigure.setLogEnabled(true);
|
|
|
+ //3.客户端用户同意隐私政策后,正式初始化友盟+SDK
|
|
|
+ UMConfigure.init(
|
|
|
+ this,
|
|
|
+ "618dba65ba403559f31049e9",
|
|
|
+ "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
|