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


Java Fabric类代码示例

本文整理汇总了Java中io.fabric.sdk.android.Fabric的典型用法代码示例。如果您正苦于以下问题:Java Fabric类的具体用法?Java Fabric怎么用?Java Fabric使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Fabric类属于io.fabric.sdk.android包,在下文中一共展示了Fabric类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onCreate

import io.fabric.sdk.android.Fabric; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    Fabric.with(this, new Crashlytics());
    setContentView(R.layout.activity_splash);

    new Handler().postDelayed(new Runnable() {

        /*
         * Showing splash screen with a timer. This will be useful when you
         * want to show case your app logo / company
         */

        @Override
        public void run() {
            // This method will be executed once the timer is over
            // Start your app main activity
            Intent i = new Intent(SplashActivity.this, MainActivity.class);
            startActivity(i);

            // close this activity
            finish();
        }
    }, SPLASH_TIME_OUT);
}
 
开发者ID:spritlesoftware,项目名称:low-battery-alert,代码行数:26,代码来源:SplashActivity.java

示例2: onCreate

import io.fabric.sdk.android.Fabric; //导入依赖的package包/类
@Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        Fabric.with(this, new Crashlytics());

        HomeViewModel viewModel = new HomeViewModel();
        viewModel.carregarPagamentosFromString(ServicoBoleto.buscarPagamentos(this));

        ActivityHomeBinding binding = DataBindingUtil.setContentView(this, R.layout.activity_home);
        binding.setHomeVModel(viewModel);

        Toolbar toolbar = binding.toolbar;
        setSupportActionBar(toolbar);

        requestCameraPermission();

        FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
        fab.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {

                startActivity(new Intent(HomeActivity.this, LerCodigoBarrasActivity.class));
//                Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG)
//                        .setAction("Action", null).show();
            }
        });

    }
 
开发者ID:ViniciusSossela,项目名称:meuboleto,代码行数:29,代码来源:HomeActivity.java

示例3: onCreate

import io.fabric.sdk.android.Fabric; //导入依赖的package包/类
@Override
public void onCreate() {
	super.onCreate();
	Fabric.with(this, new Crashlytics());

	injector =
			DaggerMobSoftApplicationComponent.builder().
					uIModule(
							new UIModule(this)
					).build();


	injector.inject(this);
	repository.open(getApplicationContext());
}
 
开发者ID:bpatrik,项目名称:mobsoft-lab,代码行数:16,代码来源:MobSoftApplication.java

示例4: onCreate

import io.fabric.sdk.android.Fabric; //导入依赖的package包/类
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    Fabric.with(this, new Crashlytics());
    setContentView(R.layout.activity_opponents);

    initFields();

    initDefaultActionBar();

    initUi();

    startLoadUsers();

    if (isRunForCall && webRtcSessionManager.getCurrentSession() != null) {
        CallActivity.start(OpponentsActivity.this, true);
    }

    checker = new PermissionsChecker(getApplicationContext());
}
 
开发者ID:mobilemaster128,项目名称:quickblox-android,代码行数:21,代码来源:OpponentsActivity.java

示例5: onCreate

import io.fabric.sdk.android.Fabric; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    Fabric.with(this, new Crashlytics());
    setContentView(R.layout.activity_registration);
    auth = FirebaseAuth.getInstance();
    appStatus=new AppStatus(getApplicationContext());
    register = (Button) findViewById(R.id.btn_register);
    existinguser = (Button) findViewById(R.id.existinguser);
    edt_Password = (EditText) findViewById(R.id.edt_Rpassword);
    edt_RePassword = (EditText) findViewById(R.id.edt_RRepassword);
    edt_Email = (EditText) findViewById(R.id.edt_email);
    progressBar=(ProgressBar)findViewById(R.id.progressBar);
    register.setOnClickListener(this);
    existinguser.setOnClickListener(this);
}
 
开发者ID:Pritom14,项目名称:Password-Storage,代码行数:17,代码来源:RegistrationActivity.java

示例6: onCreate

import io.fabric.sdk.android.Fabric; //导入依赖的package包/类
@Override
    public void onCreate() {
        super.onCreate();
        if (BuildConfig.CRASH_REPORTS) {
            Fabric.with(this, new Crashlytics());
        }

        INSTANCE = this;

//        if(LeakCanary.isInAnalyzerProcess(this))
//            return;
//        LeakCanary.install(this);
        FacebookSdk.sdkInitialize(getApplicationContext());

        AppEventsLogger.activateApp(this);
        UserToken.getInstance().initSharedPreferences(this);

    }
 
