本文整理汇总了Java中com.karumi.dexter.Dexter.initialize方法的典型用法代码示例。如果您正苦于以下问题:Java Dexter.initialize方法的具体用法?Java Dexter.initialize怎么用?Java Dexter.initialize使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.karumi.dexter.Dexter
的用法示例。
在下文中一共展示了Dexter.initialize方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onCreate
import com.karumi.dexter.Dexter; //导入方法依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
Realm.init(this);
globalContext = this.getApplicationContext();
TwitterAuthConfig authConfig = new TwitterAuthConfig(getString(R.string.twitter_key),getString(R.string.twitter_secret));
Fabric.with(this, new Twitter(authConfig));
facebookInit();
FirebaseDatabase.getInstance().setPersistenceEnabled(true);
Stetho.initialize(
Stetho.newInitializerBuilder(this)
.enableDumpapp(Stetho.defaultDumperPluginsProvider(this))
.enableWebKitInspector(RealmInspectorModulesProvider.builder(this).build())
.build());
Dexter.initialize(this);
}
示例2: onCreate
import com.karumi.dexter.Dexter; //导入方法依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
sInstance = this;
FacebookSdk.sdkInitialize(getApplicationContext());
AppEventsLogger.activateApp(this);
OneSignal.startInit(this).setNotificationOpenedHandler(new MADBikeNotificationOpenedHandler(this)).init();
Branch.getAutoInstance(this);
Dexter.initialize(this);
}
示例3: onCreate
import com.karumi.dexter.Dexter; //导入方法依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
Realm.setDefaultConfiguration(new RealmConfiguration.Builder(this).build());
App.context = getApplicationContext();
Dexter.initialize(getApplicationContext());
DataController.ini(getApplicationContext());
}
示例4: onCreate
import com.karumi.dexter.Dexter; //导入方法依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
Timber.plant(new DebugTree());
Dexter.initialize(this);
}
示例5: onCreate
import com.karumi.dexter.Dexter; //导入方法依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
appContext = this;
Timber.plant(new Timber.DebugTree());
ToastHelper.init(this);
Dexter.initialize(this);
gson = new Gson();
preferenceUtils = new SharedPreferenceUtils(this);
handler = new Handler();
// CrashHandler.getInstance().init(this.getApplicationContext());
CrashReport.initCrashReport(getApplicationContext(), "900028744", BuildConfig.DEBUG);
initPush();
}
示例6: onCreate
import com.karumi.dexter.Dexter; //导入方法依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
if (!BuildConfig.DEBUG) {
Fabric.with(this, new Crashlytics());
}
appComponent = DaggerAppComponent.builder()
.appModule(new AppModule(this))
.build();
vkAccessTokenTracker.startTracking();
VKSdk.initialize(this);
Paper.init(this);
Dexter.initialize(this);
DrawerImageLoader.init(new AbstractDrawerImageLoader() {
@Override
public void set(ImageView imageView, Uri uri, Drawable placeholder, String tag) {
Glide.with(imageView.getContext())
.load(uri)
.into(imageView);
}
});
}
示例7: onCreate
import com.karumi.dexter.Dexter; //导入方法依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
Dexter.initialize(getApplicationContext());
sInstance = this;
}
示例8: onCreate
import com.karumi.dexter.Dexter; //导入方法依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
Dexter.initialize(this);
Timber.plant(new Timber.DebugTree());
}
示例9: onCreate
import com.karumi.dexter.Dexter; //导入方法依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
Timber.plant(new Timber.DebugTree());
Dexter.initialize(this);
}
示例10: onCreate
import com.karumi.dexter.Dexter; //导入方法依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
Crashlytics crashlyticsKit = new Crashlytics.Builder()
.core(new CrashlyticsCore.Builder().disabled(BuildConfig.DEBUG).build())
.build();
Fabric.with(this, crashlyticsKit, new CrashlyticsNdk());
Timber.plant(new CrashlyticsTree());
// Stash application context, then check to see if we need to restore things, and do so if necessary.
INSTANCE = this;
Realm.init(this);
BackupUtils.restoreRealmFileIfApplicable();
// Get global instances of certain classes.
this.prefs = new Prefs(PreferenceManager.getDefaultSharedPreferences(this));
this.d = new D(this);
// Set up EventBus to use the generated index.
EventBus.builder().addIndex(new EventBusIndex()).installDefaultEventBus();
// Init Dexter.
Dexter.initialize(this);
// Init Ruqus.
Ruqus.init(this);
// Do first time init if needed.
doFirstTimeInitIfNeeded();
// Set up default RealmConfiguration.
Realm.setDefaultConfiguration(new RealmConfiguration.Builder()
.name(REALM_FILE_NAME)
.schemaVersion(REALM_SCHEMA_VERSION)
.migration(new RealmMigrator())
.initialData(this::initialRealmData)
.build());
// Do init that requires Realm. This also serves the purpose of allowing us to check and see if a DB restore
// was successful (if one was performed).
try (Realm realm = Realm.getDefaultInstance()) {
// Initialize default unique ID factory.
UniqueIdFactory.getInstance().initializeDefault(realm);
// We got through Realm initialization, so we're good to delete the temporary Realm file that might exist
// if we just restored the Realm.
BackupUtils.removeTempRealmFile();
// Validate a few things now that we've successfully restored the Realm DB.
BackupUtils.doPostRestoreValidations(realm, prefs);
} catch (RealmFileException e) {
// We failed to open the restored Realm file, so try to roll back the changes.
BackupUtils.rollBackFromDBRestore();
// Try to do init again. If this still fails...well, I'm not really sure to be honest :(
try (Realm realm = Realm.getDefaultInstance()) {
// Initialize default unique ID factory.
UniqueIdFactory.getInstance().initializeDefault(realm);
}
}
// Trigger auto-import if needed.
if (prefs.isLibAutoImport(false)) Importer.get().queueFullImport();
// Send event to have MainActivity trigger "Rate Minerva" dialog if need be.
if (prefs.shouldShowRateMeDialog()) EventBus.getDefault().postSticky(new ShowRateMeDialogEvent());
}
示例11: onCreate
import com.karumi.dexter.Dexter; //导入方法依赖的package包/类
@Override public void onCreate() {
super.onCreate();
Dexter.initialize(this);
}
示例12: initDexter
import com.karumi.dexter.Dexter; //导入方法依赖的package包/类
private void initDexter() {
Dexter.initialize(this);
}
示例13: PermissionsModuleDexterImpl
import com.karumi.dexter.Dexter; //导入方法依赖的package包/类
public PermissionsModuleDexterImpl(Context mContext) {
this.mContext = mContext;
Dexter.initialize(mContext);
}
示例14: initialize
import com.karumi.dexter.Dexter; //导入方法依赖的package包/类
/**
* Initializes the Dexter library this manager uses
* @param c - The context in use, must not be null
*/
public void initialize( Context c ){
if ( c == null ) throw new IllegalArgumentException("The context must not be null!");
Dexter.initialize(c);
refreshContext(c);
}
示例15: AndroidPermissionCheckerImpl
import com.karumi.dexter.Dexter; //导入方法依赖的package包/类
public AndroidPermissionCheckerImpl(Context context, ContextProvider contextProvider) {
Dexter.initialize(context);
this.contextProvider = contextProvider;
}