Rasoul Miri :
I have a device android, example friendly arm and this is offline. I need to see crashes in this device. for example, crash save in sd card. can I use firebase crashlytics offline and save in file? or use other library. I need a full report, for example ram, storage, line crash, and etc.
toantran :
Technically, you can implement such mechanism to track the crash logs yourself. check out the following piece of code to handle within Application class:
import android.app.Application
class TestApp : Application() {
override fun onCreate() {
super.onCreate()
val exceptionHandler = SimpleExceptionHandler()
Thread.setDefaultUncaughtExceptionHandler(exceptionHandler)
}
}
class SimpleExceptionHandler : Thread.UncaughtExceptionHandler {
override fun uncaughtException(thread: Thread, exc: Throwable) {
// Log your exception here to files, database, etc together with the device status like RAM, processes, network condition that the crash point
}
}
You can choose the way to store your information like text file, database, etc
Guess you like
Origin http://43.154.161.224:23101/article/api/json?id=326143&siteId=1