Java Code Examples for com.umeng.analytics.MobclickAgent#updateOnlineConfig()

The following examples show how to use com.umeng.analytics.MobclickAgent#updateOnlineConfig() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SplashActivity.java    From wallpaper with GNU General Public License v2.0 6 votes vote down vote up
@Override
protected void onCreate(Bundle savedInstanceState) {
	super.onCreate(savedInstanceState);
	setContentView(R.layout.activity_splash);

	// =====================================
	MobclickAgent.updateOnlineConfig(this);
	MobclickAgent.openActivityDurationTrack(false);
	MobclickAgent.setDebugMode(true); // 使用普通测试流程
	// =====================================
	// do network request
	SplashViewModel viewModel = (SplashViewModel) ViewModelManager.manager().newViewModel(SplashActivity.class.getName());
	this.setViewModel(viewModel);
	viewModel.setActivity(this);

	new Handler().postDelayed(new Runnable() {
		public void run() {
			// execute the task
			gotoSelectSchoolOrMainActivity();
		}
	}, 2 * 1000);
}
 
Example 2
Source File: NewsContentActivity.java    From zhangshangwuda with Apache License 2.0 6 votes vote down vote up
@Override
public void onCreate(Bundle savedInstanceState) {
	requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
	super.onCreate(savedInstanceState);
	getSupportActionBar().setDisplayHomeAsUpEnabled(true);
	MobclickAgent.updateOnlineConfig(this);
	setContentView(R.layout.news_content);
	Intent intent = getIntent();
	href = intent.getStringExtra("href");
	// title = NoticeHtmlTool.getZqNoticesContentTitle(href);
	// isSaveInLocal =
	// LocalDataSharedPreferencesTool.news_isSaveInLocal(this);
	// isAutoSaveInLocal = LocalDataSharedPreferencesTool
	// .news_isAutoSaveInLocal(this);
	findViews();
	refreshData();
	getWindow().setBackgroundDrawable(null);
}
 
Example 3
Source File: MainActivity.java    From talk-android with MIT License 5 votes vote down vote up
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    CrashReport.initCrashReport(getApplicationContext(), Constant.BUGLY_APP_ID,
            MainApp.BUILD_TYPE == MainApp.DEBUG);
    if (BizLogic.getUserInfo() != null) {
        CrashReport.putUserData(this, "userId", BizLogic.getUserInfo().get_id() + "\n");
        CrashReport.putUserData(this, "email", BizLogic.getUserInfo().getEmail() + "\n");
        CrashReport.putUserData(this, "phone", BizLogic.getUserInfo().getPhoneNumber());
    }

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

    // 渠道名
    final String market = PackerNg.getMarket(this);
    if (StringUtil.isNotBlank(market)) {
        AnalyticsConfig.setChannel(market);
    }
    SharedPreferences preferences = getSharedPreferences("shortcut", MODE_PRIVATE);
    if (!preferences.getBoolean("is_create_short", false))
        addShortCut();
    MobclickAgent.updateOnlineConfig(this);

    initData();
}
 
Example 4
Source File: MainActivity.java    From Android-Tech with Apache License 2.0 5 votes vote down vote up
@Override
protected void onCreate(Bundle savedInstanceState) {
	super.onCreate(savedInstanceState);
	setContentView(R.layout.activity_main);
	MobclickAgent.updateOnlineConfig(this);
	
	deviceInfoText = (TextView) findViewById(R.id.deviceInfoTv);
	
	deviceInfoText.setText(Utils.getDeviceInfo(this));
	// 打印设备信息
	Log.d("deviceInfo:", Utils.getDeviceInfo(this));
}
 
Example 5
Source File: MobclickAgentProxy.java    From android-project-wo2b with Apache License 2.0 5 votes vote down vote up
public static void updateOnlineConfig(Context arg0, String arg1, String arg2)
{
	if (!DEBUG)
	{
		MobclickAgent.updateOnlineConfig(arg0, arg1, arg2);
	}
}
 
Example 6
Source File: MobclickAgentProxy.java    From android-project-wo2b with Apache License 2.0 5 votes vote down vote up
public static void updateOnlineConfig(Context arg0)
{
	if (!DEBUG)
	{
		MobclickAgent.updateOnlineConfig(arg0);
	}
}
 
Example 7
Source File: SimplifyReaderApplication.java    From SimplifyReader with Apache License 2.0 5 votes vote down vote up
@Override
public void onCreate() {
    super.onCreate();
    MobclickAgent.setDebugMode(true);
    MobclickAgent.updateOnlineConfig(this);
    MobclickAgent.openActivityDurationTrack(false);
    UmengUpdateAgent.update(this);

    VolleyHelper.getInstance().init(this);
    ImageLoader.getInstance().init(ImageLoaderHelper.getInstance(this).getImageLoaderConfiguration(ApiConstants.Paths.IMAGE_LOADER_CACHE_PATH));
}
 
Example 8
Source File: MainActivity.java    From WeCenterMobile-Android with GNU General Public License v2.0 5 votes vote down vote up
@Override
protected void onCreate(Bundle savedInstanceState) {
	super.onCreate(savedInstanceState);
	setContentView(R.layout.activity_main);
	sharedPreferences = new FanfanSharedPreferences(MainActivity.this);
	ActionBar actionBar = getActionBar();
	actionBar.setDisplayShowHomeEnabled(false);
	if (!sharedPreferences.getLogInStatus(false)) {
		draweritems = this.getResources().getStringArray(
				R.array.nologindrawerliststring);
	} else {
		draweritems = this.getResources().getStringArray(
				R.array.drawerliststring);
		// Login();
	}
	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));
	// ���������Զ��������
	UmengUpdateAgent.update(MainActivity.this);
	// �û���������̨����Ƿ����µ����Կ����ߵĻظ���
	FeedbackAgent mAgent = new FeedbackAgent(MainActivity.this);
	mAgent.sync();
	MobclickAgent.updateOnlineConfig(MainActivity.this);
}
 
