We can get crash data (stack traces) from Android application when working on our own device being retrieved by cable, But how to get the crash report from any instance of app running on remote. This Android tutorial helps you to track the uncatched exception from remote device by letting the users to provide the users feedback along with the following details. All the information are generated into a PDF file and attached and send to your email (Developers mail).
App crashed and Notification appears:
Dialog that prompts users to enter message and click OK to send mail to developer:
All the PDF generation data gathering and mail sending are done in background.
You can use this features in your app. You can find the whole source code here
happy coding :) Please provide your valuable feedback.
- Report collected date and time
- Thread name, Exception name
- App information like which version of your app is the crashed user using
- The package name
- Device locale, Device model, Android version, Board, Host, Id, Product, Type
- Memory info like Total memory, Available memory
- And the Stack trace
- Attach the library project to the app.
- Initially we need to register the ExceptionReporter by passing the context of the activity before the super.onCreate(savedInstanceState); method. protected void onCreate(Bundle savedInstanceState) {
ExceptionReporter reporter = ExceptionReporter.register(this);
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
EditText sd = (EditText) findViewById(R.id.se);
}
- Running the app containing uncatched exception. eg : In XML i have a TextView declared and in JAVA i am referring TextView as EditText (EditText sd = (EditText) findViewById(R.id.textview);) this which will throw a Class cast exception.
- When an uncaught exception is triggered the reporter creates a notification prompting the users that the app has been crashed and to help fixing the error by sending an error report to the developer.
- The user decides to send the crash report or cancel the report.
- If he decides to send report by clicking OK button all the above mentioned information are collected and put into a PDF file and saved externally in a directory named CrashReport and send to developers mail
- droidText.0.2.jar --> for generating PDF file
- mail.jar, additionnal.jar, activation.jar --> for attaching PDF and sending mail
- <uses-permission android:name="android.permission.INTERNET" />
- <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
- <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
App crashed and Notification appears:
Dialog that prompts users to enter message and click OK to send mail to developer:
All the PDF generation data gathering and mail sending are done in background.
You can use this features in your app. You can find the whole source code here
happy coding :) Please provide your valuable feedback.
Tq for sharing valuable information with us about study bible
ReplyDeleteTo recover lost files click on: android data recovery
android data recovery apk without root
android data recovery software
android data recovery app
android data recovery free
android recovery
diskdigger for android