Requirement to mention Google Play services versio

2019-04-21 11:33发布

问题:

Can anybody tell me why we need to mention the Google Play service's version in an app's manifest? What does Android do with this value?

回答1:

Google continuously upgrading it's play service.But as old applications are there, so to support applications which are using old version of play service we need to spacify on what version of play service our application based.

Update:

we include google-play-service lib and the version is based on this lib not on google play service installed in our mobile. so play-service-lib jar will always be inside in our application with it's version code.So google will manage google play service request according to play-service-lib version.

we provide version of google-play-service lib in our manifest

<meta-data
        android:name="com.google.android.gms.version"
        android:value="@integer/google_play_services_version" />

and "@integer/google_play_services_version" refers to version of Lib,which is using in our application.

This is just like, We request Facebook installed application or we use Facebook Sdk with our application..Both are different things.

Hope it is clear..



回答2:

Using the version , Google Play Store keeps a track of the number of updations done to the application and .apk file uploaded to the Developer's Console . This is applicable after the application has been Published in the Google Play Store.

If any modification is done to the application and you want to upload the .apk file to the Developer's Console to distribute it to the user , you have to change the version . Else you would not be able to upload the .apk file.

Also upgrading the version notifies the users about any changes/modifications/upgradations done the published application in the Google Play Store.



回答3:

This is because latest google play services requires a version name, which is to be mentioned using <meta-data .. /> inside AndroidManifest.xml.

Update:

Sometimes you have the need to set up some app-wide configuration information in an Android app or need to create a class that can be used in multiple projects with a generic way of setting configuration values. This is particularly useful for things like API keys that will probably be different across apps but should be accessible in the same way. There are several ways to do it, but the one I’ve come to prefer is adding a meta-data tag to the AndroidManifest.xml file. If you are familiar with Android Admobs , New Relic Application Tools, Chartboost, InMobi, Millennial, Google Play Store and most of them are using meta-data for this.



回答4:

it is helpful to know that which version is currently in use and to decide the behavior according for the google play services, we need to mention google play lib version at manifest which can be done with meta data tags of xml in android manifest.

please visit http://developer.android.com/google/play-services/index.html

it is basically of Google Play Store keeps a track of the number of updations done to the application and beside this

1)Google Technology

2) For Standard Authorization

3) Tracking versions and api uses and to track and know Automatic Updates

please visit in support of the discussion

http://arstechnica.com/gadgets/2013/09/balky-carriers-and-slow-oems-step-aside-google-is-defragging-android/

http://google.about.com/od/p/a/What-Is-Google-Play.htm