Search in sources :

Example 6 with FontAwesomeModule

use of com.joanzapata.iconify.fonts.FontAwesomeModule in project edx-app-android by edx.

the class TestApplication method onCreate.

@Override
public void onCreate() {
    // Register Font Awesome module in android-iconify library
    Iconify.with(new FontAwesomeModule());
    application = this;
}
Also used : FontAwesomeModule(com.joanzapata.iconify.fonts.FontAwesomeModule)

Example 7 with FontAwesomeModule

use of com.joanzapata.iconify.fonts.FontAwesomeModule in project edx-app-android by edx.

the class MainApplication method init.

/**
 * Initializes the request manager, image cache,
 * all third party integrations and shared components.
 */
private void init() {
    application = this;
    injector = RoboGuice.getOrCreateBaseApplicationInjector((Application) this, RoboGuice.DEFAULT_STAGE, (Module) RoboGuice.newDefaultRoboModule(this), (Module) new EdxDefaultModule(this));
    injector.injectMembers(this);
    // initialize Fabric
    if (config.getFabricConfig().isEnabled() && !BuildConfig.DEBUG) {
        Fabric.with(this, config.getFabricConfig().getKitsConfig().getEnabledKits());
        if (config.getFabricConfig().getKitsConfig().isCrashlyticsEnabled()) {
            EventBus.getDefault().register(new CrashlyticsCrashReportObserver());
        }
        if (config.getFabricConfig().getKitsConfig().isAnswersEnabled()) {
            analyticsRegistry.addAnalyticsProvider(injector.getInstance(AnswersAnalytics.class));
        }
    }
    if (config.getNewRelicConfig().isEnabled()) {
        EventBus.getDefault().register(new NewRelicObserver());
    }
    // initialize NewRelic with crash reporting disabled
    if (config.getNewRelicConfig().isEnabled()) {
        // Crash reporting for new relic has been disabled
        NewRelic.withApplicationToken(config.getNewRelicConfig().getNewRelicKey()).withCrashReportingEnabled(false).start(this);
    }
    // Add Segment as an analytics provider if enabled in the config
    if (config.getSegmentConfig().isEnabled()) {
        analyticsRegistry.addAnalyticsProvider(injector.getInstance(SegmentAnalytics.class));
    }
    // Add Firebase as an analytics provider if enabled in the config
    if (config.isFirebaseEnabled()) {
        analyticsRegistry.addAnalyticsProvider(injector.getInstance(FirebaseAnalytics.class));
    }
    registerReceiver(new NetworkConnectivityReceiver(), new IntentFilter(ConnectivityManager.CONNECTIVITY_ACTION));
    registerReceiver(new NetworkConnectivityReceiver(), new IntentFilter(WifiManager.WIFI_STATE_CHANGED_ACTION));
    // initialize Facebook SDK
    boolean isOnZeroRatedNetwork = NetworkUtil.isOnZeroRatedNetwork(getApplicationContext(), config);
    if (!isOnZeroRatedNetwork && config.getFacebookConfig().isEnabled()) {
        com.facebook.Settings.setApplicationId(config.getFacebookConfig().getFacebookAppId());
    }
    checkIfAppVersionUpgraded(this);
    // Register Font Awesome module in android-iconify library
    Iconify.with(new FontAwesomeModule());
    CalligraphyConfig.initDefault(new CalligraphyConfig.Builder().setDefaultFontPath("fonts/OpenSans-Regular.ttf").setFontAttrId(R.attr.fontPath).build());
    // Init Branch
    if (Config.FabricBranchConfig.isBranchEnabled(config.getFabricConfig())) {
        Branch.getAutoInstance(this);
    }
}
Also used : IntentFilter(android.content.IntentFilter) EdxDefaultModule(org.edx.mobile.core.EdxDefaultModule) FirebaseAnalytics(org.edx.mobile.module.analytics.FirebaseAnalytics) FontAwesomeModule(com.joanzapata.iconify.fonts.FontAwesomeModule) Module(com.google.inject.Module) FontAwesomeModule(com.joanzapata.iconify.fonts.FontAwesomeModule) EdxDefaultModule(org.edx.mobile.core.EdxDefaultModule) MultiDexApplication(android.support.multidex.MultiDexApplication) Application(android.app.Application) AnswersAnalytics(org.edx.mobile.module.analytics.AnswersAnalytics) SegmentAnalytics(org.edx.mobile.module.analytics.SegmentAnalytics) NetworkConnectivityReceiver(org.edx.mobile.receivers.NetworkConnectivityReceiver)

Aggregations

FontAwesomeModule (com.joanzapata.iconify.fonts.FontAwesomeModule)7 IoniconsModule (com.joanzapata.iconify.fonts.IoniconsModule)2 MaterialModule (com.joanzapata.iconify.fonts.MaterialModule)2 Application (android.app.Application)1 IntentFilter (android.content.IntentFilter)1 StrictMode (android.os.StrictMode)1 MultiDexApplication (android.support.multidex.MultiDexApplication)1 Crashlytics (com.crashlytics.android.Crashlytics)1 AppModule (com.github.vase4kin.teamcityapp.dagger.modules.AppModule)1 Module (com.google.inject.Module)1 MaterialCommunityModule (com.joanzapata.iconify.fonts.MaterialCommunityModule)1 ApCoreEventBusIndex (de.danoeh.antennapod.core.ApCoreEventBusIndex)1 CrashReportWriter (de.danoeh.antennapod.error.CrashReportWriter)1 EdxDefaultModule (org.edx.mobile.core.EdxDefaultModule)1 AnswersAnalytics (org.edx.mobile.module.analytics.AnswersAnalytics)1 FirebaseAnalytics (org.edx.mobile.module.analytics.FirebaseAnalytics)1 SegmentAnalytics (org.edx.mobile.module.analytics.SegmentAnalytics)1 NetworkConnectivityReceiver (org.edx.mobile.receivers.NetworkConnectivityReceiver)1