本文整理汇总了Java中com.umeng.onlineconfig.OnlineConfigAgent类的典型用法代码示例。如果您正苦于以下问题:Java OnlineConfigAgent类的具体用法?Java OnlineConfigAgent怎么用?Java OnlineConfigAgent使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
OnlineConfigAgent类属于com.umeng.onlineconfig包,在下文中一共展示了OnlineConfigAgent类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onCreate
import com.umeng.onlineconfig.OnlineConfigAgent; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
try {
Intent intent = getIntent();
if (intent.getAction().equals(ConstantUtil.NOTIFY_SCREEN_CAPTURE_OVER_BROADCAST)) {
UrlCountUtil.onEvent(UrlCountUtil.CLICK_NOFITY_SCREEN);
sendBroadcast(new Intent(ConstantUtil.SCREEN_CAPTURE_OVER_BROADCAST));
finish();
return;
} else if (intent.getAction().equals(ConstantUtil.NOTIFY_UNIVERSAL_COPY_BROADCAST)) {
UrlCountUtil.onEvent(UrlCountUtil.CLICK_NOFITY_COPY);
sendBroadcast(new Intent(ConstantUtil.UNIVERSAL_COPY_BROADCAST));
finish();
return;
}
}catch (Throwable e){}
setContentView(R.layout.activity_splash);
OnlineConfigAgent.getInstance().updateOnlineConfig(getApplicationContext());
setUpSplash();
}
示例2: onCreate
import com.umeng.onlineconfig.OnlineConfigAgent; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_track_way_add);
ButterKnife.bind(this);
ruleContent = OnlineConfigAgent.getInstance().getConfigParams(mContext, "travelReleaseNotes");
if (TextUtils.isEmpty(ruleContent)) {
ruleContent = getString(R.string.msg_first_time_show_travel_together);
}
initView();
initListenner();
progress();
if (AccountInfo.getInstance().isFirstTimeLogin()) {
showRuleDialog();
}
}
示例3: onCreate
import com.umeng.onlineconfig.OnlineConfigAgent; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_verify);
ButterKnife.bind(this);
initListener();
mTitle.setText("用户注册");
mBase.setVisibility(View.VISIBLE);
mPhoneNum = getIntent().getStringExtra("phoneNum");
countryNumber = getIntent().getStringExtra("countryNumber");
String smsChannelValue = OnlineConfigAgent.getInstance().getConfigParams(this, "SMSChannel");
if (!TextUtils.isEmpty(smsChannelValue)) {
smsChannel = Integer.parseInt(smsChannelValue);
}
countDown();
}
示例4: onCreate
import com.umeng.onlineconfig.OnlineConfigAgent; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_phone);
ButterKnife.bind(this);
mContext = this;
String smsChannelValue = OnlineConfigAgent.getInstance().getConfigParams(this, "SMSChannel");
if (!TextUtils.isEmpty(smsChannelValue)) {
smsChannel = Integer.parseInt(smsChannelValue);
}
mTitle.setText("密码重置");
mBase.setVisibility(View.VISIBLE);
initView();
initCountryList();
setListener();
initListener();
}
示例5: onCreate
import com.umeng.onlineconfig.OnlineConfigAgent; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_phone);
ButterKnife.bind(this);
mContext = this;
String smsChannelValue = OnlineConfigAgent.getInstance().getConfigParams(this, "SMSChannel");
if (!TextUtils.isEmpty(smsChannelValue)) {
smsChannel = Integer.parseInt(smsChannelValue);
}
mTitle.setText("用户注册");
mBase.setVisibility(View.VISIBLE);
initView();
initCountryList();
setListener();
initListener();
}
示例6: onCreate
import com.umeng.onlineconfig.OnlineConfigAgent; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_verify);
ButterKnife.bind(this);
initListener();
String smsChannelValue = OnlineConfigAgent.getInstance().getConfigParams(this, "SMSChannel");
if (!TextUtils.isEmpty(smsChannelValue)) {
smsChannel = Integer.parseInt(smsChannelValue);
}
mTitle.setText("密码重置");
mBase.setVisibility(View.VISIBLE);
mPhoneNum = getIntent().getStringExtra("phoneNum");
countryNumber = getIntent().getStringExtra("countryNumber");
countDown();
}
示例7: afreshUmengWallParams
import com.umeng.onlineconfig.OnlineConfigAgent; //导入依赖的package包/类
/**
* 刷新在线参数和积分
*/
private void afreshUmengWallParams() {
String value = OnlineConfigAgent.getInstance().getConfigParams(
getActivity(), "adstatue");
try {
scoreLevel = Integer
.valueOf(OnlineConfigAgent.getInstance()
.getConfigParams(getActivity(), "scorelevel")
.equals("") ? "0" : OnlineConfigAgent.getInstance()
.getConfigParams(getActivity(), "scorelevel"));
} catch (Exception e) {
Log.e(e);
scoreLevel = 1000;
}
if (value != null && value.equals("1"))
more_unLock.setText("积分商城(获取" + scoreLevel + "去掉广告)");
}
示例8: onCreate
import com.umeng.onlineconfig.OnlineConfigAgent; //导入依赖的package包/类
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.appstart);
// 获取在线参数方法,储存在本地mContext
OnlineConfigAgent.getInstance().updateOnlineConfig(this);
new Handler().postDelayed(new Runnable(){
@Override
public void run(){
Intent intent;
intent = new Intent (AppStart.this,Welcome.class);
startActivity(intent);
AppStart.this.finish();
}
}, 1000);
}
示例9: checkUpdate
import com.umeng.onlineconfig.OnlineConfigAgent; //导入依赖的package包/类
/**
* 检查更新
* @param main 显示检查更新的页面
*/
public static void checkUpdate(Activity main){
// 首次打开不更新
if (MainApp.isFirst())
{
MainApp.setIsFirst(false);
}
else
{
String value = OnlineConfigAgent.getInstance().getConfigParams(main, Consts.OC_UPDATE_MODE);
String versionCode = OnlineConfigAgent.getInstance().getConfigParams(main, Consts.OC_UPDATE_FORCE_VERSION);
int vc;
try{
vc = Integer.parseInt(versionCode);
}catch (NumberFormatException e){
vc = -1;
}
// 当强制更新参数为“f"时,且此时本地版本小于远程要求的最小版本时,才进行强制更新
if ((vc>0)&&Consts.OC_UPDATE_MODE_FORCED.equals(value)&&(getAppVersionCode(main)<vc)){
forcedUpdate(main);
}else{
normalUpdate(main);
}
}
}
示例10: onCreate
import com.umeng.onlineconfig.OnlineConfigAgent; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
OnlineConfigAgent.getInstance().updateOnlineConfig(this);
String url = OnlineConfigAgent.getInstance().getConfigParams(this, LOGIN_WELCOME);
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_reglogin);
ButterKnife.bind(this);
if(!TextUtils.isEmpty(url)){
RequestManager.loadImage(url, RequestManager.getImageListener(bgImageView, null, null));
}
regiseterButton.setOnClickListener(this);
loginButton.setOnClickListener(this);
}
示例11: initConfigs
import com.umeng.onlineconfig.OnlineConfigAgent; //导入依赖的package包/类
/**
* 初始化配置信息
*
* @param isDebugMode 是否是开发模式
*/
private void initConfigs(boolean isDebugMode) {
// 友盟在线参数调式模式:开启
OnlineConfigAgent.getInstance().setDebugMode(isDebugMode);
// 友盟统计调式模式:开启
MobclickAgent.setDebugMode(isDebugMode);
// Initialize JPush
JPushInterface.setDebugMode(isDebugMode); // 设置开启日志,发布时需关闭日志
if (isDebugMode) { // 开发模式
Logger
.init(TAG) // default PRETTYLOGGER or use just init()
.setMethodCount(3) // default 2
.hideThreadInfo() // default shown
.setLogLevel(LogLevel.FULL); // default LogLevel.FULL | LogLevel.NONE
// Initialize the hawk
Hawk.init(this)
.setEncryptionMethod(HawkBuilder.EncryptionMethod.MEDIUM)
.setStorage(HawkBuilder.newSqliteStorage(this))
.setLogLevel(com.orhanobut.hawk.LogLevel.FULL)
.build();
} else {
Logger
.init(TAG) // default PRETTYLOGGER or use just init()
.setMethodCount(3) // default 2
.hideThreadInfo() // default shown
.setLogLevel(LogLevel.NONE); // default LogLevel.FULL | LogLevel.NONE
// Initialize the hawk
Hawk.init(this)
.setEncryptionMethod(HawkBuilder.EncryptionMethod.MEDIUM)
.setStorage(HawkBuilder.newSqliteStorage(this))
.setLogLevel(com.orhanobut.hawk.LogLevel.NONE)
.build();
}
}
示例12: onCreate
import com.umeng.onlineconfig.OnlineConfigAgent; //导入依赖的package包/类
@Override
public void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setStyle(DialogFragment.STYLE_NORMAL, android.R.style.Theme_Translucent_NoTitleBar);
String timeValue = OnlineConfigAgent.getInstance().getConfigParams(getActivity(), "splashDisplayTime");
if (!TextUtils.isEmpty(timeValue)) {
displayTime = Integer.parseInt(timeValue);
}
}
示例13: onCreate
import com.umeng.onlineconfig.OnlineConfigAgent; //导入依赖的package包/类
@Override
public void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_home);
UmengUpdateAgent.update(this);
ViewUtils.inject(this);
setRadioButtonDrawableSelector();
setRadioButtonTextColorSelector();
this.fragmentManager = getSupportFragmentManager();
initFragmentList();
setCurrentClickPoint(SharedPreferences.getInstance().getInt(
"mCurrentSelected", 3));
initEvent();
addFirstToast(this.getActivityName());
OnlineConfigAgent.getInstance().updateOnlineConfig(this);
Log.d(SharedPreferences.getInstance().getString("host",
HttpConstant.HOST_URL_TEST));
// if (!SharedPreferences.getInstance().getBoolean(
// SpConstant.DIALOG_INDICATE_SHELF, false)) {
//
// IndicateDialog dialog = new IndicateDialog(this, this);
// dialog.create();
// dialog.setIndicateDrawable(R.drawable.book_shelf_indicate);
// dialog.show();
// }
}
示例14: shareClicked
import com.umeng.onlineconfig.OnlineConfigAgent; //导入依赖的package包/类
@OnClick(R.id.tv_right)
void shareClicked() {
String isShowShareAlert = OnlineConfigAgent.getInstance().getConfigParams(IntegralWebActivity.this, "isShowShareAlert");
String shareAlertContent = OnlineConfigAgent.getInstance().getConfigParams(IntegralWebActivity.this, "shareAlertContent");
if (TextUtils.isEmpty(shareAlertContent)) {
shareAlertContent = "请在分享成功后返回行咖哦,否则无法获取抽奖资格!";
}
final ShareInfo shareInfo = new ShareInfo();
shareInfo.setTitle(shareTitle);
shareInfo.setContent(shareDesc);
shareInfo.setImageUrl(shareImage);
shareInfo.setTargetUrl(shareUrl);
if (!TextUtils.isEmpty(isShowShareAlert)) {
if ("1".equals(isShowShareAlert)) {
Logger.d(shareInfo.toString());
//弹出分享后请返回行咖应用的提示
final NormalDialog dialog = new NormalDialog(this);
dialog.isTitleShow(true)
.bgColor(Color.parseColor("#ffffff"))
.cornerRadius(5)
.content("请在分享成功后返回行咖哦,否则无法获取抽奖资格!")
.btnText("取消", "继续分享")
.contentGravity(Gravity.CENTER)
.contentTextColor(Color.parseColor("#33333d"))
.dividerColor(Color.parseColor("#dcdce4"))
.btnTextSize(15.5f, 15.5f)
.btnTextColor(Color.parseColor("#ff2814"), Color.parseColor("#0077fe"))
.widthScale(0.85f)
// .showAnim(bas_in)
// .dismissAnim(bas_out)
.show();
dialog.setOnBtnClickL(new OnBtnClickL() {
@Override
public void onBtnClick() {
dialog.dismiss();
}
}, new OnBtnClickL() {
@Override
public void onBtnClick() {
ShareOfficalCatpionActivity.launch(IntegralWebActivity.this, shareInfo, mGUid);
dialog.dismiss();
}
});
} else if ("0".equals(isShowShareAlert)) {
ShareOfficalCatpionActivity.launch(IntegralWebActivity.this, shareInfo, mGUid);
}
}
}
示例15: onCreate
import com.umeng.onlineconfig.OnlineConfigAgent; //导入依赖的package包/类
@Override
public void onCreate(Context context) {
MobclickAgent.setDebugMode(true);
MobclickAgent.openActivityDurationTrack(false);
OnlineConfigAgent.getInstance().updateOnlineConfig(context);
}