本文整理汇总了Java中com.umeng.analytics.AnalyticsConfig.enableEncrypt方法的典型用法代码示例。如果您正苦于以下问题:Java AnalyticsConfig.enableEncrypt方法的具体用法?Java AnalyticsConfig.enableEncrypt怎么用?Java AnalyticsConfig.enableEncrypt使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.umeng.analytics.AnalyticsConfig
的用法示例。
在下文中一共展示了AnalyticsConfig.enableEncrypt方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onCreate
import com.umeng.analytics.AnalyticsConfig; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
PushAgent.getInstance(this).onAppStart();
setContentView(R.layout.activity_splash);
MobclickAgent.openActivityDurationTrack(true);
MobclickAgent.updateOnlineConfig(this);
AnalyticsConfig.enableEncrypt(true);
MobclickAgent.onEvent(this, "appSetUp");
ButterKnife.inject(this);
showGif();
if (mHandler == null) {
mHandler = new Handler();
}
loadToHome();
}
示例2: init
import com.umeng.analytics.AnalyticsConfig; //导入方法依赖的package包/类
public static void init(Context context, String appKey) {
AnalyticsConfig.setAppkey(appKey);
MobclickAgent.openActivityDurationTrack(false);
AnalyticsConfig.enableEncrypt(true);
/*if (sTracker == null) {
GoogleAnalytics analytics = GoogleAnalytics.getInstance(context);
// To enable debug logging use: adb shell setprop log.tag.GAv4 DEBUG
sTracker = analytics.newTracker(R.xml.global_tracker);
}*/
}
示例3: initYouMeng
import com.umeng.analytics.AnalyticsConfig; //导入方法依赖的package包/类
private void initYouMeng() {
AnalyticsConfig.enableEncrypt(true);
MobclickAgent.openActivityDurationTrack(false);
PushAgent mPushAgent = PushAgent.getInstance(this);
mPushAgent.onAppStart();
if (spUtil.getBoolean(Constants.IS_RECEIVE_PUSH, true)) {
mPushAgent.enable();
} else {
mPushAgent.disable();
}
}
示例4: initYouMeng
import com.umeng.analytics.AnalyticsConfig; //导入方法依赖的package包/类
private void initYouMeng() {
AnalyticsConfig.enableEncrypt(true);
MobclickAgent.openActivityDurationTrack(false);
PushAgent mPushAgent = PushAgent.getInstance(this);
mPushAgent.onAppStart();
if(spUtil.getBoolean(Constants.IS_RECEIVE_PUSH, true)) {
mPushAgent.enable();
} else {
mPushAgent.disable();
}
}
示例5: globalSetup
import com.umeng.analytics.AnalyticsConfig; //导入方法依赖的package包/类
private void globalSetup() {
//有Fragment,禁止默认的页面统计方式,不自动统计Activity
MobclickAgent.openActivityDurationTrack(false);
//发送策略
MobclickAgent.updateOnlineConfig(this);
//日志加密设置
AnalyticsConfig.enableEncrypt(true);
//友盟自动更新
UmengUpdateAgent.update(this);
//set preferences' default values
PreferenceManager.setDefaultValues(this, R.xml.preferences, false);
}
示例6: umengConfig
import com.umeng.analytics.AnalyticsConfig; //导入方法依赖的package包/类
/**
* 友盟配置
*/
private void umengConfig() {
MobclickAgent.openActivityDurationTrack(false); // 禁止默认的页面统计方式
/** 设置是否对日志信息进行加密, 默认false(不加密). */
AnalyticsConfig.enableEncrypt(true);
}
示例7: enableEncrypt
import com.umeng.analytics.AnalyticsConfig; //导入方法依赖的package包/类
public static void enableEncrypt(boolean enable) {
AnalyticsConfig.enableEncrypt(enable);
}
示例8: setUmeng
import com.umeng.analytics.AnalyticsConfig; //导入方法依赖的package包/类
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(); 启用推送在小米手机上会有崩溃发生
}
示例9: onCreate
import com.umeng.analytics.AnalyticsConfig; //导入方法依赖的package包/类
@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;
}