當前位置: 首頁>>代碼示例>>Java>>正文


Java Fabric.with方法代碼示例

本文整理匯總了Java中io.fabric.sdk.android.Fabric.with方法的典型用法代碼示例。如果您正苦於以下問題:Java Fabric.with方法的具體用法?Java Fabric.with怎麽用?Java Fabric.with使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在io.fabric.sdk.android.Fabric的用法示例。


在下文中一共展示了Fabric.with方法的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
public void onCreate(Bundle savedInstanceState) {
	super.onCreate(savedInstanceState);
	Fabric.with(this, new Crashlytics());
	setContentView(R.layout.activity_device_list);

	ActionBar bar = getSupportActionBar();
	if (bar != null) {
		bar.setDisplayHomeAsUpEnabled(true);
	}

	this.deviceList = findViewById(R.id.listView);

	try {
		btScanner = new BluetoothScanner(this);
	} catch (BluetoothNotSupportedException e) {
		Toast.makeText(this, R.string.error_bluetooth_not_supported, Toast.LENGTH_SHORT).show();
		finish();
	}
}
 
開發者ID:Make-A-Pede,項目名稱:Make-A-Pede-Android-App,代碼行數:21,代碼來源:DeviceListActivity.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() {
    super.onCreate();

    //Fabric initialization for Crashlytics
    Fabric.with(this, new Crashlytics());

    //create component
    mAppComponent = DaggerAppComponent.builder()
            .utilsModule(new UtilsModule(this)).build();

    //configure timber for logging
    if (BuildConfig.DEBUG) {
        Timber.plant(new Timber.DebugTree());
    }

    //calligraphy for fonts
    CalligraphyConfig.initDefault(new CalligraphyConfig.Builder()
            .setDefaultFontPath("fonts/Roboto-Regular.ttf")
            .setFontAttrId(R.attr.fontPath)
            .build());
}
 
開發者ID:SoftprodigyIndia,項目名稱:AndroidAppBoilerplate,代碼行數:23,代碼來源:SampleApplication.java

示例5: onCreate

import io.fabric.sdk.android.Fabric; //導入方法依賴的package包/類
@Override
public void onCreate() {
	super.onCreate();
	initCastFunctionality();

	if (!BuildConfig.DEBUG) {
		try {
			Fabric.with(this, new Crashlytics());

			final Fabric fabric = new Fabric.Builder(this)
					.kits(new Crashlytics())
					.debuggable(true)
					.build();
			Fabric.with(fabric);

		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}
 
開發者ID:SebastianRask,項目名稱:Pocket-Plays-for-Twitch,代碼行數:21,代碼來源:PocketPlaysApplication.java

示例6: 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

示例7: 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

示例8: setup

import io.fabric.sdk.android.Fabric; //導入方法依賴的package包/類
public static void setup(Application application){

        //Setup Fabric
        Fabric.with(application, new Crashlytics());

        //Setup amplitude
        Amplitude.getInstance().initialize(application, BuildConfig.AMPLITUDE_SDK).enableForegroundTracking(application);

        //Setup Facebook
        FacebookSdk.sdkInitialize(application);
        AppEventsLogger.activateApp(application);
    }
 
開發者ID:Bruno125,項目名稱:Unofficial-Ups,代碼行數:13,代碼來源:AnalyticsManager.java

示例9: errorHandler

import io.fabric.sdk.android.Fabric; //導入方法依賴的package包/類
private void errorHandler() {
    Log.d(Constant.TAG, "error handler");
    try {
        Crashlytics crashlytics = new Crashlytics.Builder()
                .core(new CrashlyticsCore.Builder().disabled(BuildConfig.DEBUG).build())
                .build();
        Fabric.with(this, crashlytics);

        FirebaseAnalytics.getInstance(this).setAnalyticsCollectionEnabled(BuildConfig.DEBUG);
    } catch (Exception e) {
        e.printStackTrace();
    }
}
 
開發者ID:afiqiqmal,項目名稱:MVP-Android,代碼行數:14,代碼來源:MVPApplication.java

示例10: onCreate

import io.fabric.sdk.android.Fabric; //導入方法依賴的package包/類
@Override public void onCreate() {
    super.onCreate();
    FirebaseApp.initializeApp(this);
    FirebaseDatabase.getInstance().setPersistenceEnabled(true);
    Fabric.with(this, new Crashlytics());
    this.initializeInjector();
    this.initializeCalligraphy();
    this.initializeLeakDetection();
}
 
開發者ID:riteshakya037,項目名稱:Subs,代碼行數:10,代碼來源:SubsApplication.java

示例11: initCrashReport

import io.fabric.sdk.android.Fabric; //導入方法依賴的package包/類
private static void initCrashReport(Context context) {
    Crashlytics crashlyticsKit = new Crashlytics.Builder()
            .core(new CrashlyticsCore.Builder().disabled(BuildConfig.DEBUG).build())
            .build();

    Fabric.with(context, crashlyticsKit);
}
 
開發者ID:RikkaApps,項目名稱:FCM-for-Mojo,代碼行數:8,代碼來源:FFMApplication.java

示例12: onCreate

import io.fabric.sdk.android.Fabric; //導入方法依賴的package包/類
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    if (!BuildConfig.DEBUG) {
        Fabric.with(this, new Crashlytics());
    }
    Intent intent = new Intent(this, MainActivity.class);
    intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);
    if (getIntent().getExtras() != null) {
        intent.putExtras(getIntent().getExtras());
    }
    startActivity(intent);
    finish();
}
 
