本文整理汇总了Java中jonathanfinerty.once.Once.initialise方法的典型用法代码示例。如果您正苦于以下问题:Java Once.initialise方法的具体用法?Java Once.initialise怎么用?Java Once.initialise使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类jonathanfinerty.once.Once
的用法示例。
在下文中一共展示了Once.initialise方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onCreate
import jonathanfinerty.once.Once; //导入方法依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
// Install Timber
if (BuildConfig.DEBUG) {
Timber.plant(new Timber.DebugTree());
}
Once.initialise(this);
screenShotNotifications = new ScreenShotNotifications(this);
Observable.just(true)
.subscribeOn(AndroidSchedulers.mainThread())
.subscribe(new Action1<Boolean>() {
@Override
public void call(Boolean aBoolean) {
initializeResources();
}
});
}
示例2: onCreate
import jonathanfinerty.once.Once; //导入方法依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
if (BuildConfig.DEBUG) {
StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder()
.detectAll()
.penaltyLog()
.penaltyDeath()
.build());
StrictMode.setVmPolicy(new StrictMode.VmPolicy.Builder()
.detectAll()
.penaltyLog()
.penaltyDeath()
.build());
}
Once.initialise(this);
}
示例3: onCreate
import jonathanfinerty.once.Once; //导入方法依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
Analytics.setup(this);
Once.initialise(this);
Inject.using(new DefaultDependencyFactory(this));
if (BuildConfig.DEBUG)
Timber.plant(new Timber.DebugTree());
else
Timber.plant(new Analytics.YandexMeticaTree());
}
示例4: onCreate
import jonathanfinerty.once.Once; //导入方法依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
sDb = LiteOrm.newSingleInstance(this, DB_NAME);
sContext = this;
Once.initialise(this);
Logger.init("AppPlusLog").setLogLevel(BuildConfig.IS_DEBUG?LogLevel.FULL:LogLevel.NONE);
sDb.setDebugged(BuildConfig.IS_DEBUG);
}
示例5: onCreate
import jonathanfinerty.once.Once; //导入方法依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
CalligraphyConfig.initDefault(new CalligraphyConfig.Builder()
.setDefaultFontPath("fonts/GothamRnd-Book.otf")
.setFontAttrId(R.attr.fontPath)
.build());
mCheckoutInternal = new CheckoutInternal(this, Products.create().add(ProductTypes.IN_APP,
IabProducts.PRODUCT_LIST));
Once.initialise(this);
}
示例6: onCreate
import jonathanfinerty.once.Once; //导入方法依赖的package包/类
public void onCreate() {
super.onCreate();
sContext = this;
Once.initialise(this);
initRongIM();
ImageHelper.initImageLoader(getApplicationContext());
SmsSdkHelper.initSmsSDK(getApplicationContext());
if ("com.cuitrip.service".equals(getCurProcessName(getApplicationContext())) ||
"io.rong.push".equals(getCurProcessName(getApplicationContext()))) {
initRongIM();
/**
* 融云SDK事件监听处理
*
* 注册相关代码,只需要在主进程里做。
*/
if ("com.cuitrip.service".equals(getCurProcessName(getApplicationContext()))) {
initRongImCallback();
// RongCloudEvent.init(this);
// DemoContext.init(this);
// Thread.setDefaultUncaughtExceptionHandler(new RongExceptionHandler(this));
// try {
// RongIM.registerMessageType(DeAgreedFriendRequestMessage.class);
// RongIM.registerMessageTemplate(new DeContactNotificationMessageProvider());
//// RongIM.registerMessageTemplate(new DeAgreedFriendRequestMessageProvider());
//
// } catch (Exception e) {
// e.printStackTrace();
// }
}
}
init();
initStictMode();
}
示例7: onCreate
import jonathanfinerty.once.Once; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Once.initialise(getApplicationContext());
if (!Once.beenDone(KEY)) {
Once.toDo(KEY);
}
if (!Once.beenDone(KEY2)) {
Once.toDo(KEY2);
}
}
示例8: onCreate
import jonathanfinerty.once.Once; //导入方法依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
//Bad static initializers.
SugarContext.init(this);
Once.initialise(this);
Hawk.init(this)
.setEncryptionMethod(HawkBuilder.EncryptionMethod.NO_ENCRYPTION)
.setStorage(HawkBuilder.newSqliteStorage(this))
.setLogLevel(LogLevel.FULL)
.build();
vaporAppComponent = VaporAppComponent.Initializer.init(this);
uiComponent = DaggerUiComponent.builder()
.vaporAppComponent(vaporAppComponent)
.build();
vaporAppComponent.inject(this);
registerBus();
initStetho();
if (BuildConfig.DEBUG) {
//When debugging logs will go through the Android logger
Timber.plant(new Timber.DebugTree());
StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder()
.detectCustomSlowCalls()
.detectDiskReads()
.detectDiskWrites()
.penaltyLog()
.build());
StrictMode.setVmPolicy(new StrictMode.VmPolicy.Builder()
.detectActivityLeaks()
.penaltyLog()
.build());
}
Thread.setDefaultUncaughtExceptionHandler(new CrashHandler(this));
}