當前位置: 首頁>>代碼示例>>Java>>正文


Java MobclickAgent類代碼示例

本文整理匯總了Java中com.umeng.analytics.MobclickAgent的典型用法代碼示例。如果您正苦於以下問題:Java MobclickAgent類的具體用法?Java MobclickAgent怎麽用?Java MobclickAgent使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


MobclickAgent類屬於com.umeng.analytics包,在下文中一共展示了MobclickAgent類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: sendPraise

import com.umeng.analytics.MobclickAgent; //導入依賴的package包/類
public void sendPraise(boolean isDelete) {
    if (isDelete) {
        StatusApi.deleteFeedbacks(this.mContext, this.post_id, new JsonCallback((Activity)
                this.mContext) {
        });
    } else {
        StatusApi.putFeedbacks(this.mContext, this.post_id, new JsonCallback((Activity) this
                .mContext) {
            public void ok(JSONObject object) {
                super.ok(object);
                if (!TextUtils.isEmpty(object.optString("body"))) {
                    Helper.showToast(PraiseButton.this.getContext(), object.optString("body"));
                }
                MobclickAgent.onEvent(PraiseButton.this.mContext, Event.STATUS_ADD_ATTITUTE_OK);
                MobclickAgent.onEvent(PraiseButton.this.mContext, Event.STATUS_ADD_INTERACT_OK);
                MobclickAgent.onEvent(PraiseButton.this.mContext, Event.MINE_ALL_RECORD_OK);
            }
        });
    }
}
 
開發者ID:JackChan1999,項目名稱:boohee_v5.6,代碼行數:21,代碼來源:PraiseButton.java

示例2: onCreate

import com.umeng.analytics.MobclickAgent; //導入依賴的package包/類
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setSwipeBackEnable(false);
    initBundle(getIntent().getExtras());
    if (getLayoutId() != 0) {
        setContentView(getLayoutId());
    }
    initToolBar();
    initView();
    initData();
    //umeng analytics
    if (BuildConfig.DEBUG) {
        MobclickAgent.setDebugMode(true);
    }
    MobclickAgent.openActivityDurationTrack(false);
    MobclickAgent.setScenarioType(this, MobclickAgent.EScenarioType.E_UM_NORMAL);
}
 
開發者ID:coding-dream,項目名稱:TPlayer,代碼行數:19,代碼來源:BaseActivity.java

示例3: sendClickCount

import com.umeng.analytics.MobclickAgent; //導入依賴的package包/類
private void sendClickCount(int id) {
    switch (id) {
        case 1:
            MobclickAgent.onEvent(getActivity(), Event.status_friendTimeline);
            return;
        case 2:
            MobclickAgent.onEvent(getActivity(), Event.status_hotTimeline);
            return;
        case 3:
            MobclickAgent.onEvent(getActivity(), Event.status_todayContent);
            return;
        case 4:
            MobclickAgent.onEvent(getActivity(), Event.status_betHome);
            return;
        default:
            return;
    }
}
 
開發者ID:JackChan1999,項目名稱:boohee_v5.6,代碼行數:19,代碼來源:NewPartnerFragment.java

示例4: initView

import com.umeng.analytics.MobclickAgent; //導入依賴的package包/類
private void initView() {
    this.tvBind.setOnClickListener(new OnClickListener() {
        public void onClick(View v) {
            MobclickAgent.onEvent(ScaleIntroActivity.this, Event.bingo_clickBindingScalse);
            ScaleBindActivity.startActivity(ScaleIntroActivity.this);
        }
    });
    this.webView.getSettings().setJavaScriptEnabled(true);
    this.webView.getSettings().setLayoutAlgorithm(LayoutAlgorithm.NORMAL);
    this.webView.getSettings().setPluginState(PluginState.ON);
    this.webView.getSettings().setUserAgentString(this.webView.getSettings()
            .getUserAgentString() + " App/boohee");
    this.webView.getSettings().setDomStorageEnabled(true);
    this.webView.setWebViewClient(createWebViewClient());
    this.webView.loadUrl(UrlUtils.handleUrl(URL));
}
 
開發者ID:JackChan1999,項目名稱:boohee_v5.6,代碼行數:17,代碼來源:ScaleIntroActivity.java

示例5: onLoadPatchListenerReceiveFail

