I'm running an app in production making use of Google Maps Android API v2 using support library, and just glancing over reference docs from Google I noticed I'm missing the following line:
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
https://developers.google.com/maps/documentation/android/start#add_the_google_play_services_version_to_your_apps_manifest
Google documention seems to be missing explanation of this key.
How important is it to include the version in the manifest and what does it accomplish?
Thanks.
AFAIK it is needed to tell the Android framework and the playstore the version of the play services library against which you have complied your app and I guess it will be required to track if any new features (or deprecated features) are being used by you app.
You can see now some apps wont work unless we update the google play services in our device which clearly shows us that if an app compiled with a newer version of play services lib the device must have the same or above version of the play store apk in order to run the app this maybe due to security and feature dependency on the new play services(ie.. GoogleDrive API, Google+ API,Google auto API ).
This is just to tell the DVM which google play service version in using your device. if you are not specifying it then it will crash your application because didn't come to know about the version. I'm also wondering how google didn't specify this in documention. But it is necessary to specify this.
Add the Google Play services version to your app's manifest
Edit your application's AndroidManifest.xml file, and add the following declaration within the element. This embeds the version of Google
Play services that the app was compiled with.
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
An Android application that uses the Google Maps Android API should specify the following settings in its manifest file, AndroidManifest.xml:
the first one is:
• A reference to the Google Play services version. If you have followed the steps on this page up to this point, you have already added the required declaration to your application manifest.
• ... ...
Related
I'm developing an app for Raspberry Ppi 3 using Android things.
And in the project...
My app's androidmanifest.xml contains
uses-library android:name="com.google.android.maps" /
but it couldn't run this app.
I get this message when I run it. (Google Maps installed.)
Installation failed with message INSTALL_FAILED_MISSING_SHARED_LIBRARY: Package couldn't be installed in /data/app/com.example.androidthings.myproject-1: Package com.example.androidthings.myproject requires unavailable shared library com.google.android.maps; failing!.
It is possible that this issue is resolved by uninstalling an existing version of the apk if it is present, and then re-installing.
WARNING: Uninstalling will remove the application data!
Do you want to uninstall the existing application?
How can I solve this problem?
Maps API isn't available in Android Things.
You can check the the list of supported and unavailable APIs here.
Anyway, You can use MapBox on Android Things instead of Google Maps API.
UPDATE:
At least from Developer Preview 5 Android Things supports Google Maps (from Official Overview):
Android Things supports a subset of the Google APIs for Android. The
following table breaks down API support in Android Things:
Supported APIs:
Awareness
Cast
Google Analytics for Firebase
Firebase Cloud Messaging (FCM)
Firebase Crash Reporting
Firebase Realtime Database
Firebase Remote Config
Firebase Storage
Fit
Instance ID
Location
Maps
Nearby
Places
Mobile Vision
SafetyNet
I need to track Google Advertising ID with AppsFlyer. In order to do that, I need to add Google Play Services SDK to my Xamarin Android App.
Official AppsFlyer binding manual offers me to add GooglePlayServicesLib.dll binding library to project. But if I add this library I have Java error code 2 on build. It is known problem, I tried to fix it by setting Java Max Heap Size to 1G but no chance.
To bypass this problem Xamarin split google play services library to 20 separate NuGet packages. According to AppsFlyer integration guide we need to add
We only use the ads packages from Google Services
therefore i tried to use only Ads package
<package id="Xamarin.GooglePlayServices.Ads" version="25.0.0.0" targetFramework="monoandroid5" />
<package id="Xamarin.GooglePlayServices.Base" version="25.0.0.0" targetFramework="monoandroid5" />
I receive Warning:Google Play services SDK jar is missing from AppsFlyer on launch
to summarize:
I can't build the project with full GooglePlayServicesLib and it looks like AppsFlyer does not see SDK with only Ads package. What I'm missing?
It has been quite a few months since I had time to work on my app. And today I downloaded latest Android Studio and SDK, I found a problem after I built the app.
My AndroidManifest file does NOT require any permissions on GET_ACCOUNTS or USE_CREDENTIALS, however they are shown as new added permissions when I tried to upload the app in Google Play store. I did use Google Play Games service in the game, but it was not like this before I did this update.
Does anybody know why? I Googled a while but could not find any clue..
If you recently updated, check to see if you switched to Google Play services 7.5 with a line in your build.gradle file such as
compile 'com.google.android.gms:play-services:7.5.0'
Google Play services 7.5 automatically adds required permissions - when you use com.google.android.gms:play-services - that says you are using every part of Google Play services, potentially adding more permissions than you intended.
Instead, you should selectively include what APIs you use by using separate dependencies such as:
compile 'com.google.android.gms:play-services-games:7.5.0'
compile 'com.google.android.gms:play-services-drive:7.5.0'
(Assuming you'd need Drive for Saved Games support)
I have downloaded a demo project of GSM services.
For using it, I need to install a file name Google could messaging but, it is missing from my SDK.
How can I add this file to my SDK?
New To Android
If you use GCMS (Google Cloud Messaging Services), you need to build a library project which uses Play Services and import it into your work-space.
Generally:
Install the Android SDK from this link.
Download and configure the Google Play services SDK, which includes the Google Maps Android API. You can see the setting up on this link.
Don't forget to add the required Google Play services settings in your application's manifest.
When you add the Play Services library to your project, be sure to add it with resources, as described in Setup Google Play Services SDK. The key point is that you must reference the library. Simply adding .jar file to your project won't work. You must follow the directions for referencing a library, or your app won't be able to access the library's resources, and it won't run properly.
You can get the full instructions from Setting Up Google Play Services.
Do I have to check if Google Play Services APK is available if I want to use AdMob and GameHelper (from BaseGameUtils apk). Do I have to add a uses-library tag to my manifest?
thx & regards
You don't HAVE to check for the presence of Google Play Services, but Google recommend that you do:
http://developer.android.com/google/play-services/setup.html#ensure
If you do not check, and Google Play Services is not installed, Android will prompt the user to install Google Play Services.
You do not need a "uses-library" tags in your manifest. Your project is able to access the BaseGameUtils (including GameHelper) because you set it up as a library project and reference it in your project.
See https://developers.google.com/games/services/android/quickstart for a detailed explanation of the steps required.