开发者ID:ukevgen,项目名称:BizareChat,代码行数:19,代码来源:BizareChatApp.java

示例7: getApiKeyFromManifest

import io.fabric.sdk.android.Fabric; //导入依赖的package包/类
protected String getApiKeyFromManifest(Context context) {
    String apiKey = null;
    try {
        Bundle bundle = context.getPackageManager().getApplicationInfo(context.getPackageName(), 128).metaData;
        if (bundle != null) {
            apiKey = bundle.getString(FABRIC_API_KEY);
            if (apiKey == null) {
                Fabric.getLogger().d(Fabric.TAG, "Falling back to Crashlytics key lookup from Manifest");
                apiKey = bundle.getString(CRASHLYTICS_API_KEY);
            }
        }
    } catch (Exception e) {
        Fabric.getLogger().d(Fabric.TAG, "Caught non-fatal exception while retrieving apiKey: " + e);
    }
    return apiKey;
}
 
开发者ID:JackChan1999,项目名称:letv,代码行数:17,代码来源:ApiKey.java

示例8: onCreate

import io.fabric.sdk.android.Fabric; //导入依赖的package包/类
@Override
public void onCreate() {
    super.onCreate();
    singleton = this;

    TwitterAuthConfig authConfig = new TwitterAuthConfig(TWITTER_KEY, TWITTER_SECRET);
    Fabric.with(this, new Twitter(authConfig));

    Stetho.initializeWithDefaults(this);
}
 
开发者ID:beraldofilippo,项目名称:TWStreaming,代码行数:11,代码来源:App.java

示例9: IdManager

import io.fabric.sdk.android.Fabric; //导入依赖的package包/类
public IdManager(Context appContext, String appIdentifier, String appInstallIdentifier, Collection<Kit> kits) {
    if (appContext == null) {
        throw new IllegalArgumentException("appContext must not be null");
    } else if (appIdentifier == null) {
        throw new IllegalArgumentException("appIdentifier must not be null");
    } else if (kits == null) {
        throw new IllegalArgumentException("kits must not be null");
    } else {
        this.appContext = appContext;
        this.appIdentifier = appIdentifier;
        this.appInstallIdentifier = appInstallIdentifier;
        this.kits = kits;
        this.installerPackageNameProvider = new InstallerPackageNameProvider();
        this.advertisingInfoProvider = new AdvertisingInfoProvider(appContext);
        this.collectHardwareIds = CommonUtils.getBooleanResourceValue(appContext, COLLECT_DEVICE_IDENTIFIERS, true);
        if (!this.collectHardwareIds) {
            Fabric.getLogger().d(Fabric.TAG, "Device ID collection disabled for " + appContext.getPackageName());
        }
        this.collectUserIds = CommonUtils.getBooleanResourceValue(appContext, COLLECT_USER_IDENTIFIERS, true);
        if (!this.collectUserIds) {
            Fabric.getLogger().d(Fabric.TAG, "User information collection disabled for " + appContext.getPackageName());
        }
    }
}
 
开发者ID:JackChan1999,项目名称:letv,代码行数:25,代码来源:IdManager.java

示例10: onCreate

import io.fabric.sdk.android.Fabric; //导入依赖的package包/类
@Override
    public void onCreate() {
        super.onCreate();
        Fabric.with(this, new Crashlytics());
        Realm.init(this);
        RealmConfiguration config = new RealmConfiguration.Builder()
                .deleteRealmIfMigrationNeeded().
                        build();
        Realm.setDefaultConfiguration(config);
        FontsOverride.setDefaultFont(this, "DEFAULT", "fonts/questrial_regular.ttf");
//        FontsOverride.setDefaultFont(this, "MONOSPACE", "fonts/quicksand_bold.ttf");
        FontsOverride.setDefaultFont(this, "SERIF", "fonts/quicksand_regular.ttf");
        FontsOverride.setDefaultFont(this, "serif", "fonts/quicksand_regular.ttf");
        FontsOverride.setDefaultFont(this, "arial", "fonts/quicksand_regular.ttf");
//        FontsOverride.setDefaultFont(this, "monospace", "fonts/quicksand_bold.ttf");
        FontsOverride.setDefaultFont(this, "SANS_SERIF", "fonts/quicksand_bold.ttf");

        Logger.d("tokenized");
        try {
            Logger.d(FirebaseInstanceId.getInstance().getToken());
            setUser();
        }catch (Exception e){
            e.printStackTrace();
        }

    }
 
