Java Code Examples for com.umeng.fb.FeedbackAgent#sync()
The following examples show how to use
com.umeng.fb.FeedbackAgent#sync() .
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: WelcomeAty.java From Huochexing12306 with Apache License 2.0 | 5 votes |
public void operateUmeng() { UmengUpdateAgent.setUpdateUIStyle(UpdateStatus.STYLE_NOTIFICATION); UmengUpdateAgent.setDeltaUpdate(true); UmengUpdateAgent.setUpdateOnlyWifi(false); UmengUpdateAgent.update(this); //检测开发者反馈回复 FeedbackAgent agent = new FeedbackAgent(this); agent.sync(); }
Example 2
Source File: HomeActivity.java From SimplifyReader with Apache License 2.0 | 5 votes |
@Override protected void initViewsAndEvents() { mFeedbackAgent = new FeedbackAgent(this); mFeedbackAgent.sync(); mFeedbackAgent.closeFeedbackPush(); mFeedbackAgent.closeAudioFeedback(); mFeedbackAgent.setWelcomeInfo(getResources().getString(R.string.feedback_welcome_info)); mHomePresenter = new HomePresenterImpl(this, this); mHomePresenter.initialized(); }
Example 3
Source File: MainActivity.java From WeCenterMobile-Android with GNU General Public License v2.0 | 5 votes |
@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 4
Source File: Main.java From iSCAU-Android with GNU General Public License v3.0 | 5 votes |
private void initMobclickAgent(){ MobclickAgent.updateOnlineConfig(this); MobclickAgent.openActivityDurationTrack(false); // 检查反馈消息; FeedbackAgent agent = new FeedbackAgent(this); agent.sync(); }
Example 5
Source File: ActivitySetting.java From wakao-app with MIT License | 5 votes |
private void initView() { TextView tView = (TextView) findViewById(R.id.top_bar_title); ImageButton iButton = (ImageButton) findViewById(R.id.m_toggle); checkUpdate = (TextView) findViewById(R.id.checkUpdate); agent = new FeedbackAgent(this); agent.sync(); ac_desc = (TextView) findViewById(R.id.account_settings_desc); ac = (TextView) findViewById(R.id.account_name); cacheSize = (TextView) findViewById(R.id.cache_size); logout = (TextView) findViewById(R.id.logout); tView.setText("设置"); iButton.setVisibility(View.GONE); cacheSize.setText(AppTool.getCacheSize(this)); checkUpdate.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { // 如果想程序启动时自动检查是否需要更新, 把下面两行代码加在Activity 的onCreate()函数里。 com.umeng.common.Log.LOG = true; UmengUpdateAgent.setUpdateOnlyWifi(false); // 目前我们默认在Wi-Fi接入情况下才进行自动提醒。如需要在其他网络环境下进行更新自动提醒,则请添加该行代码 UmengUpdateAgent.setUpdateAutoPopup(false); UmengUpdateAgent.setUpdateListener(new MyUpdateListener(mContext)); UmengUpdateAgent.setDownloadListener(new UpdateDownloadListener(mContext)); UmengUpdateAgent.forceUpdate(mContext); } }); }
Example 6
Source File: MainActivity.java From zhangshangwuda with Apache License 2.0 | 5 votes |
private void init() { MainActivityActionbar = getSupportActionBar(); mFragmentManager = getSupportFragmentManager(); setDrawer(); initWeekTitle(); agent = new FeedbackAgent(this); agent.sync(); // MobclickAgent.setDebugMode(true); MobclickAgent.openActivityDurationTrack(false); UmengUpdateAgent.setUpdateOnlyWifi(false); UmengUpdateAgent.update(this); }
Example 7
Source File: AboutActivity.java From android-project-wo2b with Apache License 2.0 | 4 votes |
@Override protected void setDefaultValues() { mFeedbackAgent = new FeedbackAgent(this); mFeedbackAgent.sync(); }
Example 8
Source File: MainActivity.java From ONE-Unofficial with Apache License 2.0 | 4 votes |
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(); 启用推送在小米手机上会有崩溃发生 }