Resolving problems reported with the GoogleApiClient OnConnectionFailedListener

With the constantly changing nature of Google APIs, your users are likely to attempt to use your application, but not be able to because their files are out of date. In the previous example, we just show a Toast, but we can do better. We can use the GoogleApiAvailability library to display a dialog to help the user resolve the problem.

We'll continue with the previous recipe and add code to the onConnectionFailed() callback. We'll use the error result to display additional information to the user to resolve their problem.

Getting ready

This recipe will continue from the previous recipe, How to get the last location. If you are loading the project from the downloaded source ...

Get Android Application Development Cookbook - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.