本文整理匯總了Java中com.umeng.update.UmengUpdateAgent.setUpdateOnlyWifi方法的典型用法代碼示例。如果您正苦於以下問題:Java UmengUpdateAgent.setUpdateOnlyWifi方法的具體用法?Java UmengUpdateAgent.setUpdateOnlyWifi怎麽用?Java UmengUpdateAgent.setUpdateOnlyWifi使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.umeng.update.UmengUpdateAgent
的用法示例。
在下文中一共展示了UmengUpdateAgent.setUpdateOnlyWifi方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: onCreate
import com.umeng.update.UmengUpdateAgent; //導入方法依賴的package包/類
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
getListView().setOnRefreshListener(this);
getListView().setOnItemClickListener(mOnItemClickListener);
mImgState.setOnClickListener(mOnImgStateClick);
mBtnFavorite.setOnClickListener(mOnBtnFavoriteClick);
mBtnSetting.setOnClickListener(mOnBtnSettingClick);
//加載數據,先讀緩存
//App.showLoadingOrNoNet(true, true, false, mImgState);
boolean loaded = loadFromCache(1);
//強製刷新發布數量數據
if (loaded ? Network.isNetConnected(this) : App.checkNetStateAndFeedbackUser()) loadData(true, 1);
// 友盟的在線自動更新
UmengUpdateAgent.setUpdateOnlyWifi(false);
UmengUpdateAgent.update(this);
}
示例2: checkNewVersionAvailable
import com.umeng.update.UmengUpdateAgent; //導入方法依賴的package包/類
public static void checkNewVersionAvailable(Context context, final OnUpdateCheckComplete onUpdateCheckComplete){
UmengUpdateAgent.setUpdateOnlyWifi(false);
UmengUpdateAgent.setUpdateListener(new UmengUpdateListener() {
@Override
public void onUpdateReturned(int updateStatus,UpdateResponse updateInfo) {
switch (updateStatus) {
case UpdateStatus.Yes: // has update
// UmengUpdateAgent.showUpdateDialog(MainListActivity.this, updateInfo);
// App.setIfNeedUpdate(true);
onUpdateCheckComplete.hasNewVersion(updateInfo);
break;
case UpdateStatus.No: // has no update
onUpdateCheckComplete.hasNoNewVersion();
break;
case UpdateStatus.NoneWifi: // none wifi
onUpdateCheckComplete.hasNoNewVersion();
break;
case UpdateStatus.Timeout: // time out
onUpdateCheckComplete.hasNoNewVersion();
break;
}
}
});
UmengUpdateAgent.update(context);
}
示例3: checkNewVersionAvailableAndNotify
import com.umeng.update.UmengUpdateAgent; //導入方法依賴的package包/類
public static void checkNewVersionAvailableAndNotify(final Context context){
UmengUpdateAgent.setUpdateOnlyWifi(false);
UmengUpdateAgent.setUpdateListener(new UmengUpdateListener() {
@Override
public void onUpdateReturned(int updateStatus,UpdateResponse updateInfo) {
switch (updateStatus) {
case UpdateStatus.Yes: // has update
UmengUpdateAgent.showUpdateDialog(context, updateInfo);
break;
case UpdateStatus.No: // has no update
break;
case UpdateStatus.NoneWifi: // none wifi
break;
case UpdateStatus.Timeout: // time out
break;
}
}
});
UmengUpdateAgent.update(context);
}
示例4: operateUmeng
import com.umeng.update.UmengUpdateAgent; //導入方法依賴的package包/類
public void operateUmeng() {
UmengUpdateAgent.setUpdateUIStyle(UpdateStatus.STYLE_NOTIFICATION);
UmengUpdateAgent.setDeltaUpdate(true);
UmengUpdateAgent.setUpdateOnlyWifi(false);
UmengUpdateAgent.update(this);
//檢測開發者反饋回複
FeedbackAgent agent = new FeedbackAgent(this);
agent.sync();
}
示例5: checkAutoUpdateByUmeng
import com.umeng.update.UmengUpdateAgent; //導入方法依賴的package包/類
public void checkAutoUpdateByUmeng() {
if(mContext.getIntent().getSerializableExtra("BUNDLE_GANK") == null){
UmengUpdateAgent.setUpdateCheckConfig(BuildConfig.DEBUG);
//check update even in 2g/3g/4g condition
UmengUpdateAgent.setUpdateOnlyWifi(false);
UmengUpdateAgent.update(mContext);
}
}
示例6: autoUpdate
import com.umeng.update.UmengUpdateAgent; //導入方法依賴的package包/類
public static void autoUpdate(final Context context) {
UmengUpdateAgent.setUpdateOnlyWifi(false);
UmengUpdateAgent.update(context);
UmengUpdateAgent.setUpdateListener(new UmengUpdateListener() {
@Override
public void onUpdateReturned(int i, UpdateResponse updateResponse) {
if (updateResponse != null && updateResponse.updateLog != null && !updateResponse.updateLog.isEmpty()) {
SharedPreferencesFactory.saveString(context, UPDATELOG, updateResponse.updateLog);
}
}
});
}
示例7: onCreate
import com.umeng.update.UmengUpdateAgent; //導入方法依賴的package包/類
public void onCreate(Bundle savedInstanceState) {
//處理推送
delayStartActivityByPushIntent(mMainActivity.getIntent());
if (!BuildConfig.DEBUG) {
UmengUpdateAgent.setUpdateOnlyWifi(false);
UmengUpdateAgent.update(mMainActivity);
}
}
示例8: initData
import com.umeng.update.UmengUpdateAgent; //導入方法依賴的package包/類
@Override
public void initData() {
super.initData();
UmengUpdateAgent.update(this);
UmengUpdateAgent.setUpdateOnlyWifi(true);
mPresenter.initAdapterData(adapter);
}
示例9: initUmeng
import com.umeng.update.UmengUpdateAgent; //導入方法依賴的package包/類
@Override
public void initUmeng(Context context) {
if (App.getApp() != null && App.getApp().getEdition() == Edition.DEBUG) {
MobclickAgent.setDebugMode(true);
MobclickAgent.setCatchUncaughtExceptions(false);
UpdateConfig.setDebug(true);
} else {
UmengUpdateAgent.setUpdateCheckConfig(false);
}
// Fix bug for downloading always
UmengUpdateAgent.setDeltaUpdate(false);
UmengUpdateAgent.setUpdateOnlyWifi(false);
UmengUpdateAgent.setUpdateUIStyle(UpdateStatus.STYLE_DIALOG);
UmengUpdateAgent.setUpdateAutoPopup(false);
}
示例10: checkVersion
import com.umeng.update.UmengUpdateAgent; //導入方法依賴的package包/類
static public void checkVersion(Context context, UmengUpdateListener umengUpdateListener) {
UmengUpdateAgent.setDeltaUpdate(false);
UmengUpdateAgent.setUpdateOnlyWifi(true);
UmengUpdateAgent.setUpdateAutoPopup(false);
UmengUpdateAgent.setUpdateListener(umengUpdateListener);
UmengUpdateAgent.update(context);
}
示例11: onCreate
import com.umeng.update.UmengUpdateAgent; //導入方法依賴的package包/類
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setTitle(R.string.app_title);
mPresenter.request(this, Constants.USER_GUIDE);
UmengUpdateAgent.setUpdateAutoPopup(true);
UmengUpdateAgent.setUpdateOnlyWifi(false);
UmengUpdateAgent.update(this);
}
示例12: onCreate
import com.umeng.update.UmengUpdateAgent; //導入方法依賴的package包/類
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
//注冊廣播接收器,接收網絡連接變化
IntentFilter filter = new IntentFilter(ConnectivityManager.CONNECTIVITY_ACTION);
this.registerReceiver(netReceiver, filter);
sp = getSharedPreferences(Constants.SP_USER,0);
//友盟自動更新
UmengUpdateAgent.setUpdateOnlyWifi(false);
UmengUpdateAgent.update(this);
//啟動服務,獲取留言消息
startService(new Intent(this, LocalMessageServer.class));
//注冊本地廣播,接收留言消息
localBroadcastManager = LocalBroadcastManager.getInstance(this);
IntentFilter intentFilter = new IntentFilter(LOCAL_MESSAGE_ACTION);
messageReceiver = new LocalMessageReceiver();
localBroadcastManager.registerReceiver(messageReceiver, intentFilter);
fragments = new ArrayList<>();
home = HomeFragment.getInstance();
commit = CommitFragment.getInstance();
commit.setContext(this);
message = MessageFragment.getInstance();
message.setMessageChangListener(this);
message.setContext(this);
fragments.add(home);
fragments.add(commit);
fragments.add(message);
initView();
}
示例13: onCreate
import com.umeng.update.UmengUpdateAgent; //導入方法依賴的package包/類
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.almanac_activity);
calendar = Calendar.getInstance(Locale.CHINA);
initView();
updateView();
UmengUpdateAgent.setUpdateOnlyWifi(false);
UmengUpdateAgent.update(this);
mController = UMServiceFactory.getUMSocialService("com.umeng.share",
RequestType.SOCIAL);
mController.getConfig().setSsoHandler(new SinaSsoHandler());
String appID = "wx4f7f32d56bb3ddb6";
String contentUrl = "http://www.wandoujia.com/apps/com.nozomi.almanac";
mController.getConfig().supportWXPlatform(this, appID, contentUrl);
mController.getConfig()
.supportWXCirclePlatform(this, appID, contentUrl);
mShakeController = UMShakeServiceFactory
.getShakeService("com.umeng.share");
mShakeController.setShareContent("#Acfun黃曆#");
platforms.add(SHARE_MEDIA.SINA);
platforms.add(SHARE_MEDIA.WEIXIN);
platforms.add(SHARE_MEDIA.WEIXIN_CIRCLE);
appAdapter = new UMAppAdapter(AlmanacActivity.this);
}
示例14: initUmeng
import com.umeng.update.UmengUpdateAgent; //導入方法依賴的package包/類
private void initUmeng() {
// 友盟自動檢測更新
if(SpUtil.getSp(this).getBoolean("auto_update",false)){
UmengUpdateAgent.setUpdateOnlyWifi(false);
UmengUpdateAgent.update(this);
}
FeedbackAgent agent = new FeedbackAgent(this);
agent.sync();
}
示例15: onCreate
import com.umeng.update.UmengUpdateAgent; //導入方法依賴的package包/類
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// 版本更新自動敬愛呢
UmengUpdateAgent.setUpdateOnlyWifi(false);
UmengUpdateAgent.update(this);
// oline config params
String onlineParams= MobclickAgent.getConfigParams(getApplicationContext(), "hello_test");//the demo param's key is 'abc'
System.out.println("======" +onlineParams);
// 統計測試
GKStatics.onEvent(this, GKStatics.event_main);;
// set the Above View
if (savedInstanceState != null)
mContent = getSupportFragmentManager().getFragment(savedInstanceState, "mContent");
if (mContent == null)
mContent = new GKContentFragment(R.color.blue);
// set the Above View
setContentView(R.layout.content_frame);
getSupportFragmentManager()
.beginTransaction()
.replace(R.id.content_frame, mContent)
.commit();
// set the Behind View
setBehindContentView(R.layout.menu_frame);
getSupportFragmentManager()
.beginTransaction()
.replace(R.id.menu_frame, new GKMenuFragment())
.commit();
// customize the SlidingMenu
getSlidingMenu().setTouchModeAbove(SlidingMenu.TOUCHMODE_FULLSCREEN);
}