Skip to content

Instantly share code, notes, and snippets.

@shikto1
Last active July 5, 2018 04:53
Show Gist options
  • Save shikto1/f715bddcf3bf7cb35f2aad313c7511b1 to your computer and use it in GitHub Desktop.
Save shikto1/f715bddcf3bf7cb35f2aad313c7511b1 to your computer and use it in GitHub Desktop.
import io.fabric.sdk.android.Fabric;
import com.crashlytics.android.Crashlytics;
public class MainActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
//This is the most important line.........
Fabric.with(this, new Crashlytics());
setContentView(R.layout.activity_main);
}
public void forceCrash(View view) {
throw new RuntimeException("This is a crash");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment