本文整理汇总了Java中com.umeng.analytics.AnalyticsConfig类的典型用法代码示例。如果您正苦于以下问题:Java AnalyticsConfig类的具体用法?Java AnalyticsConfig怎么用?Java AnalyticsConfig使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
AnalyticsConfig类属于com.umeng.analytics包,在下文中一共展示了AnalyticsConfig类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: a
import com.umeng.analytics.AnalyticsConfig; //导入依赖的package包/类
private String a(Context context) {
StringBuffer stringBuffer = new StringBuffer();
stringBuffer.append("Android");
stringBuffer.append("/");
stringBuffer.append(a.c);
stringBuffer.append(" ");
try {
StringBuffer stringBuffer2 = new StringBuffer();
stringBuffer2.append(bt.w(context));
stringBuffer2.append("/");
stringBuffer2.append(bt.d(context));
stringBuffer2.append(" ");
stringBuffer2.append(Build.MODEL);
stringBuffer2.append("/");
stringBuffer2.append(VERSION.RELEASE);
stringBuffer2.append(" ");
stringBuffer2.append(bu.a(AnalyticsConfig.getAppkey(context)));
stringBuffer.append(URLEncoder.encode(stringBuffer2.toString(), "UTF-8"));
} catch (Exception e) {
e.printStackTrace();
}
return stringBuffer.toString();
}
示例2: onResume
import com.umeng.analytics.AnalyticsConfig; //导入依赖的package包/类
protected void onResume() {
super.onResume();
BaseApplication.getInstance().startShake(getActivityName());
if (this.mRedPacketEntry != null) {
this.mRedPacketEntry.onResume();
}
if (mHomeKeyEventReceiver != null) {
mHomeKeyEventReceiver.setIsHomeClicked(false);
}
try {
if (LetvUtils.isAppOnForeground(this.mContext) && !isLoginStatatistics) {
isLoginStatatistics = true;
statisticsFirstLaunch();
}
IRMonitor.getInstance().onResume(this);
if (LetvConfig.isUmeng()) {
AnalyticsConfig.setChannel(LetvConfig.getUmengID());
MobclickAgent.onResume(this);
}
} catch (Exception e) {
LogInfo.LogStatistics("main activity on resume exception:" + e.getMessage());
} catch (OutOfMemoryError e2) {
BaseApplication.getInstance().onAppMemoryLow();
}
}
示例3: a
import com.umeng.analytics.AnalyticsConfig; //导入依赖的package包/类
private String a(Context context) {
StringBuffer stringBuffer = new StringBuffer();
stringBuffer.append("Android");
stringBuffer.append("/");
stringBuffer.append(a.c);
stringBuffer.append(" ");
try {
StringBuffer stringBuffer2 = new StringBuffer();
stringBuffer2.append(bt.x(context));
stringBuffer2.append("/");
stringBuffer2.append(bt.d(context));
stringBuffer2.append(" ");
stringBuffer2.append(Build.MODEL);
stringBuffer2.append("/");
stringBuffer2.append(VERSION.RELEASE);
stringBuffer2.append(" ");
stringBuffer2.append(bu.a(AnalyticsConfig.getAppkey(context)));
stringBuffer.append(URLEncoder.encode(stringBuffer2.toString(), "UTF-8"));
} catch (Exception e) {
e.printStackTrace();
}
return stringBuffer.toString();
}
示例4: init
import com.umeng.analytics.AnalyticsConfig; //导入依赖的package包/类
private void init() {
AnalyticsConfig.setChannel(AppUtils.getChannel(context));
DnspodFree.getIpWithHost(BooheeClient.getHost(BooheeClient.API));
DnspodFree.getIpWithHostNoCache(BooheeClient.getHost(BooheeClient.BH_ALL), false);
App.checkDB(context);
initBHLibrary();
FileCache.init(context);
PushManager.getInstance().initPush(context);
MultiImageHelper.initMultiSelctor();
ShareManager.init(context, "http://bohe-house.u.qiniudn.com/android/logo_256x256.png");
PatchHelper.init(getContext());
MeiQiaHelper.initSDK();
if (BleUtil.hasBleFeature(context)) {
QNApiManager.getApi(context).initSDK("bohe2016070708121217", true, new
QNResultCallback() {
public void onCompete(int i) {
}
});
}
}
示例5: initialized
import com.umeng.analytics.AnalyticsConfig; //导入依赖的package包/类
@Override
public void initialized() {
DebugUtil.e("initialized");
mSubscription = new CompositeSubscription();
String mPath = PreferenceManager.getInstance().getSplashImgPath();
if (TextUtils.isEmpty(mPath)) {
useDefaultImg();
} else {
Glide.with(ctx).load(mPath).crossFade().into(splashView.getBgView());
setAnimation(splashView.getBgView());
}
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) {
AnalyticsConfig.sEncrypt = true;
} else
MobclickAgent.enableEncrypt(true);
requestNewSplashImg();
}
示例6: onCreate
import com.umeng.analytics.AnalyticsConfig; //导入依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
//内存泄露检测
LeakCanary.install(this);
//pretty logger
Logger.init("MLAppLog").setLogLevel(LogLevel.FULL);
FIR.init(this);
// 如果没有使用PackerNg打包添加渠道,默认返回的是""
// com.mcxiaoke.packer.helper.PackerNg
final String market = PackerNg.getMarket(this);
// 或者使用 PackerNg.getMarket(Context,defaultValue)
// 之后就可以使用了,比如友盟可以这样设置
Logger.d("=====market:{%s}=====",market);
final String appkey = AnalyticsConfig.getAppkey(this);
MobclickAgent.UMAnalyticsConfig umAnalyticsConfig = new MobclickAgent.UMAnalyticsConfig(this,appkey,market, MobclickAgent.EScenarioType.E_UM_NORMAL);
MobclickAgent.startWithConfigure(umAnalyticsConfig);
MobclickAgent.setDebugMode(true);
}
示例7: onResume
import com.umeng.analytics.AnalyticsConfig; //导入依赖的package包/类
@Override
public void onResume() {
super.onResume();
String channel = AnalyticsConfig.getChannel(this);
Log.d(TAG, "onResume: "+channel);
ToastUtil.show(this, DeviceUtil.getIMEI(this));
getAppComponent().api().getWeather("hangzhou").subscribe(new Subscriber<RequestBody>() {
@Override
public void onCompleted() {
}
@Override
public void onError(Throwable e) {
}
@Override
public void onNext(RequestBody requestBody) {
Log.d(TAG, "onNext() called with: requestBody = [" + requestBody + "]");
}
});
}
示例8: 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();
}
示例9: d
import com.umeng.analytics.AnalyticsConfig; //导入依赖的package包/类
public void d(Context context)
{
SharedPreferences sharedpreferences = u.a(context);
if (sharedpreferences == null)
{
return;
}
if (sharedpreferences.getLong("a_start_time", 0L) == 0L && AnalyticsConfig.ACTIVITY_DURATION_OPEN)
{
bj.b("MobclickAgent", "onPause called before onResume");
return;
} else
{
long l = System.currentTimeMillis();
android.content.SharedPreferences.Editor editor = sharedpreferences.edit();
editor.putLong("a_start_time", 0L);
editor.putLong("a_end_time", l);
editor.putLong("session_end_time", l);
editor.commit();
return;
}
}
示例10: b
import com.umeng.analytics.AnalyticsConfig; //导入依赖的package包/类
private JSONObject b(Context context)
{
JSONObject jsonobject = new JSONObject();
try
{
jsonobject.put("type", "online_config");
jsonobject.put("appkey", AnalyticsConfig.getAppkey(context));
jsonobject.put("version_code", bi.c(context));
jsonobject.put("package", bi.u(context));
jsonobject.put("sdk_version", "5.2.4");
jsonobject.put("idmd5", bv.b(bi.f(context)));
jsonobject.put("channel", AnalyticsConfig.getChannel(context));
jsonobject.put("report_policy", com.umeng.analytics.g.a(context).a()[0]);
jsonobject.put("last_config_time", c(context));
}
catch (Exception exception)
{
bj.b("MobclickAgent", "exception in onlineConfigInternal");
return null;
}
return jsonobject;
}
示例11: f
import com.umeng.analytics.AnalyticsConfig; //导入依赖的package包/类
private boolean f() {
switch (this.j.c(-1)) {
case -1:
return AnalyticsConfig.sEncrypt;
case 1:
return true;
default:
return false;
}
}
示例12: a
import com.umeng.analytics.AnalyticsConfig; //导入依赖的package包/类
public void a(a aVar) {
this.g = aVar.a(1296000000);
int b = aVar.b(0);
if (b != 0) {
this.h = b;
} else if (AnalyticsConfig.sLatentWindow <= 0 || AnalyticsConfig.sLatentWindow > 1800000) {
this.h = 10000;
} else {
this.h = AnalyticsConfig.sLatentWindow;
}
}
示例13: b
import com.umeng.analytics.AnalyticsConfig; //导入依赖的package包/类
public String b(Context context) {
String f = bt.f(context);
String appkey = AnalyticsConfig.getAppkey(context);
long currentTimeMillis = System.currentTimeMillis();
if (appkey == null) {
throw new RuntimeException("Appkey is null or empty, Please check AndroidManifest.xml");
}
StringBuilder stringBuilder = new StringBuilder();
stringBuilder.append(currentTimeMillis).append(appkey).append(f);
g = bu.a(stringBuilder.toString());
return g;
}
示例14: d
import com.umeng.analytics.AnalyticsConfig; //导入依赖的package包/类
public void d(Context context) {
SharedPreferences a = x.a(context);
if (a != null) {
if (a.getLong("a_start_time", 0) == 0 && AnalyticsConfig.ACTIVITY_DURATION_OPEN) {
bv.f("onPause called before onResume");
return;
}
long currentTimeMillis = System.currentTimeMillis();
Editor edit = a.edit();
edit.putLong("a_start_time", 0);
edit.putLong("a_end_time", currentTimeMillis);
edit.putLong(b, currentTimeMillis);
edit.commit();
}
}
示例15: a
import com.umeng.analytics.AnalyticsConfig; //导入依赖的package包/类
private void a(Throwable th) {
if (AnalyticsConfig.CATCH_EXCEPTION) {
this.b.a(th);
} else {
this.b.a(null);
}
}