本文整理汇总了Java中com.xiaomi.market.sdk.XiaomiUpdateAgent类的典型用法代码示例。如果您正苦于以下问题:Java XiaomiUpdateAgent类的具体用法?Java XiaomiUpdateAgent怎么用?Java XiaomiUpdateAgent使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
XiaomiUpdateAgent类属于com.xiaomi.market.sdk包,在下文中一共展示了XiaomiUpdateAgent类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onCreate
import com.xiaomi.market.sdk.XiaomiUpdateAgent; //导入依赖的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 {
}
}
示例2: onCreate
import com.xiaomi.market.sdk.XiaomiUpdateAgent; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.new_main);
mNoSourceNotified = false;
Fragment f = getSupportFragmentManager().findFragmentByTag(PANEL_TAG);
if(f==null){
mPanel = new PanelFragment();
getSupportFragmentManager().beginTransaction()
.add(R.id.fragment_panel, mPanel, PANEL_TAG)
.commit();
}else{
mPanel = (PanelFragment)f;
}
mPanel.setInitListener(this);
mEntries = showDefaultEntries(false);
XiaomiUpdateAgent.update(this);
}
示例3: checkXiaomiApkUpdate
import com.xiaomi.market.sdk.XiaomiUpdateAgent; //导入依赖的package包/类
public static void checkXiaomiApkUpdate(Activity activity, boolean flag, String s)
{
Debug.i("Utils", "checkXiaomiApkUpdate");
XiaomiUpdateAgent.setUpdateAutoPopup(false);
XiaomiUpdateAgent.setUpdateListener(new i(activity, s, flag));
XiaomiUpdateAgent.update(activity);
}
示例4: onCreate
import com.xiaomi.market.sdk.XiaomiUpdateAgent; //导入依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
SoundBarORM.addSetting(this, SoundBarORM.TryConnectCount, "2");
Intent iDataIntent = new Intent("com.xiaomi.mitv.idata.server.INTENT_DATA_COLLECTION");
startService(iDataIntent);
boolean forcescanbluetooth = false;
final String boot_start = SoundBarORM.getSettingValue(getApplicationContext(), "boot_start");
if(boot_start != null && boot_start.equals("1")){
forcescanbluetooth = true;
Log.d("SoundBarApplication", "will start run soundbar service after 60 seconds, if you want change, please change the databases ");
}
//start sound bar service to keep the sound bar connection
final String value = SoundBarORM.getSettingValue(getApplicationContext(), SoundBarORM.supportMultiConnection);
if(forcescanbluetooth || (value != null && value.equals("1"))){
//one minutes later
final int boot_delay_seconds_count = SoundBarORM.getIntValue(getApplicationContext(), SoundBarORM.boot_delay_seconds_count, 80);
}
BTDeviceMonitor.listen(getApplicationContext());
XiaomiUpdateAgent agent = new XiaomiUpdateAgent();
MobclickAgent.openActivityDurationTrack(false);
}
示例5: onCreate
import com.xiaomi.market.sdk.XiaomiUpdateAgent; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
XiaomiUpdateAgent.update(this);
}