当前位置: 首页>>代码示例>>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;未经允许,请勿转载。