开发者ID:nyangate,项目名称:Crypto-Assistant,代码行数:27,代码来源:CryptoAssistant.java

示例11: onCreate

import io.fabric.sdk.android.Fabric; //导入依赖的package包/类
@Override
public void onCreate() {
    super.onCreate();
    Fabric.with(this, new Crashlytics());

    if (BuildConfig.DEBUG) {
        StrictMode.enableDefaults();

        Stetho.initialize(Stetho.newInitializerBuilder(this)
                .enableDumpapp(Stetho.defaultDumperPluginsProvider(this))
                .enableWebKitInspector(RealmInspectorModulesProvider.builder(this).build())
                .build());
    }

    Realm.init(this);
}
 
开发者ID:adithya321,项目名称:Instincts-2k17,代码行数:17,代码来源:InstinctsApplication.java

示例12: onCreate

import io.fabric.sdk.android.Fabric; //导入依赖的package包/类
@Override
public void onCreate() {
    super.onCreate();
    Fabric.with(this, new Crashlytics());

    Prefs.initPrefs(this);

    if (BuildConfig.DEBUG) {
        Stetho.initializeWithDefaults(this);
    }

    FirebaseAnalytics analytics = FirebaseAnalytics.getInstance(this);

    _myComponent = DaggerMyComponent.builder()
            .myModule(new MyModule(this, analytics))
            .build();

}
 
开发者ID:StephanBezoen,项目名称:tumblrlikes,代码行数:19,代码来源:LikesApplication.java

示例13: onCreate

import io.fabric.sdk.android.Fabric; //导入依赖的package包/类
@Override
public void onCreate() {
    super.onCreate();
    TallyStackerApplication.instance = this;
    JodaTimeAndroid.init(this);
    Fabric.with(this, new Crashlytics());
    Fabric.with(this, new Answers());
    Stetho.initializeWithDefaults(this);
    // Setup handler for uncaught exceptions.
    Thread.setDefaultUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() {
        @Override
        public void uncaughtException(Thread thread, Throwable e) {
            if (!(e instanceof ExpectedElementNotFound))
                handleUncaughtException(e);
        }
    });
}
 
开发者ID:riteshakya037,项目名称:Android-Scrapper,代码行数:18,代码来源:TallyStackerApplication.java

示例14: onCreate

import io.fabric.sdk.android.Fabric; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    Fabric.with(this, new Crashlytics());
    setContentView(R.layout.activity_base);
    Realm.init(this);
    Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
    setSupportActionBar(toolbar);
    ActionBar actionBar = getSupportActionBar();
    actionBar.setTitle("MultiCopy");


    // Create the adapter that will return a fragment for each of the three
    // primary sections of the activity.
    mSectionsPagerAdapter = new SectionsPagerAdapter(getSupportFragmentManager());

    // Set up the ViewPager with the sections adapter.
    mViewPager = (ViewPager) findViewById(R.id.container);
    mViewPager.setAdapter(mSectionsPagerAdapter);

    TabLayout tabLayout = (TabLayout) findViewById(R.id.tabs);
    tabLayout.setupWithViewPager(mViewPager);

}
 
开发者ID:Rishabhk07,项目名称:multi-copy,代码行数:25,代码来源:BaseActivity.java

示例15: logExceptionToFabric

import io.fabric.sdk.android.Fabric; //导入依赖的package包/类
public static void logExceptionToFabric(Throwable ex, String tag) {

        if (ex == null) {
            return;
        }

        try {
            ex.printStackTrace();
        } catch (StackOverflowError ignored) {
            Crashlytics.log("StackOverflowError in Logger " + ignored);
            return;
        }

        if (Fabric.isInitialized() && !TextUtils.isEmpty(ex.getMessage())) {
            Crashlytics.logException(ex);
        }
    }
 
开发者ID:ukevgen,项目名称:BizareChat,代码行数:18,代码来源:Logger.java


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