当前位置: 首页>>代码示例>>Java>>正文


Java UmengUpdateAgent.update方法代码示例

本文整理汇总了Java中com.umeng.update.UmengUpdateAgent.update方法的典型用法代码示例。如果您正苦于以下问题:Java UmengUpdateAgent.update方法的具体用法?Java UmengUpdateAgent.update怎么用?Java UmengUpdateAgent.update使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.umeng.update.UmengUpdateAgent的用法示例。


在下文中一共展示了UmengUpdateAgent.update方法的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);
}
 
开发者ID:isuhao,项目名称:QMark,代码行数:20,代码来源:CategoryActy_v_1.java

示例2: checkUpdate

import com.umeng.update.UmengUpdateAgent; //导入方法依赖的package包/类
public void checkUpdate() {
	UmengUpdateAgent.setUpdateAutoPopup(false);
	UmengUpdateAgent.setUpdateListener(new UmengUpdateListener() {
		
		@Override
		 public void onUpdateReturned(int updateStatus,UpdateResponse updateInfo) {
	        switch (updateStatus) {
	        case UpdateStatus.Yes: // has update
	            UmengUpdateAgent.showUpdateDialog(MainActivity.this, updateInfo);
	            break;
	        case UpdateStatus.No: // has no update
	        	showMsg("当前已是最新版本"+SF.TIP);
	            break;
	        case UpdateStatus.Timeout: // time out
	        	showMsg("检测超时"+SF.FAIL);
	            break;
	        }
	        UmengUpdateAgent.setUpdateAutoPopup(true);
			UmengUpdateAgent.setUpdateListener(null);
	    }
	});
	showMsg("检测更新中,请稍候...");
	UmengUpdateAgent.update(this);
}
 
开发者ID:SShineTeam,项目名称:Huochexing12306,代码行数:25,代码来源:MainActivity.java

示例3: onCreate

import com.umeng.update.UmengUpdateAgent; //导入方法依赖的package包/类
@Override
public void onCreate(Bundle savedInstanceState) {
    /*requestWindowFeature(Window.FEATURE_NO_TITLE);
    getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
            WindowManager.LayoutParams.FLAG_FULLSCREEN);*/
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_home);
    //判斷是否是新用戶
    if(PrefUtils.getBoolean(this,ConsUtils.IS_FIRST_TIME,true)){
        startActivity(new Intent(this,GuideActivity.class));
        finish();
        return;
    }
    UmengUpdateAgent.update(this);
    //初始化数据库
    initDataBase("china_Province_city_zone.db");
    initSlideMenu();
    initView();
    initFragment();
    initService();
    Intent intent=getIntent();
    if(intent.getBooleanExtra("showGuide", false)){
        firstTimeGuide();
    }

}
 
开发者ID:JoeSteven,项目名称:Moring-Alarm,代码行数:27,代码来源:HomeActivity.java

示例4: onCreate

import com.umeng.update.UmengUpdateAgent; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    if ("baidu".equalsIgnoreCase(BuildConfig.AUTO_TYPE)) {
        BDAutoUpdateSDK.silenceUpdateAction(this);//百度静默更新
        Log.e(TAG, "baidu更新");
    } else if ("360".equalsIgnoreCase(BuildConfig.AUTO_TYPE)) {
        UpdateManager.setTestMode(2);//测试模式 1有更新 2有更新并省流量
        UpdateManager.setDebug(true);//打印日志
        UpdateManager.checkUpdate(this);
        Log.e(TAG, "360更新");
    } else if ("xiaomi".equalsIgnoreCase(BuildConfig.AUTO_TYPE)) {
        XiaomiUpdateAgent.update(this);
        Log.e(TAG, "小米更新");
    } else if ("umeng".equalsIgnoreCase(BuildConfig.AUTO_TYPE)) {
        UmengUpdateAgent.update(this);
        Log.e(TAG, "umeng更新");
    } else {

    }
}
 
开发者ID:a741762308,项目名称:MultiChannelPack,代码行数:23,代码来源:MainActivity.java

示例5: initViews

import com.umeng.update.UmengUpdateAgent; //导入方法依赖的package包/类
/**
 * Initialize the view in the layout
 *
 * @param savedInstanceState savedInstanceState
 */
