Java android设备离线时崩溃报告器离线
我有一个android设备,例如,这是离线的。我需要查看此设备中的崩溃情况。例如,在sd卡中崩溃保存。Java android设备离线时崩溃报告器离线,java,android,kotlin,crash,offline,Java,Android,Kotlin,Crash,Offline,我有一个android设备,例如,这是离线的。我需要查看此设备中的崩溃情况。例如,在sd卡中崩溃保存。 我可以脱机使用firebase crashlytics并保存在文件中吗?或者使用其他图书馆。我需要一份完整的报告,例如ram、存储、线路崩溃等。从技术上讲,您可以自己实现这种机制来跟踪崩溃日志。 请查看要在应用程序类中处理的以下代码: import android.app.Application class TestApp : Application() { override fun
我可以脱机使用firebase crashlytics并保存在文件中吗?或者使用其他图书馆。我需要一份完整的报告,例如ram、存储、线路崩溃等。从技术上讲,您可以自己实现这种机制来跟踪崩溃日志。 请查看要在应用程序类中处理的以下代码:
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
}
}
您可以选择存储文本文件、数据库等信息的方式。从技术上讲,您可以自己实现这种机制来跟踪崩溃日志。 请查看要在应用程序类中处理的以下代码:
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
}
}
您可以选择存储文本文件、数据库等信息的方式这有帮助吗@拉苏尔·米里多斯这有帮助吗@rasoul miriI需要一个图书馆我需要一个图书馆