Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-15356] Android: Google Maps v2 Module - Expose getErrorDialog() for users to automatically download / update or enable Google Play Services

GitHub Issuen/a
TypeNew Feature
PriorityLow
StatusOpen
ResolutionUnresolved
Affected Version/sn/a
Fix Version/sn/a
ComponentsAndroid
Labelsandroid, googleplay, mapsv2
ReporterMostafizur Rahman
AssigneeUnknown
Created2013-09-26T22:38:10.000+0000
Updated2018-02-28T20:03:25.000+0000

Description

As per GMaps v2 Module Documentation we should check if the Module is present and alert the user to download / update or enable the Google Play Services and location. This is very confusing for end-users and there is a native way for doing this automatically on Android SDK. I think you guys should expose getErrorDialog() so the API itself will not only check for Google Play Services, but also instruct the user to either download, update or enable the Google Play Services. As per the method documentation: Returns a dialog to address the provided errorCode. The returned dialog displays a localized message about the error and upon user confirmation (by tapping on dialog) will direct them to the Play Store if Google Play services is out of date or missing, or to system settings if Google Play services is disabled on the device. http://developer.android.com/reference/com/google/android/gms/common/GooglePlayServicesUtil.html#getErrorDialog(int, android.app.Activity, int) This would probably eliminate a lot of crashes adn black screens on apps using this new module. This is the standard behaviour of most Android apps using the new GMaps v2 SDK.

Comments

  1. Ygor Lemos 2013-10-01

    We need something like that:
       int resultCode = GooglePlayServicesUtil.isGooglePlayServicesAvailable(context);
       if (resultCode == ConnectionResult.SUCCESS) 
       {
           // Google Play Services installed correctly, continue
       } 
       else if (resultCode == ConnectionResult.SERVICE_MISSING ||
                resultCode == ConnectionResult.SERVICE_VERSION_UPDATE_REQUIRED ||
                resultCode == ConnectionResult.SERVICE_DISABLED) 
       {           
           // Google Play Services not installed / too old / disabled.
           // Show dialog to install or update
           Dialog dialog = GooglePlayServicesUtil.getErrorDialog(resultCode, this, 1);
           dialog.show();
       } 
       else 
       {
           // Something else went wrong, handle this yourself
       }
       

JSON Source