本文整理汇总了Java中com.umeng.update.UmengUpdateAgent.setUpdateCheckConfig方法的典型用法代码示例。如果您正苦于以下问题:Java UmengUpdateAgent.setUpdateCheckConfig方法的具体用法?Java UmengUpdateAgent.setUpdateCheckConfig怎么用?Java UmengUpdateAgent.setUpdateCheckConfig使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.umeng.update.UmengUpdateAgent
的用法示例。
在下文中一共展示了UmengUpdateAgent.setUpdateCheckConfig方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: 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);
}
}
示例2: onCreate
import com.umeng.update.UmengUpdateAgent; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
initDrawerListItems();
initViews();
startService(new Intent(getApplicationContext(), DeamonService.class));
UmengUpdateAgent.setUpdateCheckConfig(BuildConfig.DEBUG);
UmengUpdateAgent.setRichNotification(true);
UmengUpdateAgent.update(getApplicationContext());
}
示例3: 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);
}
示例4: init
import com.umeng.update.UmengUpdateAgent; //导入方法依赖的package包/类
public static void init() {
AnalyticsConfig.setAppkey(StatUtils.UMENG_APP_KEY);
UmengUpdateAgent.setAppkey(StatUtils.UMENG_APP_KEY);
UmengUpdateAgent.setUpdateCheckConfig(false);
}
示例5: setUmeng
import com.umeng.update.UmengUpdateAgent; //导入方法依赖的package包/类
private void setUmeng() {
//对友盟统计日志加密
AnalyticsConfig.enableEncrypt(true);
//友盟统计不采集mac信息
MobclickAgent.setCheckDevice(false);
//禁止自动提示更新对话框
UmengUpdateAgent.setUpdateAutoPopup(false);
//禁止增量更新
UmengUpdateAgent.setDeltaUpdate(false);
UmengUpdateAgent.setUpdateListener(new UmengUpdateListener() {
@Override
public void onUpdateReturned(int status, UpdateResponse updateResponse) {
switch (status) {
case UpdateStatus.Yes:
//有更新
showUpdateDialog(updateResponse);
break;
case UpdateStatus.No:
//无更新
break;
case UpdateStatus.NoneWifi:
//无wifi
break;
case UpdateStatus.Timeout:
//超时
break;
}
}
});
//友盟设置检查更新,不限于wifi
UmengUpdateAgent.setUpdateOnlyWifi(false);
//禁用集成检测,否则会提示缺少xxx,然而我并不需要那些东西
UmengUpdateAgent.setUpdateCheckConfig(false);
//检查更新
UmengUpdateAgent.update(this);
//同步数据
final FeedbackAgent agent = new FeedbackAgent(this);
// agent.openFeedbackPush(); 启用推送在小米手机上会有崩溃发生
agent.sync();
UserInfo userInfo = agent.getUserInfo();
String nickname = ConfigUtil.readString("user", "nickname");
if (TextUtils.isEmpty(nickname)) {
final String n = generateNickname();
Map<String, String> contact = new HashMap<>();
contact.put("昵称", n);
userInfo.setContact(contact);
agent.setUserInfo(userInfo);
new Thread(new Runnable() {
@Override
public void run() {
boolean success = agent.updateUserInfo();
if (success) {
ConfigUtil.writeString("user", "nickname", n);
}
}
}).start();
}
//启用推送
// PushAgent.getInstance(this).enable(); 启用推送在小米手机上会有崩溃发生
}
示例6: onCreate
import com.umeng.update.UmengUpdateAgent; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
view = new MainView(getBaseContext());
view.setMainActivity(this);
AppConnect.getInstance(this);
AppConnect.getInstance(WapsStatic.APP_ID, WapsStatic.APP_PID, this);
MobclickAgent.onResume(this, UmengStatic.UMENG_APPKEY, UmengStatic.UMENG_CHANNEL);
UmengUpdateAgent.setAppkey(UmengStatic.UMENG_APPKEY);
UmengUpdateAgent.setChannel(UmengStatic.UMENG_CHANNEL);
UmengUpdateAgent.update(this);
MobclickAgent.updateOnlineConfig(this);
UmengUpdateAgent.setUpdateCheckConfig(true);
UmengUpdateAgent.setUpdateAutoPopup(true);
SharedPreferences settings = PreferenceManager.getDefaultSharedPreferences(this);
view.hasSaveState = settings.getBoolean("save_state", false);
if (savedInstanceState != null) {
if (savedInstanceState.getBoolean("hasState")) {
load();
}
}
setContentView(view);
/*String ads = MobclickAgent.getConfigParams(this, UmengStatic.V360_ADS_KEY);
if ("1".equals(ads) || "on".equalsIgnoreCase(ads) || "true".equalsIgnoreCase(ads)) {
LinearLayout adlayout = new LinearLayout(this);
adlayout.setGravity(Gravity.BOTTOM);
RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(
ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.MATCH_PARENT);
AppConnect.getInstance(this).showBannerAd(this, adlayout);
layoutParams.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM);
addContentView(adlayout, layoutParams);
AppConnect.getInstance(this).showOffers(this);
}*/
LinearLayout adlayout = new LinearLayout(this);
adlayout.setGravity(Gravity.BOTTOM);
RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(
ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.MATCH_PARENT);
AppConnect.getInstance(this).showBannerAd(this, adlayout);
layoutParams.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM);
addContentView(adlayout, layoutParams);
// AppConnect.getInstance(this).showOffers(this);
}
示例7: onCreate
import com.umeng.update.UmengUpdateAgent; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
view = new MainView(getBaseContext());
view.setMainActivity(this);
AppConnect.getInstance(this);
AppConnect.getInstance(WapsStatic.APP_ID, WapsStatic.APP_PID, this);
MobclickAgent.onResume(this, UmengStatic.UMENG_APPKEY, UmengStatic.UMENG_CHANNEL);
UmengUpdateAgent.setAppkey(UmengStatic.UMENG_APPKEY);
UmengUpdateAgent.setChannel(UmengStatic.UMENG_CHANNEL);
UmengUpdateAgent.update(this);
MobclickAgent.updateOnlineConfig(this);
UmengUpdateAgent.setUpdateCheckConfig(true);
UmengUpdateAgent.setUpdateAutoPopup(true);
SharedPreferences settings = PreferenceManager.getDefaultSharedPreferences(this);
view.hasSaveState = settings.getBoolean("save_state", false);
if (savedInstanceState != null) {
if (savedInstanceState.getBoolean("hasState")) {
load();
}
}
setContentView(view);
/*String ads = MobclickAgent.getConfigParams(this, UmengStatic.BAIDU_ADS);
Log.e("umeng ads", "ads : " + ads);
if ("1".equals(ads) || "on".equalsIgnoreCase(ads) || "true".equalsIgnoreCase(ads)) {
LinearLayout adlayout = new LinearLayout(this);
adlayout.setGravity(Gravity.BOTTOM);
RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(
ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.MATCH_PARENT);
AppConnect.getInstance(this).showBannerAd(this, adlayout);
layoutParams.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM);
addContentView(adlayout, layoutParams);
AppConnect.getInstance(this).showOffers(this);
}*/
LinearLayout adlayout = new LinearLayout(this);
adlayout.setGravity(Gravity.BOTTOM);
RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(
ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.MATCH_PARENT);
AppConnect.getInstance(this).showBannerAd(this, adlayout);
layoutParams.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM);
addContentView(adlayout, layoutParams);
// AppConnect.getInstance(this).showOffers(this);
}
示例8: onCreate
import com.umeng.update.UmengUpdateAgent; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
view = new MainView(getBaseContext());
view.setMainActivity(this);
AppConnect.getInstance(this);
AppConnect.getInstance(WapsStatic.APP_ID, WapsStatic.APP_PID, this);
MobclickAgent.onResume(this, UmengStatic.UMENG_APPKEY, UmengStatic.UMENG_CHANNEL);
UmengUpdateAgent.setAppkey(UmengStatic.UMENG_APPKEY);
UmengUpdateAgent.setChannel(UmengStatic.UMENG_CHANNEL);
UmengUpdateAgent.update(this);
MobclickAgent.updateOnlineConfig(this);
UmengUpdateAgent.setUpdateCheckConfig(true);
UmengUpdateAgent.setUpdateAutoPopup(true);
SharedPreferences settings = PreferenceManager.getDefaultSharedPreferences(this);
view.hasSaveState = settings.getBoolean("save_state", false);
if (savedInstanceState != null) {
if (savedInstanceState.getBoolean("hasState")) {
load();
}
}
setContentView(view);
/*String ads = MobclickAgent.getConfigParams(this, UmengStatic.V360_ADS_KEY);
if ("1".equals(ads) || "on".equalsIgnoreCase(ads) || "true".equalsIgnoreCase(ads)) {
LinearLayout adlayout = new LinearLayout(this);
adlayout.setGravity(Gravity.BOTTOM);
RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(
ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.MATCH_PARENT);
AppConnect.getInstance(this).showBannerAd(this, adlayout);
layoutParams.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM);
addContentView(adlayout, layoutParams);
AppConnect.getInstance(this).showOffers(this);
}*/
LinearLayout adlayout = new LinearLayout(this);
adlayout.setGravity(Gravity.BOTTOM);
RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(
ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.MATCH_PARENT);
AppConnect.getInstance(this).showBannerAd(this, adlayout);
layoutParams.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM);
addContentView(adlayout, layoutParams);
// AppConnect.getInstance(this).showOffers(this);
}
示例9: onCreate
import com.umeng.update.UmengUpdateAgent; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
view = new MainView(getBaseContext());
AppConnect.getInstance(this);
AppConnect.getInstance(WapsStatic.APP_ID, WapsStatic.APP_PID, this);
MobclickAgent.onResume(this, UmengStatic.UMENG_APPKEY, UmengStatic.UMENG_CHANNEL);
UmengUpdateAgent.setAppkey(UmengStatic.UMENG_APPKEY);
UmengUpdateAgent.setChannel(UmengStatic.UMENG_CHANNEL);
UmengUpdateAgent.update(this);
MobclickAgent.updateOnlineConfig(this);
UmengUpdateAgent.setUpdateCheckConfig(true);
UmengUpdateAgent.setUpdateAutoPopup(true);
SharedPreferences settings = PreferenceManager.getDefaultSharedPreferences(this);
view.hasSaveState = settings.getBoolean("save_state", false);
if (savedInstanceState != null) {
if (savedInstanceState.getBoolean("hasState")) {
load();
}
}
setContentView(view);
String ads = MobclickAgent.getConfigParams(this, UmengStatic.V360_ADS_KEY);
Log.e("umeng ads", "ads : " + ads);
// if("1".equals(ads) || "on".equalsIgnoreCase(ads) || "true".equalsIgnoreCase(ads)) {
// LinearLayout adlayout = new LinearLayout(this);
// adlayout.setGravity(Gravity.BOTTOM);
// RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.FILL_PARENT,
// ViewGroup.LayoutParams.MATCH_PARENT);
// AppConnect.getInstance(this).showBannerAd(this, adlayout);
// //layoutParams.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM);// 此代码可设置顶端或低端
// addContentView(adlayout, layoutParams);
// }
/*MobclickAgent.setOnlineConfigureListener(new UmengOnlineConfigureListener() {
public void onDataReceived(JSONObject data) {
}
});*/
LinearLayout adlayout = new LinearLayout(this);
adlayout.setGravity(Gravity.BOTTOM);
RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.FILL_PARENT,
ViewGroup.LayoutParams.MATCH_PARENT);
AppConnect.getInstance(this).showBannerAd(this, adlayout);
//layoutParams.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM);// 此代码可设置顶端或低端
addContentView(adlayout, layoutParams);
// AppConnect.getInstance(this).showOffers(this);
}