Library Availbale at JitPack.io
NiceCrashReport is designed to make it easier for you to find out what happened through the download log through the downloader if the app crashes due to an error or some other reason.
Add jitpack in your root build.gradle at the end of repositories:
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
Step 2. Add the dependency
dependencies {
implementation 'com.github.00sanoj00:NiceCrashReport:1.7'
}
Use the onCreate
Just like MainActivity.java
NiceCrash.Builder.create().apply();
import com.sanoj.devil.nicecrashreport.config.NiceCrash;
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
//Add NiceCrashReport
NiceCrash.Builder.create().apply();
}
}
Use throw new RuntimeException("Boooooom");
Button crash = findViewById(R.id.crashmemamam);
crash.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
throw new RuntimeException("Badumathama!");
}
});