当前位置: 首页>>代码示例>>Java>>正文


Java Dexter.initialize方法代码示例

本文整理汇总了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);
}
 
开发者ID:scott7462,项目名称:Udacity-Capstone-Project,代码行数:17,代码来源:App.java

示例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);
}
 
开发者ID:Mun0n,项目名称:MADBike,代码行数:11,代码来源:MADBikeApplication.java

示例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());

}
 
开发者ID:bvblogic,项目名称:Mediator_Android,代码行数:10,代码来源:App.java

示例4: onCreate

import com.karumi.dexter.Dexter; //导入方法依赖的package包/类
@Override
public void onCreate() {
    super.onCreate();

    Timber.plant(new DebugTree());
    Dexter.initialize(this);
}
 
开发者ID:dotWee,项目名称:ShareCrypter,代码行数:8,代码来源:ShareCrypterApplication.java

示例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();
    }
 
开发者ID:klisly,项目名称:fingerpoetry-android,代码行数:16,代码来源:BookBoxApplication.java

示例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);
        }
    });
}
 
开发者ID:Mavamaarten,项目名称:vk_music_android,代码行数:28,代码来源:VkApplication.java

示例7: onCreate

import com.karumi.dexter.Dexter; //导入方法依赖的package包/类
@Override
public void onCreate() {
    super.onCreate();
    Dexter.initialize(getApplicationContext());
    sInstance = this;
}
 
开发者ID:adithya321,项目名称:SOS-The-Healthcare-Companion,代码行数:7,代码来源:MyApplication.java

示例8: onCreate

import com.karumi.dexter.Dexter; //导入方法依赖的package包/类
@Override
public void onCreate() {
    super.onCreate();
    Dexter.initialize(this);
    Timber.plant(new Timber.DebugTree());
}
 
开发者ID:fzymek,项目名称:FunWithAndroid,代码行数:7,代码来源:AppListerApplication.java

示例9: onCreate

import com.karumi.dexter.Dexter; //导入方法依赖的package包/类
@Override
public void onCreate() {
    super.onCreate();
    Timber.plant(new Timber.DebugTree());
    Dexter.initialize(this);
}
 
开发者ID:fzymek,项目名称:FunWithAndroid,代码行数:7,代码来源:PermissionsApplication.java

示例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());
}
 
开发者ID:bkromhout,项目名称:Minerva,代码行数:63,代码来源:Minerva.java

示例11: onCreate

import com.karumi.dexter.Dexter; //导入方法依赖的package包/类
@Override public void onCreate() {
  super.onCreate();
  Dexter.initialize(this);
}
 
开发者ID:longtaoge,项目名称:Dexter,代码行数:5,代码来源:SampleApplication.java

示例12: initDexter

import com.karumi.dexter.Dexter; //导入方法依赖的package包/类
private void initDexter() {
    Dexter.initialize(this);
}
 
开发者ID:rulo7,项目名称:dan-console,代码行数:4,代码来源:AndroidApplication.java

示例13: PermissionsModuleDexterImpl

import com.karumi.dexter.Dexter; //导入方法依赖的package包/类
public PermissionsModuleDexterImpl(Context mContext) {
    this.mContext = mContext;
    Dexter.initialize(mContext);
}
 
开发者ID:willylatorre,项目名称:restaurand,代码行数:5,代码来源:PermissionsModuleDexterImpl.java

示例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);
}
 
开发者ID:pylapp,项目名称:SmoothClicker,代码行数:10,代码来源:PermissionsManager.java

示例15: AndroidPermissionCheckerImpl

import com.karumi.dexter.Dexter; //导入方法依赖的package包/类
public AndroidPermissionCheckerImpl(Context context, ContextProvider contextProvider) {
  Dexter.initialize(context);
  this.contextProvider = contextProvider;
}
 
开发者ID:Gigigo-Android-Devs,项目名称:gigigo-utils-suite,代码行数:5,代码来源:AndroidPermissionCheckerImpl.java


注:本文中的com.karumi.dexter.Dexter.initialize方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。