本文整理汇总了Java中com.adjust.sdk.Adjust类的典型用法代码示例。如果您正苦于以下问题:Java Adjust类的具体用法?Java Adjust怎么用?Java Adjust使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Adjust类属于com.adjust.sdk包,在下文中一共展示了Adjust类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setupAdjustIfNeeded
import com.adjust.sdk.Adjust; //导入依赖的package包/类
public static void setupAdjustIfNeeded(FocusApplication application) {
// RELEASE: Enable Adjust - This class has different implementations for all build types.
//noinspection ConstantConditions
if (TextUtils.isEmpty(BuildConfig.ADJUST_TOKEN)) {
throw new IllegalStateException("No adjust token defined for release build");
}
if (!TelemetryWrapper.isTelemetryEnabled(application)) {
return;
}
final AdjustConfig config = new AdjustConfig(application,
BuildConfig.ADJUST_TOKEN,
AdjustConfig.ENVIRONMENT_PRODUCTION,
true);
config.setLogLevel(LogLevel.SUPRESS);
Adjust.onCreate(config);
application.registerActivityLifecycleCallbacks(new AdjustLifecycleCallbacks());
}
示例2: onCreate
import com.adjust.sdk.Adjust; //导入依赖的package包/类
public void onCreate(final Context context, final String maybeAppToken) {
final String environment;
final String appToken;
final LogLevel logLevel;
if (maybeAppToken != null) {
environment = AdjustConfig.ENVIRONMENT_PRODUCTION;
appToken = maybeAppToken;
logLevel = LogLevel.WARN;
} else {
environment = AdjustConfig.ENVIRONMENT_SANDBOX;
appToken = "ABCDEFGHIJKL";
logLevel = LogLevel.VERBOSE;
}
AdjustConfig config = new AdjustConfig(context, appToken, environment);
config.setLogLevel(logLevel);
Adjust.onCreate(config);
}
示例3: onCreate
import com.adjust.sdk.Adjust; //导入依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
String appToken = getTokenFromMetaData();
if (appToken == null) {
return;
}
String environment = AdjustConfig.ENVIRONMENT_PRODUCTION;
AdjustConfig config = new AdjustConfig(this, appToken, environment);
Adjust.onCreate(config);
registerActivityLifecycleCallbacks(new AdjustLifecycleCallbacks());
}
示例4: onActivityResumed
import com.adjust.sdk.Adjust; //导入依赖的package包/类
@Override
public void onActivityResumed(Activity activity) {
Adjust.onResume();
}
示例5: onActivityPaused
import com.adjust.sdk.Adjust; //导入依赖的package包/类
@Override
public void onActivityPaused(Activity activity) {
Adjust.onPause();
}
示例6: onActivityResumed
import com.adjust.sdk.Adjust; //导入依赖的package包/类
@Override
public void onActivityResumed(Activity activity) {
Adjust.onResume();
}
示例7: onActivityPaused
import com.adjust.sdk.Adjust; //导入依赖的package包/类
@Override
public void onActivityPaused(Activity activity) {
Adjust.onPause();
}