Sunday, May 13, 2018

Android P now crashes apps instead of telling you when they aren’t responding

Among all the new additions to Android P including new navigation gestures, Slices API, and new biometrics API, there are some other changes which may also be impactful in a more subtle way. One of these is the removal of App Not Responding (ANR) dialogue boxes. When an application crashes in Android Oreo or below, an alert box is shown to the user to let them know. Now, in Android P, Android applications will just crash without any kind of notification for the user.

Why crash the application without telling the user what actually happened? It's not necessarily a benefit to users, but it forces developers to pay particular attention to certain problems and make sure that the issue is avoided. In the source video linked below, Google discusses potential solutions to avoid this problem including the AsyncTask API. Android's recent limitations on background services mean transitioning to a service is probably not a great idea here. We recommend listening to the talk below if you are interested in learning more about tackling this problem:

Google's approach makes sense, but is it too much? It might give the appearance that Android apps are crashing less often, but if the notifications are less visible to the user then developers will have to keep an eye out on their crash tools such as Firebase crash reporting and not direct user feedback.

This isn't the only change in Android P about the visibility of what apps are doing in the background. Android Oreo introduced the persistent notification when certain apps were running in the background if that app did not have a notification with high enough priority, but Android P now gets rid of that notification entirely. The only difference is that the ANR dialogue box wasn't as annoying as placing a persistent notification.


Via: /r/AndroidDev



from xda-developers https://ift.tt/2rDlkzR
via IFTTT