import com.umeng.analytics.MobclickAgent; //導入依賴的package包/類
public void onLoadPatchListenerReceiveFail(final File patchFile, int errorCode, boolean
        isUpgrade) {
    super.onLoadPatchListenerReceiveFail(patchFile, errorCode, isUpgrade);
    switch (errorCode) {
        case -6:
            MobclickAgent.onEvent(MyApplication.getContext(), Event.tinker_error_no_space);
            break;
        case -3:
            if (isUpgrade) {
                this.handler.postDelayed(new Runnable() {
                    public void run() {
                        TinkerInstaller.onReceiveUpgradePatch(SampleLoadReporter.this
                                .context, patchFile.getAbsolutePath());
                    }
                }, 60000);
                break;
            }
            break;
        case -2:
            MobclickAgent.onEvent(MyApplication.getContext(), Event.tinker_error_patch_noexits);
            break;
    }
    SampleTinkerReport.onTryApplyFail(errorCode);
}
 
開發者ID:JackChan1999,項目名稱:boohee_v5.6,代碼行數:25,代碼來源:SampleLoadReporter.java

示例6: onCreate

import com.umeng.analytics.MobclickAgent; //導入依賴的package包/類
@Override
protected void onCreate(Bundle savedInstanceState) {
	super.onCreate(savedInstanceState);
	//PushAgent.getInstance(this).onAppStart();
	MobclickAgent.openActivityDurationTrack(false);

	getWindow().setSoftInputMode(
			WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN
	);
	mBaseActivity.init(getBaseContext(), this);
	onActivityInit();
	LogUtil.d(TAG, "checktask onCreate:" + super.getClass().getSimpleName()
			+ "#0x" + super.hashCode() + ", taskid:" + getTaskId()
			+ ", task:" + new ActivityTaskUtils(this));
	abstracrRegist();
	getTopBarView().showSearch(hasSearch());

}
 
開發者ID:NewCasino,項目名稱:browser,代碼行數:19,代碼來源:AppBaseActivity.java

示例7: quit

import com.umeng.analytics.MobclickAgent; //導入依賴的package包/類
public void quit() {
	MobclickAgent.onKillProcess(this);
	MyApp myApp = ((MyApp)getApplication());
	L.i("isAntiTheftServiceStarted:" + myApp.isAntiTheftServiceStarted);
	L.i("isBgdService2Started:" + myApp.isBgdService2Started);
	if (myApp.isAntiTheftServiceStarted || myApp.isBgdService2Started){
		MainActivity.this.finish();
	}else{
		Intent startMain = new Intent(Intent.ACTION_MAIN);
		startMain.addCategory(Intent.CATEGORY_HOME);
		startMain.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); 
		startActivity(startMain);
		System.exit(0);
	}
	//確認是否在退出後取消接收聊天信息
	SettingSPUtil setSP = MyApp.getInstance().getSettingSPUtil();
	if (!setSP.isChatReceiveMsgAlways()){
		PushManager.stopWork(getApplicationContext());
	}
}
 
開發者ID:SShineTeam,項目名稱:Huochexing12306,代碼行數:21,代碼來源:MainActivity.java

示例8: createActivity

import com.umeng.analytics.MobclickAgent; //導入依賴的package包/類
private void createActivity() {
    if (this.mRecordSport != null) {
        RecordSport record = new SportRecordDao(getActivity()).add(this.mRecordSport);
        dismissAllowingStateLoss();
        if (record != null) {
            EventBus.getDefault().post(new SportEvent().setRecordSport(record).setEditType(1));
        }
        if (this.mRecordSport != null) {
            EventBus.getDefault().post(new AddFinishAnimEvent().setThumb_image_name(this
                    .mRecordSport.thumb_img_url));
        }
        MobclickAgent.onEvent(getActivity(), Event.tool_addSportRecordOK);
        MobclickAgent.onEvent(getActivity(), Event.tool_recordOK);
        if (this.changeListener != null) {
            this.changeListener.onFinish();
        }
    }
}
 
開發者ID:JackChan1999,項目名稱:boohee_v5.6,代碼行數:19,代碼來源:AddSportFragment.java

示例9: recordMc