Example 9
Source File: Main.java    From iSCAU-Android with GNU General Public License v3.0 5 votes vote down vote up
private void initMobclickAgent(){
    MobclickAgent.updateOnlineConfig(this);
    MobclickAgent.openActivityDurationTrack(false);
    // 检查反馈消息;
    FeedbackAgent agent = new FeedbackAgent(this);
    agent.sync();
}
 
Example 10
Source File: LessonsLoginActivity.java    From zhangshangwuda with Apache License 2.0 5 votes vote down vote up
@Override
public void onCreate(Bundle savedInstanceState) {
	super.onCreate(savedInstanceState);
	MobclickAgent.updateOnlineConfig(this);
	setContentView(R.layout.lessons_login);
	getSupportActionBar().setDisplayHomeAsUpEnabled(true);
	findViews();
	InitConfig();
	LessonsSharedPreferencesTool.setLessonsId(getApplicationContext(), 0);
	Account = AccountView.getText().toString();
	Password = PasswordView.getText().toString();
	new Thread(new refreshYZMThread()).start();
}
 
Example 11
Source File: SplashActivity.java    From YiBo with Apache License 2.0 5 votes vote down vote up
@Override
protected void onCreate(Bundle savedInstanceState) {
	Handler handler = new Handler();
	handler.postDelayed(new Runnable() {
		@Override
		public void run() {
			SheJiaoMaoApplication.changeLocale(SplashActivity.this);
			SheJiaoMaoApplication.initLocalization(SplashActivity.this);
		}			
	}, 
	2000);
	
	super.onCreate(savedInstanceState);
	MobclickAgent.onError(this);
	MobclickAgent.updateOnlineConfig(this);

	if (Logger.isDebug()) {
		Log.v(TAG, "onCreate……");
	}
	//意外退出时,重启,清除通知;
	NotificationManager notiManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
	notiManager.cancelAll();

	Intent startIntent = new Intent(this, HomePageActivity.class);
	startIntent.putExtra("START", true);
	startActivityForResult(startIntent, Constants.REQUEST_CODE_SPLASH);
}
 
Example 12
Source File: RLAnalyticsHelper.java    From Roid-Library with Apache License 2.0 5 votes vote down vote up
/**
 * @param context
 * @param isDebug
 */
public static void init(Context context, boolean isDebug) {
    com.umeng.common.Log.LOG = isDebug;
    MobclickAgent.setDebugMode(isDebug);
    MobclickAgent.setAutoLocation(true);
    MobclickAgent.setSessionContinueMillis(1000);
    // MobclickAgent.setUpdateOnlyWifi(false);
    // MobclickAgent.setDefaultReportPolicy(context,
    // ReportPolicy.BATCH_BY_INTERVAL, 5*1000);
    MobclickAgent.updateOnlineConfig(context);
    MobclickAgent.onError(context);
}
 
Example 13
Source File: MainActivity.java    From light-novel-library_Wenku8_Android with GNU General Public License v2.0 4 votes vote down vote up
@Override
protected void onCreate(Bundle savedInstanceState) {
	super.onCreate(savedInstanceState);
	requestWindowFeature(Window.FEATURE_NO_TITLE);
	setContentView(R.layout.activity_main);

	// ImageLoader Configuration (ImageLoaderConfiguration) is global for
	// application. Display Options (DisplayImageOptions) are local for
	// every display.
	// task (ImageLoader.displayImage(...)).

	// Environment.getExternalStorageState() // can test SDcard exist
	Log.v("MewX", "dir0: " + Environment.getExternalStorageDirectory()
			+ File.separator + "wenku8" + File.separator + "imgs");
	Log.v("MewX", "dir1: " + getCacheDir() + File.separator + "imgs");
	Log.v("MewX", "dir2: " + getFilesDir() + File.separator + "imgs");
	LightCache.saveFile(GlobalConfig.getFirstStoragePath() + "imgs",
               ".nomedia", "".getBytes(), false);
	LightCache.saveFile(GlobalConfig.getSecondStoragePath() + "imgs",
			".nomedia", "".getBytes(), false);

       // umeng
	MobclickAgent.updateOnlineConfig(this);
       AnalyticsConfig.enableEncrypt(false);

	// first: Environment.getExternalStorageDirectory(); then getCacheDir()
	UnlimitedDiscCache localUnlimitedDiscCache = new UnlimitedDiscCache(
			new File(GlobalConfig.getFirstStoragePath() + "cache"),
			new File(getCacheDir() + File.separator + "imgs"));
	DisplayImageOptions localDisplayImageOptions = new DisplayImageOptions.Builder()
			.resetViewBeforeLoading(true).cacheOnDisk(true)
			.cacheInMemory(true).bitmapConfig(Bitmap.Config.RGB_565)
			.resetViewBeforeLoading(true)
			.displayer(new FadeInBitmapDisplayer(250)).build();
	ImageLoaderConfiguration localImageLoaderConfiguration = new ImageLoaderConfiguration.Builder(
			this).diskCache(localUnlimitedDiscCache)
			.defaultDisplayImageOptions(localDisplayImageOptions).build();
	ImageLoader.getInstance().init(localImageLoaderConfiguration);

	// create menu items;
	setUpMenu();
	if (savedInstanceState == null) {
		changeFragment(new LibraryFragment());
		currentViewItemSave = itemLibrary;
	}

	return;
}