Android applications have a large number of ANR or crash events, except for the applications you have developed, we can find a way to transmit the crashed log information to the server, then it involves how to get the error information of our application. But remember to filter the log information. You only need to retrieve the log information related to your application.
For details, refer to the official documentation here:
Dev guide-> developing-> Tools-> logcat
Dev guide-> debugging-> reading and writing logs
The specific implementation of this policy is more important than the implementation of this policy.
For example, you can call the log upload method every time the user logs out of your client. Maybe it's okay to secretly run a service on the background, or write a timer, it's okay to run once every 10 hours, depending on your own needs and requirements. But don't be too dark. It's terrible to let the user discover it.