import com.umeng.analytics.MobclickAgent; //導入依賴的package包/類
private void recordMc(String action, Date day) {
    if (day != null) {
        JsonParams params = new JsonParams();
        params.put("record_on", DateHelper.format(day));
        if (McLatest.ACTION_START.equals(action)) {
            params.put("mc_status", "1");
        } else if (McLatest.ACTION_END.equals(action)) {
            params.put("mc_status", "2");
        }
        RecordApi.postMcRecords(this.activity, params, new JsonCallback(this.activity) {
            public void ok(JSONObject object) {
                super.ok(object);
                if (!PeriodCalendarActivity.this.isFinishing()) {
                    PeriodCalendarActivity.this.requestRecords();
                    PeriodCalendarActivity.this.setResult(-1);
                    EventBus.getDefault().post(new PeriodEvent());
                    MobclickAgent.onEvent(PeriodCalendarActivity.this.ctx, Event
                            .tool_updateMcRecordOK);
                    MobclickAgent.onEvent(PeriodCalendarActivity.this.ctx, Event.tool_recordOK);
                }
            }
        });
    }
}
 
開發者ID:JackChan1999,項目名稱:boohee_v5.6,代碼行數:25,代碼來源:PeriodCalendarActivity.java

示例10: onClick

import com.umeng.analytics.MobclickAgent; //導入依賴的package包/類
@OnClick({2131427869, 2131427870, 2131427871, 2131427876, 2131427862})
public void onClick(View view) {
    switch (view.getId()) {
        case R.id.view_load_more:
            sendSearchRequest(false);
            return;
        case R.id.view_search_topic:
            SearcherOtherActivity.comeOnBaby(this.ctx, Type.topic);
            MobclickAgent.onEvent(this.ctx, Event.other_clickSearchTopic);
            return;
        case R.id.view_search_article:
            MobclickAgent.onEvent(this.ctx, Event.other_clickSearchContent);
            SearcherOtherActivity.comeOnBaby(this.ctx, Type.article);
            return;
        case R.id.view_search_user:
            MobclickAgent.onEvent(this.ctx, Event.ohter_clickSearchUser);
            SearchFriendsActivity.comeOnBaby(this.ctx);
            return;
        case R.id.tv_search_alert:
            sendSearchRequest(false);
            return;
        default:
            return;
    }
}
 
開發者ID:JackChan1999,項目名稱:boohee_v5.6,代碼行數:26,代碼來源:SearcherActivity.java

示例11: onEvent

import com.umeng.analytics.MobclickAgent; //導入依賴的package包/類
public static void onEvent(Context arg0, String arg1, String arg2)
{
	if (!DEBUG)
	{
		MobclickAgent.onEvent(arg0, arg1, arg2);
	}
}
 
開發者ID:benniaobuguai,項目名稱:android-project-gallery,代碼行數:8,代碼來源:MobclickAgentProxy.java

示例12: onResume

import com.umeng.analytics.MobclickAgent; //導入依賴的package包/類
@Override
protected void onResume() {
	super.onResume();
	//未讀消息數清零
	MyApp.getInstance().setNewMsgCount(0);
	MobclickAgent.onResume(this);
}
 
開發者ID:SShineTeam,項目名稱:Huochexing12306,代碼行數:8,代碼來源:ChatRoomAty.java

示例13: onCreate

import com.umeng.analytics.MobclickAgent; //導入依賴的package包/類
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.a4);
    MobclickAgent.onEvent(this, Event.STATUS_VIEW_MESSAGE_CATE);
    setTitle(R.string.su);
    findViews();
    initData();
}
 
開發者ID:JackChan1999,項目名稱:boohee_v5.6,代碼行數:9,代碼來源:MsgCategoryActivity.java

示例14: onCreate

import com.umeng.analytics.MobclickAgent; //導入依賴的package包/類
public void onCreate(Bundle outState) {
    super.onCreate(outState);
    setContentView(R.layout.kj);
    MobclickAgent.onEvent(this, Event.STATUS_VIEW_MESSAGE_LST);
    setTitle(getStringExtra(EXTRA_TITLE));
    this.mUserId = getIntent().getIntExtra("user_id", 0);
    this.isRead = getIntent().getBooleanExtra("isRead", true);
    this.mType = getStringExtra("type");
    init();
    PullToRefreshHelper.loadFirst(this);
}
 
開發者ID:JackChan1999,項目名稱:boohee_v5.6,代碼行數:12,代碼來源:NotificationActivity.java

示例15: onResume

import com.umeng.analytics.MobclickAgent; //導入依賴的package包/類
@Override
protected void onResume() {
    super.onResume();
    if (isCountingPage()) {
        countingPageStart();
    }
    MobclickAgent.onResume(this);
}
 
開發者ID:z-chu,項目名稱:FriendBook,代碼行數:9,代碼來源:BaseSuperActivity.java


注:本文中的com.umeng.analytics.MobclickAgent類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。