@Override protected void initViews(Bundle savedInstanceState) {
    this.dataDecoration = new EasyBorderDividerItemDecoration(
            this.getResources().getDimensionPixelOffset(R.dimen.data_border_divider_height),
            this.getResources()
                .getDimensionPixelOffset(R.dimen.data_border_padding_infra_spans));
    this.welfareDecoration = new EasyBorderDividerItemDecoration(
            this.getResources().getDimensionPixelOffset(R.dimen.welfare_border_divider_height),
            this.getResources()
                .getDimensionPixelOffset(R.dimen.welfare_border_padding_infra_spans));
    this.mainRv.addItemDecoration(this.dataDecoration);
    this.mLinearLayoutManager = (LinearLayoutManager) this.mainRv.getLayoutManager();
    this.mStaggeredGridLayoutManager = new StaggeredGridLayoutManager(2,
            StaggeredGridLayoutManager.VERTICAL);
    this.mActionBarHelper.setDrawerTitle(this.getResources().getString(R.string.app_menu));

    UmengUpdateAgent.update(this);
}
 
开发者ID:CaMnter,项目名称:EasyGank,代码行数:23,代码来源:MainActivity.java

示例6: 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);
	}
 
开发者ID:cowthan,项目名称:AyoSunny,代码行数:26,代码来源:AppUpdateUtils.java

示例7: 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);
}
 
开发者ID:cowthan,项目名称:AyoSunny,代码行数:21,代码来源:AppUpdateUtils.java

示例8: onCreate

import com.umeng.update.UmengUpdateAgent; //导入方法依赖的package包/类
@Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);

      fmTrackList = new AllTrackListFragment();
      setFragement(fmTrackList);

      getSupportActionBar().setDisplayShowHomeEnabled(true);
      getSupportActionBar().setDisplayHomeAsUpEnabled(false);
getSupportActionBar().setHomeButtonEnabled(true);
getSupportActionBar().setIcon(R.drawable.ic_drawer);

if(!EventBus.getDefault().isRegistered(this)){
	EventBus.getDefault().register(this);
}

//检测更新
UmengUpdateAgent.update(this);

  }
 
开发者ID:jp1017,项目名称:TheSceneryAlong,代码行数:21,代码来源:MainActivity.java

示例9: onCreate

import com.umeng.update.UmengUpdateAgent; //导入方法依赖的package包/类
@SuppressWarnings("ConstantConditions")
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        ButterKnife.bind(this);
        UmengUpdateAgent.update(this);
        setSupportActionBar(toolbar);

        getSupportActionBar().setHomeAsUpIndicator(R.drawable.ic_menu);
        getSupportActionBar().setDisplayHomeAsUpEnabled(true);

        setupDrawerContent(navigationView);

        setupViewPager(viewPager);
        viewPager.setCurrentItem(getIntent().getIntExtra(EXTRA_FRAG_TYPE, DEFAULT_FRAG));
        tabLayout.setupWithViewPager(viewPager);
//        startService(new Intent(this, PrefetchService.class));
    }
 
开发者ID:overlooping,项目名称:GankMeizhi,代码行数:20,代码来源:MainActivity.java

示例10: onCreate

import com.umeng.update.UmengUpdateAgent; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    UmengUpdateAgent.update(this);

    FeedbackAgent agent = new FeedbackAgent(this);
    agent.sync();

    setContentView(R.layout.activity_main);
    ButterKnife.bind(this);

    setupDrawerView();
    setupToolbar();
    setupDrawerLayout();

    getUserInfo();
    FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction();
    mMainFragment = MainFragment.newInstance();
    fragmentTransaction.replace(R.id.fragment_container, mMainFragment).commit();
}
 
开发者ID:lofei117,项目名称:TuChongAndroid,代码行数:22,代码来源:MainActivity.java

示例11: checkUpdate

import com.umeng.update.UmengUpdateAgent; //导入方法依赖的package包/类
private void checkUpdate() {
    UmengUpdateAgent.setUpdateListener(new UmengUpdateListener() {

        @Override
        public void onUpdateReturned(int updateStatus,
                                     UpdateResponse updateInfo) {
            switch (updateStatus) {
                case UpdateStatus.Yes: // has update
                    // mVersion = new Version(updateInfo);
                    UmengUpdateAgent.showUpdateDialog(getApplicationContext(),
                            updateInfo);
                    break;
                case UpdateStatus.No: // has no update
                    break;
                case UpdateStatus.NoneWifi: // none wifi
                    break;
                case UpdateStatus.Timeout: // time out
                    break;
            }
        }
    });
    UmengUpdateAgent.setUpdateAutoPopup(false);
    UmengUpdateAgent.update(getApplicationContext());
}
 
