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 for foreground apps. The ANR dialogue appears when something is preventing the main UI thread from responding. When this happens in Android Oreo or below, the ANR dialogue is shown to the user to let them know. Now, in Android P, the application 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. Developers are encouraged to not run anything in the foreground thread. 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. If you are a developer on the latest P beta release, you can bring back these crash dialogues by enabling a setting in Developer Options.

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

Read This Next

Load more