Android - Google Map v2 - need update google play service on device

后端 未结 2 1585
情书的邮戳
情书的邮戳 2020-12-22 01:30

i use SDK 21 and i develop on google map v2 when i want install apk on device , device need latest version of google play service.

My questions are:

1

相关标签:
2条回答
  • 2020-12-22 01:52

    You need to seperate the Google play services you use for developing your application and imbeding your Google Maps API V2 with the package installed on user's device.

    Once you have understood it, you can use the latest package to develop you application. In case the users that is trying to install you application on his phone but he doesn't has the latest version, he would be promted to install the last version from Google Play Store if it support on his phone.

    0 讨论(0)
  • 2020-12-22 02:00

    1 - have android devices google play service default

    No, not all devices have google play services installed by default.

    2 - is it true to ask customer to install this service ?
    3 - if two question is yes , how can i embed this service on my project that i just notify customer to service installation and my project install this service by itself

    Normally you would check if the google play services are installed on the device with GooglePlayServicesUtil.isGooglePlayServicesAvailable(this);, and then display an error dialog where it links to google play services app on Google Play market.

    Something like this:

    int resultCode = GooglePlayServicesUtil.isGooglePlayServicesAvailable(this);
    if (resultCode != ConnectionResult.SUCCESS) {
       if (GooglePlayServicesUtil.isUserRecoverableError(resultCode)) {
           GooglePlayServicesUtil.getErrorDialog(resultCode, this,
                        PLAY_SERVICES_RESOLUTION_REQUEST).show();
       } else {
           Log.i(TAG, "This device is not supported.");
           finish();
       }
    }
    

    For more info you can take a look over this link: http://developer.android.com/google/play-services/setup.html#ensure

    0 讨论(0)
提交回复
热议问题