開發者ID:AyushR1,項目名稱:KernelAdiutor-Mod,代碼行數:15,代碼來源:StartActivityMaterial.java

示例13: onCreate

import io.fabric.sdk.android.Fabric; //導入方法依賴的package包/類
@Override
public void onCreate() {
    super.onCreate();
    Fabric.with(this, new Answers(), new Crashlytics());
    session = new Session(this);
    Fresco.initialize(this);
}
 
開發者ID:BackPackerDz,項目名稱:PotRoom,代碼行數:8,代碼來源:App.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_home);

    bottomNavigationBar = (BottomNavigationBar) findViewById(R.id.bottom_navigation_bar);
    fabHome = (FloatingActionButton) findViewById(R.id.fab_home);

    modeSpinner = (Spinner) findViewById(R.id.mode_spinner);
    bgSpinner = (Spinner) findViewById(R.id.bg_spinner);
    shapeSpinner = (Spinner) findViewById(R.id.shape_spinner);
    itemSpinner = (Spinner) findViewById(R.id.item_spinner);
    autoHide = (CheckBox) findViewById(R.id.auto_hide);

    toggleHide = (Button) findViewById(R.id.toggle_hide);
    toggleBadge = (Button) findViewById(R.id.toggle_badge);

    message = (TextView) findViewById(R.id.message);

    fragment1 = TextFragmentKt.newTextFragmentInstance(getString(R.string.para1));
    fragment2 = TextFragmentKt.newTextFragmentInstance(getString(R.string.para2));
    fragment3 = TextFragmentKt.newTextFragmentInstance(getString(R.string.para3));
    fragment4 = TextFragmentKt.newTextFragmentInstance(getString(R.string.para4));
    fragment5 = TextFragmentKt.newTextFragmentInstance(getString(R.string.para5));
    fragment6 = TextFragmentKt.newTextFragmentInstance(getString(R.string.para6));

    ArrayAdapter<String> adapter = new ArrayAdapter<>(this, android.R.layout.simple_spinner_item, Arrays.asList(new String[]{"MODE_DEFAULT", "MODE_FIXED", "MODE_SHIFTING", "MODE_FIXED_NO_TITLE", "MODE_SHIFTING_NO_TITLE"}));
    adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
    modeSpinner.setAdapter(adapter);
    modeSpinner.setSelection(2);

    ArrayAdapter<String> itemAdapter = new ArrayAdapter<>(this, android.R.layout.simple_spinner_item, Arrays.asList(new String[]{"3 items", "4 items", "5 items"}));
    itemAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
    itemSpinner.setAdapter(itemAdapter);
    itemSpinner.setSelection(2);

    ArrayAdapter<String> shapeAdapter = new ArrayAdapter<>(this, android.R.layout.simple_spinner_item, Arrays.asList(new String[]{"SHAPE_OVAL", "SHAPE_RECTANGLE", "SHAPE_HEART", "SHAPE_STAR_3_VERTICES", "SHAPE_STAR_4_VERTICES", "SHAPE_STAR_5_VERTICES", "SHAPE_STAR_6_VERTICES"}));
    shapeAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
    shapeSpinner.setAdapter(shapeAdapter);
    shapeSpinner.setSelection(5);

    ArrayAdapter<String> bgAdapter = new ArrayAdapter<>(this, android.R.layout.simple_spinner_item, Arrays.asList(new String[]{"BACKGROUND_STYLE_DEFAULT", "BACKGROUND_STYLE_STATIC", "BACKGROUND_STYLE_RIPPLE"}));
    bgAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
    bgSpinner.setAdapter(bgAdapter);
    bgSpinner.setSelection(1);

    modeSpinner.setOnItemSelectedListener(this);
    bgSpinner.setOnItemSelectedListener(this);
    shapeSpinner.setOnItemSelectedListener(this);
    itemSpinner.setOnItemSelectedListener(this);
    autoHide.setOnCheckedChangeListener(this);

    toggleHide.setOnClickListener(this);
    toggleBadge.setOnClickListener(this);
    fabHome.setOnClickListener(this);

    bottomNavigationBar.setTabSelectedListener(this);
}
 
