com.umeng.analytics.MobclickAgent Java Examples
The following examples show how to use
com.umeng.analytics.MobclickAgent.
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: AppOperateActivity.java From AppPlus with MIT License | 6 votes |
@Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()){ case R.id.menu_favorite: String point = mAppEntity.isFavorite()? "取消收藏"+mAppEntity.getAppName() : "收藏"+mAppEntity.getAppName()+"成功"; mAppEntity.setFavorite(!mAppEntity.isFavorite()); Toast.makeText(this,point, Toast.LENGTH_SHORT).show(); App.sDb.update(mAppEntity); updateFavoriteIcon(mAppEntity); Bundle data = new Bundle(); data.putParcelable("entity",mAppEntity); RxBus.getInstance().send(new RxEvent(EEvent.UPDATE_ENTITY_FAVORITE_STATUS,data)); MobclickAgent.onEvent(this, "favoriteInDetail"); break; } return super.onOptionsItemSelected(item); }
Example #2
Source File: LetvBaseActivity.java From letv with Apache License 2.0 | 6 votes |
protected void onResume() { super.onResume(); BaseApplication.getInstance().startShake(getActivityName()); if (this.mRedPacketEntry != null) { this.mRedPacketEntry.onResume(); } if (mHomeKeyEventReceiver != null) { mHomeKeyEventReceiver.setIsHomeClicked(false); } try { if (LetvUtils.isAppOnForeground(this.mContext) && !isLoginStatatistics) { isLoginStatatistics = true; statisticsFirstLaunch(); } IRMonitor.getInstance().onResume(this); if (LetvConfig.isUmeng()) { AnalyticsConfig.setChannel(LetvConfig.getUmengID()); MobclickAgent.onResume(this); } } catch (Exception e) { LogInfo.LogStatistics("main activity on resume exception:" + e.getMessage()); } catch (OutOfMemoryError e2) { BaseApplication.getInstance().onAppMemoryLow(); } }
Example #3
Source File: UrlConfigActivity.java From freeiot-android with MIT License | 6 votes |
@Override public void onBackPressed() { if (UserState.getInstances(this).isLogin()) { if (lastUrlState != UrlConfigManager.getCurrentState()) { UserState.getInstances(this).logout(this); setResult(RESULT_OK); Intent mStartActivity = new Intent(this, SplashActivity.class); int mPendingIntentId = 123456; PendingIntent mPendingIntent = PendingIntent.getActivity(this, mPendingIntentId, mStartActivity, PendingIntent.FLAG_CANCEL_CURRENT); AlarmManager mgr = (AlarmManager)getSystemService(Context.ALARM_SERVICE); mgr.set(AlarmManager.RTC, System.currentTimeMillis() + 200, mPendingIntent); MobclickAgent.onKillProcess(this); android.os.Process.killProcess(android.os.Process.myPid()); return; } } ActivityUtils.animFinish(this, R.anim.slide_in_from_left, R.anim.slide_out_to_right); }
Example #4
Source File: MaterializeApplication.java From materialize with GNU General Public License v3.0 | 6 votes |
@Override public void onCreate() { super.onCreate(); MobclickAgent.setCatchUncaughtExceptions(false); if (BuildConfig.FIR_ENABLED) { FIR.init(this); } MaterializeSharedState.init(this); MobclickAgent.setDebugMode(BuildConfig.DEBUG); HashMap<String, String> event = new HashMap<>(); event.put("launcher", MaterializeSharedState.getInstance().getLauncher()); MobclickAgent.onEvent(this, "launcher", event); }
Example #5
Source File: CrashHandler.java From QiQuYing with Apache License 2.0 | 6 votes |
/** * 自定义错误处理,收集错误信息 发送错误报告等操作均在此完成. * * @param ex * @return true:如果处理了该异常信息;否则返回false. */ private boolean handleException(final Throwable ex) { if (ex == null) { return false; } /*new Thread() { @Override public void run() { Looper.prepare(); showDialog(mContext); Looper.loop(); } }.start();*/ MobclickAgent.onKillProcess(mContext); //收集设备参数信息 collectDeviceInfo(mContext); //保存日志文件 saveCrashInfo2File(ex); return true; }
Example #6
Source File: CountEventHelper.java From FriendBook with GNU General Public License v3.0 | 5 votes |
/** * 统计书籍阅读 */ public static void countBookRead(Context context, String bookId, String bookName) { HashMap<String, String> map = new HashMap<>(); map.put("bookId", bookId); map.put("bookName", bookName); MobclickAgent.onEvent(context, "book_read", map); }
Example #7
Source File: Activity_Result.java From MortgageCalculator with Apache License 2.0 | 5 votes |
@Override protected void onResume() { super.onResume(); //友盟数据统计 MobclickAgent.onResume(this); // 视频广告 VideoAdManager.getInstance(this).onResume(); }
Example #8
Source File: SplashActivity.java From YiBo with Apache License 2.0 | 5 votes |
@Override protected void onCreate(Bundle savedInstanceState) { Handler handler = new Handler(); handler.postDelayed(new Runnable() { @Override public void run() { SheJiaoMaoApplication.changeLocale(SplashActivity.this); SheJiaoMaoApplication.initLocalization(SplashActivity.this); } }, 2000); super.onCreate(savedInstanceState); MobclickAgent.onError(this); MobclickAgent.updateOnlineConfig(this); if (Logger.isDebug()) { Log.v(TAG, "onCreate……"); } //意外退出时,重启,清除通知; NotificationManager notiManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); notiManager.cancelAll(); Intent startIntent = new Intent(this, HomePageActivity.class); startIntent.putExtra("START", true); startActivityForResult(startIntent, Constants.REQUEST_CODE_SPLASH); }
Example #9
Source File: QuShiDetailActivity.java From QiQuYing with Apache License 2.0 | 5 votes |
private void initYouMeng() { AnalyticsConfig.enableEncrypt(true); MobclickAgent.openActivityDurationTrack(false); PushAgent mPushAgent = PushAgent.getInstance(this); mPushAgent.onAppStart(); if(spUtil.getBoolean(Constants.IS_RECEIVE_PUSH, true)) { mPushAgent.enable(); } else { mPushAgent.disable(); } }
Example #10
Source File: RLAnalyticsHelper.java From Roid-Library with Apache License 2.0 | 5 votes |
/** * @param context * @param isDebug */ public static void init(Context context, boolean isDebug) { com.umeng.common.Log.LOG = isDebug; MobclickAgent.setDebugMode(isDebug); MobclickAgent.setAutoLocation(true); MobclickAgent.setSessionContinueMillis(1000); // MobclickAgent.setUpdateOnlyWifi(false); // MobclickAgent.setDefaultReportPolicy(context, // ReportPolicy.BATCH_BY_INTERVAL, 5*1000); MobclickAgent.updateOnlineConfig(context); MobclickAgent.onError(context); }
Example #11
Source File: AppFileListFragment.java From AppPlus with MIT License | 5 votes |
@Override public void onClickMenuItem(int itemId, AppEntity entity) { switch (itemId) { case R.id.pop_file_delete: ActionUtil.deleteApkFile(getActivity(), entity); MobclickAgent.onEvent(getActivity(), "pop_file_delete"); break; case R.id.pop_file_install: ActionUtil.installApp(getActivity(), entity); MobclickAgent.onEvent(getActivity(), "pop_file_install"); break; } }
Example #12
Source File: BaseActivity.java From nono-android with GNU General Public License v3.0 | 5 votes |
@Override protected void onResume() { super.onResume(); MobclickAgent.onPageStart(clazz); MobclickAgent.onResume(this); themePatch(); }
Example #13
Source File: MobclickAgentProxy.java From android-project-wo2b with Apache License 2.0 | 5 votes |
public static void openActivityDurationTrack(boolean arg0) { if (!DEBUG) { MobclickAgent.openActivityDurationTrack(arg0); } }
Example #14
Source File: PlayActivity.java From AnimeTaste with MIT License | 5 votes |
@Override protected void onResume() { super.onResume(); if (mLastPos != 0) { startPlayAnimation(mLastPos, mAnimation); } MobclickAgent.onResume(mContext); }
Example #15
Source File: BaseActivity.java From MarkdownEditors with Apache License 2.0 | 5 votes |
@Override protected void onResume() { super.onResume(); //友盟统计 MobclickAgent.onPageStart(this.getClass().getSimpleName()); MobclickAgent.onResume(getApplicationContext()); }
Example #16
Source File: MemoActivity.java From EverMemo with MIT License | 5 votes |
@Override protected void onCreate(Bundle savedInstanceState) { mContext = this; overridePendingTransition(R.anim.push_up, R.anim.push_down); super.onCreate(savedInstanceState); getSupportActionBar().setDisplayShowTitleEnabled(true); getSupportActionBar().setDisplayHomeAsUpEnabled(true); getSupportActionBar().setDisplayUseLogoEnabled(false); getSupportActionBar().setDisplayShowHomeEnabled(false); getSupportActionBar().setTitle(getString(R.string.app_memo)); setContentView(R.layout.activity_memo); mContentEditText = (EditText) findViewById(R.id.content); Bundle bundle = getIntent().getExtras(); if (bundle != null && bundle.getSerializable("memo") != null) { memo = (Memo) bundle.getSerializable("memo"); mCreateNew = false; mLastSaveContent = memo.getContent(); } else { memo = new Memo(); mCreateNew = true; } mContentEditText.setText(Html.fromHtml(memo.getContent())); if (mCreateNew) { getWindow().setSoftInputMode( WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE); mContentEditText.requestFocus(); MobclickAgent.onEvent(mContext, "new_memo"); } else { MobclickAgent.onEvent(mContext, "edit_memo"); } mContentEditText.setOnKeyListener(this); mEvernote = new Evernote(mContext); findViewById(R.id.edit_container).setOnClickListener(this); }
Example #17
Source File: MobclickAgentProxy.java From android-project-wo2b with Apache License 2.0 | 5 votes |
public static void flush(Context arg0) { if (!DEBUG) { MobclickAgent.flush(arg0); } }
Example #18
Source File: ApiRequest.java From ChipHellClient with Apache License 2.0 | 5 votes |
protected void onCache(T result) { if (mCallback != null) { //线上状态catch异常 if (!BuildConfig.DEBUG) { try { mCallback.onCache(result); } catch (Exception e) { MobclickAgent.reportError(ChhApplication.getInstance(), e); } } else { mCallback.onCache(result); } } }
Example #19
Source File: SharePopWindow.java From QiQuYing with Apache License 2.0 | 5 votes |
/** * 收藏 */ private void collect() { if(mJoke == null) { return; } String jokeContent = FastjsonUtil.serialize(mJoke); collectDAO.collect(userId, mJoke.getId(), jokeContent); ImgToastUtils.showMessage(context, "收藏成功", R.drawable.ic_toast_fav); MobclickAgent.onEvent(context, "collect"); }
Example #20
Source File: HomePageActivity.java From YiBo with Apache License 2.0 | 5 votes |
@Override protected void onResume() { super.onResume(); MobclickAgent.onResume(this); if (Logger.isDebug()) { Log.v(TAG, "onResume……" + ", Skeleton is " + skeleton); } }
Example #21
Source File: MainActivity.java From earth with GNU General Public License v3.0 | 5 votes |
private void sendOnSet(Settings settings) { HashMap<String, String> event = new HashMap<>(); event.put("interval", String.valueOf(TimeUnit.MILLISECONDS.toMinutes(settings.interval))); event.put("resolution", String.valueOf(settings.resolution)); event.put("wifi_only", String.valueOf(settings.wifiOnly)); MobclickAgent.onEvent(this, "set", event); }
Example #22
Source File: ResetPwdAty.java From Huochexing12306 with Apache License 2.0 | 4 votes |
public void onResume() { super.onResume(); MobclickAgent.onResume(this); }
Example #23
Source File: SubRecommendedFragment.java From wallpaper with GNU General Public License v2.0 | 4 votes |
public void onPause() { super.onPause(); MobclickAgent.onPageEnd("SubRecommendedFragment"); }
Example #24
Source File: MomentApplication.java From Moment with GNU General Public License v3.0 | 4 votes |
@Override public void onCreate() { super.onCreate(); MobclickAgent.setDebugMode(BuildConfig.DEBUG); }
Example #25
Source File: WrapperActivity.java From misound with Apache License 2.0 | 4 votes |
@Override protected void onPause() { super.onPause(); MobclickAgent.onResume(this); }
Example #26
Source File: RegisterActivity.java From Huochexing12306 with Apache License 2.0 | 4 votes |
public void onResume() { super.onResume(); MobclickAgent.onResume(this); }
Example #27
Source File: FreightTrackBaiduMapFragment.java From ESeal with Apache License 2.0 | 4 votes |
@Override public void onResume() { super.onResume(); bmapView.onResume(); MobclickAgent.onPageStart(TAG); }
Example #28
Source File: LoginActivity.java From freeiot-android with MIT License | 4 votes |
@Override protected void onPause() { super.onPause(); MobclickAgent.onPageEnd(AnalyticsUtils.AnalyticsViewKeys.VIEW_LOGIN_ACTIVITY); MobclickAgent.onPause(this); }
Example #29
Source File: Evernote.java From EverMemo with MIT License | 4 votes |
public void auth() { mEvernoteSession.authenticate(mContext); MobclickAgent.onEvent(mContext, "Bind_EverNote"); }
Example #30
Source File: EmailRegisterActivity.java From freeiot-android with MIT License | 4 votes |
@Override protected void onPause() { super.onPause(); MobclickAgent.onPageEnd(AnalyticsUtils.AnalyticsViewKeys.VIEW_EMAIL_REGISTER_ACTIVITY); MobclickAgent.onPause(this); }