开发者ID:blueelwang,项目名称:oschina-app,代码行数:25,代码来源:MainActivity.java

示例12: onCreate

import com.umeng.update.UmengUpdateAgent; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    if (savedInstanceState == null) {
        initData();
    }

    // 接受消息推送 广播 数据 处理相应逻辑
    if (BROAD_RECEIVER_ACTION.equals(getIntent().getAction())) {
        Bundle bundle = getIntent().getBundleExtra(PushBroadcastReceiver.BROAD_DATA_KEY);
        String title = bundle.getString("title");
        Log.i(BROAD_RECEIVER_ACTION, title);
    }

    // 第三方SDK初始化
    AVInstallation.getCurrentInstallation().saveInBackground();
    PushService.setDefaultPushCallback(this, MainActivity_.class);
    FeedbackAgent agent = new FeedbackAgent(this);
    agent.sync();
    UmengUpdateAgent.update(this);
    BmobPay.init(this, Constants.BMOB_APPLICATION_ID);
}
 
开发者ID:AndroidCreativeDesign,项目名称:AndroidSharingPlatform,代码行数:23,代码来源:MainActivity.java

示例13: onCreate

import com.umeng.update.UmengUpdateAgent; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    UmengUpdateAgent.update(this);

    getActionBar().setIcon(R.drawable.ic_logo);

    mNavigationDrawerFragment = (NavigationDrawerFragment)
            getFragmentManager().findFragmentById(R.id.navigation_drawer);
    mTitle = getTitle();

    // Set up the drawer.
    mNavigationDrawerFragment.setUp(
            R.id.navigation_drawer,
            (DrawerLayout) findViewById(R.id.drawer_layout));
}
 
开发者ID:kyze8439690,项目名称:v2ex-daily-android,代码行数:18,代码来源:MainActivity.java

示例14: checkUpdate

import com.umeng.update.UmengUpdateAgent; //导入方法依赖的package包/类
private void checkUpdate() {
	UmengUpdateAgent.setUpdateListener(new UmengUpdateListener() {

		@Override
		public void onUpdateReturned(int updateStatus,
				UpdateResponse updateInfo) {
			switch (updateStatus) {
			case UpdateStatus.Yes: // has update
				// mVersion = new Version(updateInfo);
				mShouldGoTo = false;
				UmengUpdateAgent.showUpdateDialog(getApplicationContext(),
						updateInfo);
				break;
			case UpdateStatus.No: // has no update
				break;
			case UpdateStatus.NoneWifi: // none wifi
				break;
			case UpdateStatus.Timeout: // time out
				break;
			}
		}
	});
	UmengUpdateAgent.setUpdateAutoPopup(false);
	UmengUpdateAgent.update(getApplicationContext());
}
 
开发者ID:447491480,项目名称:ima_intellj,代码行数:26,代码来源:SplashActivity.java

示例15: onCreate

import com.umeng.update.UmengUpdateAgent; //导入方法依赖的package包/类
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    // setTheme(android.R.style.Theme_Holo_Light);

    actionBar = getActionBar();
    actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD);
    actionBar.setIcon(android.R.color.transparent);

    context = getApplicationContext();
    mSharedPreferences = PreferenceManager.getDefaultSharedPreferences(context);

    try {
        packageInfo = getPackageManager().getPackageInfo(getPackageName(), 0);
    } catch (PackageManager.NameNotFoundException e) {
        e.printStackTrace();
    }

    openAnalytics = mSharedPreferences.getBoolean(getString(R.string.key_analytics), true);
    if (openAnalytics) {
        MobclickAgent.onError(this);
    }

    UmengUpdateAgent.update(this);
}
 
开发者ID:feelinglucky,项目名称:iZhihu,代码行数:27,代码来源:BaseActivity.java


注:本文中的com.umeng.update.UmengUpdateAgent.update方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。