Java Code Examples for com.umeng.analytics.MobclickAgent#setScenarioType()
The following examples show how to use
com.umeng.analytics.MobclickAgent#setScenarioType() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: App.java From Simpler with Apache License 2.0 | 6 votes |
@Override public void onCreate() { super.onCreate(); // 所有Activity生命周期回调 registerActivityLifecycleCallbacks(this); mInstance = this; // 实例化SharedPreferences prefs = getSharedPreferences(Constants.PREFS_NAME, MODE_PRIVATE); editor = prefs.edit(); userServices = new UserServices(this); settingsServices = new SettingsServices(this); // 检查工作目录 checkWorkDir(); // 检查存储卡 checkSdCard(); // 友盟场景类型设置接口 MobclickAgent.setScenarioType(this, MobclickAgent.EScenarioType.E_UM_NORMAL); // 初始化ApplicationToast AppToast.init(this); // FileDownloader全局初始化 FileDownloader.init(getApplicationContext()); }
Example 2
Source File: AppContext.java From SmallGdufe-Android with GNU General Public License v3.0 | 6 votes |
@Override public void onCreate() { super.onCreate(); ButterKnife.setDebug(BuildConfig.DEBUG); LogUtils.configAllowLog = BuildConfig.DEBUG; LitePal.initialize(this); //友盟 MobclickAgent.setScenarioType(this, MobclickAgent.EScenarioType.E_UM_NORMAL); //自动更新 UpdateConfig.getConfig() .init(this) // 数据更新接口数据,此时默认为使用GET请求 .url(AppConfig.BASE_URL+AppConfig.Url.updateURL) // 必填:用于从数据更新接口获取的数据response中。解析出Update实例。以便框架内部处理 .jsonParser(new UpdateParser() { @Override public Update parse(String response) { // 此处根据上面url接口返回的数据response进行update类组装。框架内部会使用此 // 组装的update实例判断是否需要更新以做进一步工作 Update update = new Gson().fromJson(response,Update.class); return update; } }); }
Example 3
Source File: MyApplication.java From Mp3Cutter with GNU General Public License v3.0 | 6 votes |
@Override public void onCreate() { super.onCreate(); instances = this; mAppComponent = DaggerAppComponent .builder() .appModule(new AppModule(this)) .build(); initDatabase(); // CoverLoader.getInstance().init(instances); //logger if(LogUtils.isApkDebugable(this)) { Logger.addLogAdapter(new AndroidLogAdapter()); } //umeng analytics MobclickAgent.setScenarioType(this, MobclickAgent.EScenarioType.E_UM_NORMAL); SkinCompatManager.withoutActivity(this) // 基础控件换肤初始化 .addInflater(new SkinMaterialViewInflater()) // material design 控件换肤初始化[可选] .setSkinStatusBarColorEnable(false) // 关闭状态栏换肤,默认打开[可选] .setSkinWindowBackgroundEnable(false) // 关闭windowBackground换肤,默认打开[可选] .loadSkin(); }
Example 4
Source File: UmengUtil.java From UmengUtil with Apache License 2.0 | 5 votes |
public static void init(Context context1,String sinaCallbackUrl,boolean degbug,SHARE_MEDIA... shareMediaList){ context = context1; // UMShareAPI.get(context1); Config.REDIRECT_URL = sinaCallbackUrl;//http://sns.whalecloud.com/sina2/callback shareMedias = shareMediaList; Config.isJumptoAppStore = true; Config.DEBUG = degbug; umShareAPI = UMShareAPI.get(context1); //对应平台没有安装的时候跳转转到应用商店下载,其中qq 微信会跳转到下载界面进行下载,其他应用会跳到应用商店进行下载 //友盟统计 MobclickAgent.setScenarioType(context, MobclickAgent.EScenarioType. E_UM_NORMAL); }
Example 5
Source File: App.java From WanAndroid with GNU General Public License v3.0 | 4 votes |
private void initUM() { UMConfigure.init(this, "5b856739b27b0a10be000064", null, UMConfigure.DEVICE_TYPE_PHONE, null); UMConfigure.setLogEnabled(BuildConfig.DEBUG); MobclickAgent.setScenarioType(this, MobclickAgent.EScenarioType.E_UM_NORMAL); }
Example 6
Source File: BaseApplication.java From NewFastFrame with Apache License 2.0 | 4 votes |
private void initUM() { String channel = WalleChannelReader.getChannel(this.getApplicationContext()); UMConfigure.init(this, Constant.UM_KEY, channel, UMConfigure.DEVICE_TYPE_PHONE, null); MobclickAgent.setScenarioType(this, MobclickAgent.EScenarioType.E_UM_GAME); MobclickAgent.openActivityDurationTrack(false); }
Example 7
Source File: Activity_Main.java From MortgageCalculator with Apache License 2.0 | 4 votes |
public void init(){ //有米广告:发布ID 应用密钥 测试模式 日志输出 AdManager.getInstance(this).init("d05e3439db391fcb", "aea2844b236a0eea", false, false); //获取要嵌入广告条的布局 LinearLayout bannerLayout = (LinearLayout)findViewById(R.id.ll_banner); //获取广告条 View bannerView = BannerManager.getInstance(Activity_Main.this).getBannerView(new net.youmi.android.normal.banner.BannerViewListener() { @Override public void onRequestSuccess() { System.out.println("请求广告成功"); } @Override public void onSwitchBanner() { System.out.println("切换广告条"); } @Override public void onRequestFailed() { System.out.println("请求广告失败"); } }); //将广告条加入到布局中 bannerLayout.addView(bannerView); //友盟统计服务 //MobclickAgent.setDebugMode(true); //集成测试模式 MobclickAgent.setScenarioType(Activity_Main.this, MobclickAgent.EScenarioType.E_UM_NORMAL); //场景 MobclickAgent.enableEncrypt(true); //加密发送数据 //开启友盟推送服务 PushAgent mPushAgent = PushAgent.getInstance(Activity_Main.this); mPushAgent.onAppStart(); //友盟统计服务获取集成测试设备ID //String deviceInfo = getDeviceInfo(Activity_Main.this); //System.out.println(deviceInfo); //友盟推送服务测试模式时需要获取的device_token /*mPushAgent.register(new IUmengRegisterCallback() { @Override public void onSuccess(String s) { Log.d("device_token是:", s); } @Override public void onFailure(String s, String s1) { System.out.println("注册失败"); } });*/ }
Example 8
Source File: Activity_Splash.java From MortgageCalculator with Apache License 2.0 | 4 votes |
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); //友盟统计服务 //MobclickAgent.setDebugMode(true); //集成测试模式 MobclickAgent.setScenarioType(Activity_Splash.this, MobclickAgent.EScenarioType.E_UM_NORMAL); //场景 MobclickAgent.enableEncrypt(true); //加密发送数据 //开启友盟推送服务 PushAgent mPushAgent = PushAgent.getInstance(Activity_Splash.this); mPushAgent.onAppStart(); //有米广告:发布ID 应用密钥 测试模式 日志输出 AdManager.getInstance(this).init("d05e3439db391fcb", "aea2844b236a0eea", false, true); // 设置全屏 getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); // 移除标题栏 requestWindowFeature(Window.FEATURE_NO_TITLE); //首次启动显示欢迎页面 setContentView(R.layout.activity_splash); System.out.println("启动"); //显示版本号 String version = ""; TextView versionTextView = (TextView)findViewById(R.id.Splash_Version_TextView); PackageManager packageManager = getPackageManager(); try { version = packageManager.getPackageInfo(getPackageName(), 0).versionName; } catch (PackageManager.NameNotFoundException e) { e.printStackTrace(); } versionTextView.setText("V" + version); //延时2秒跳转 new Handler().postDelayed(new Runnable(){ public void run() { Intent intent = new Intent(); intent.setClass(Activity_Splash.this, Activity_Splash_Ad.class); startActivity(intent); //overridePendingTransition(R.anim.anim_splash_fade_in, R.anim.anim_splash_fade_out); finish(); } }, 2000); }
Example 9
Source File: AppContext.java From UCDLive_Android with MIT License | 4 votes |
@Override public void onCreate() { super.onCreate(); UStreamingContext.init(getApplicationContext(), "publish3-key"); MobclickAgent.setScenarioType(getApplicationContext(), MobclickAgent.EScenarioType.E_UM_NORMAL); }
Example 10
Source File: AppContext.java From UCDMediaPlayer_Android with MIT License | 4 votes |
@Override public void onCreate() { super.onCreate(); MobclickAgent.setScenarioType(getApplicationContext(), MobclickAgent.EScenarioType.E_UM_NORMAL); }