開發者ID:weiwenqiang,項目名稱:GitHub,代碼行數:60,代碼來源:HomeActivityJava.java

示例15: 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_bridge_menu);

  handler = new Handler();
  mainLayout = (FrameLayout) findViewById(R.id.container);

  preferences = PreferenceManager.getDefaultSharedPreferences(this);
  editor = preferences.edit();

  if (getSupportActionBar() != null) {
    //updateActionBar(getResources().getString(R.string.actionbar_title));
    updateActionBarLogo(isCameraMenuFragment);
  }

  // Only use for Eye VDJ
  /*
  View decor = this.getWindow().getDecorView();
  decor.setSystemUiVisibility(View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_FULLSCREEN
      | View.SYSTEM_UI_FLAG_IMMERSIVE);
   */

  rootMenu = new RootMenuFragment();
  spotifyMenu = new SpotifyMenuFragment();
  hueMenu = new HueMenuFragment();
  vdjMenu = new VDJMenuFragment();
  remoMenu = new RemoMenuFragment();
  cameraMenu = new CameraMenuFragment();

  interactionDisableTimer.setListener(this);
  cancelTimer.setListener(this);
  pauseTimer.setListener(this);
  ((PauseActionDetector) findViewById(R.id.interceptor)).setListaner(this);

  basicConfigFragment = new BasicConfigFragment();
  oscConfigFragment = new OSCConfigFragment();
  midiConfigFragment = new MIDIConfigFragment();
  spotifyConfigFragment = new SpotifyConfigFragment();
  hueConfigFragment = new HueConfigFragment();
  remoConfigFragment = new RemoConfigFragment();
  aboutFragment = new AboutFragment();
  /*
   * MODIFY YOURSELF
   * Add your implemented function's configuration
   *
   */
  // ***ConfigFragment = new ***ConfigFragment

  FragmentManager manager = getSupportFragmentManager();
  FragmentTransaction transaction = manager.beginTransaction();
  transaction.add(R.id.container, rootMenu);
  transaction.commit();

  if (preferences.getBoolean("SHOW_WELCOME", true)) {
    showWelcom();
  } else {
    if (Build.VERSION.SDK_INT >= 23) {
      requestGPSPermission();
    }
  }

  mNetworkStateReceiver = new BroadcastReceiver() {
    @Override
    public void onReceive(Context context, Intent intent) {
      if (mPlayer != null) {
        Connectivity connectivity = getNetworkConnectivity(context);
        mPlayer.setConnectivityStatus(mOperationCallback, connectivity);
      }
    }
  };
}
 
開發者ID:tkrworks,項目名稱:JinsMemeBRIDGE-Android,代碼行數:75,代碼來源:MainActivity.java


注:本文中的io.fabric.sdk.android.Fabric.with方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。