I want to develop a test application that implements Activity Recognition on Android 4.1, but I saw on the documentation that only 4.2.2 is supported. I saw also that apps like AutomateIt (that includes Recognition functionality) work on my Jellybean 4.1. How could achieve this?
Google's own sample code works back to API Level 8, according to its manifest. Everything in Google Play Services should work back to a similar API level, as the documentation states:
When using these services, you can distribute your app on Google Play to all devices running Android 2.2 or higher, and some services support even more devices.
Briefly: update GooglePlayServices to the latest version.
ActivityRecognitionApi itself works starting from API 8.
Thus your problem could be that you have an old version of GooglePlayServices.
I had this issue on old device with Android 2.3.
As I understood that the problem was in the installed version of Google Play services (6.3); the issue has gone after updating GPservices app to 7.8.99.
The was no straight way to update by pressing “update” button, but I had to delete manually Google Pay services app and then Android automatically installed the latest at that moment version 7.8.99.
My app started to show current activity quite accurate.
The strange thing is that Activity Recognition was introduced in much earlier version of Google Play services (earlier than 4.0).
In conclusion, I would say that the prerequisites for correct work of google activity APIs are:
Google Play services client library (latest version)
Android version 2.2 (API level 8) or newer.
Related
I'm building a simple android app that uses Google maps api to display map and navigation. As you may know Google maps need Play services Library to run on client android phone. i want my app to run in much older android OS's(14,15,..)
Problems:
1- Clients need to install or activate Play services app.
2- then Clients have to update play services app to the latest version to use my app with google maps.
3- how to make app to run in older androids? just by specifying min sdk ?
so in order to solve first and third problem i've no idea but for the second one :
building project with older Play service dependencies may help but i dont know how to do this or even it helps or not.
it'll appreciate if guys offer any solutions !
Thank you all.
What are the recommended practices for maintaining the widest backwards compatibility of an Android app while depending on Google Play Services?
Here are the pointers I was able to aggregate concerning backwards compatibility, including those that use Google Play Services.
The Google Maps Android API uses OpenGL ES version 2 to render the map. The least Android API version that has support for this is API 8 or Android 2.2 .
Compile against the oldest version of Google Play Services that contains the APIs that you need. As further discussed in this thread, refrain from using wildcards like 5.+ because that updates to the latest play services. Instead use a widely used version like com.google.android.gms:play-services:5.0.89.
Use the V4 support library to verify and request permissions.
com.android.support:support-v4:23.0.1
You might also check some additional insight from this SO thread.
I have the legacy application which actively use "com.google.android.gms.location.LocationClient" but in the new GooglePlayServices version there is no such class!! https://developer.android.com/google/play-services/index.html "...If you were previously using LocationClient, call the APIs in the com.google.android.gms.location package instead..." said there.
As I understand there is no option to force an old version of Google Play Services with custom application on the device, am I wrong?
Does it mean that I should rewrite some portion of application?
Is there any method to run app with old version of Google Play Services library on the device?
All Google Play Services are backward compatible - as long as you compile with Google Play Services 6.1 or below, you can continue to use LocationClient.
However, that does mean you will not get any of the new APIs, performance improvements, or other features available only in the newer versions of Google Play services so you should definitely consider moving over to the new API as soon as possible.
I am building an application which has its major functionality on google maps. But the problem I am facing in one of the device is that:
The Google Maps never load on that device [its OS is Android v2.2]
I have checked for the Google Play Service and it always gives a dialog to update the Google Play service; but when I click ok it redirects me to the play store where it shows that i already have the google play library [No update option there]
I connected the device and checked the logcat which states something like this:
"Current Google Play Service Version is 35xxx and required is 41xxx"
but there is No way for me to update the google play service as it never shows the update option. Please help me with this issue.
Give me all possible solution that i should try out... I need this app working on android 2.2.
I am using google maps api v2. Also Note the app is working fine on all other android versions.
Thanks.
USING Google Maps v1 can SOLVE MY PROBLEM....?? Please Help!
You need to use older version of Google Maps Android API v2.
The latest supported on 2.2 devices is 3.2.65 (v12) and can be downloaded via SDK Manager.
Just look for Google Play services for Froyo.
Or if you are using Android Studio and Gradle, make your dependency version equal to 3.2.65.
I updated SDk for android after 4.4 release. I saw that they have bifurcated Google Play Services and Google Play Services for Froyo. What is the reason behind this? Now suppose I want to use integrate Google Map in app how to use these two services for the Google Map Integration ?
Per the Google Play Services 4.0 announcement:
With over 97% of devices now running Android 2.3 (Gingerbread) or newer platform versions, we’re dropping support for Froyo from this release of the Google Play services SDK in order to make it possible to offer more powerful APIs in the future. That means you will not be able to utilize these new APIs on devices running Android 2.2 (Froyo).
If you use the 'Google Play Services for Froyo', you will not be able to use the new features included in Google Play Service 4.0. For Maps, the 4.0 features include
The Maps API enhances map customization features, letting you specify marker opacity, fade-in effects, and visibility of 3D buildings. It’s also now possible to change ground overlay images.
Which android version is required for android new Geofencing feature ? Not able to get particular information on Android documentation..
If you are using Google Geofence API you need Google Play services. Devices older than Android 2.2 or devices without the Google Play Store app are not supported.
As #Waza_Be commented it requires API8 and will work on devices with at least Froyo.