Google Play Services incompatibility - java

I've been using google's fused location services on my app for location tracking. I use Android studio and it's gradle build system. Recently I have discovered a big issue with google's location services.
My gradle build file contained this dependency: compile 'com.google.android.gms:play-services:+. So when I rebuilt my project, Android studio downloaded the latest version for google play services, namely 5.2.08. HOWEVER my device (Samsung Galaxy S4) only has the 5.0.89 version. And apparently these two versions are not compatible, I get this error : Google Play services out of date. Requires 5208000 but found 5089038. I cannot update google play services on my device. It states that it is up to date (5.0.89).
Using this solution I managed to get the tracking system working, but it won't work on another device I own (a W8L device), which has another version of google play services: 5.0.84.
It seems this is not an uncommon thing to happen with google. How can I fix this for any devices out there, and make sure that google doesn't mess up my app.

Same thing is happening here, i solved by changing the play services version at gradle:
compile 'com.google.android.gms:play-services:5.0.89'
They probably released a new version but the roll out haven't arrived in our devices yet.

Related

Integrated SDK behave differently after PlayStore app bundling

I integrated 3rd party SDK to my Android app.
I tested staging and release build APK, no problem. The build is done using bitrise/BETA by crashlytics.
I downloaded the release app from Google Play Store.
The SDK throws persistent error/exception that does not appear during 2.
The SDK developer deducted that the cause may be from the missing checksum, which is generated using this piece of code:
mChecksumMD5 = Util.calculateMD5(new File(mContext.getApplicationInfo().nativeLibraryDir+"/libxyz.so"));
I suspect it may be due to app bundling, which is not present during build via bitrise/BETA. I tried to use bundled app using bundle tools (https://github.com/google/bundletool/releases) for staging build and it doesn't have any problem (bitrise staging vs bundled staging are all ok). So is there something different about the app bundling happening in Google Play Store? What may cause this unexpected exception?

AOSP and access to Google Play Services

I am developing for a device that uses AOSP (https://source.android.com/). This device is a Garmin 780 (https://buy.garmin.com/en-US/US/p/569748). The custom build does not include any Google Apps.
I'm new to Android dev, so I'm a bit lacking in the ecosystem knowledge.
I was hoping that someone could explain to me how the OS would handle having an application installed which uses some of the Google Play Services API's (e.g. https://developers.google.com/android/reference/packages).
I've installed an APK that uses:
com.google.android.gms:play-services-analytics
com.google.android.gms:play-services-auth
The application runs. I would have thought that it would fail to run if the libraries were not present. Or are they bundled with the apps APK?
When using the Device File Explorer in Android Studio and checking out the folder /data/data I can confirm that no com.google.android packages are installed.
So I'm really after some confirmation, the way Google Play Services is described here: https://developers.google.com/android/guides/overview seems that Google Play Services must be installed on the device at an OS level in order to make use of them. These services cannot be installed alongside a custom application like normal dependencies right?
That is correct Google Play Services cannot simply be installed for use along with an application.
Google Play Services is a suite of APIs installed by default on most Android devices to allow for apps to easily utilize common features as well as keep the services and Google apps up to date.
Something that might interest you is Open Gapps. It is a way for devices with custom Android ROMs to utilize the Google Play Services package.

How to support more devices in Android app

I'm an iOS developer, but I recently developed an Android app for a customer, because they were unable to find a developer. So I made it and it works. But, I'm a complete newbie.
My customer says that their users complain than the app is not available for the newest versions of Android. I build the app against the latest version of the SDK. How do I make it compatible with new versions of Android?
The Play console lets you see thousands of devices in the app ecosystem, whether they are compatible with your app, and why. The help article gives more details.

App crashing on Droid X

I just built and released an app on TestFlight. However, when I tried to download -> launch the app on my phone it crashes right away.
My DroidX details are:
System Version: 45.621.10.MB810.Verizon.en.US
Android Version: 2.3.4
Kernel Version: 2.6.32.9-g3e80c7a
Build Number: 4.5.1_57_DX9-10
I tested my app on simulator that had the details below:
Device: Nexus 4
Target: Android 4.3 - API Level 18
How can I troubleshoot further to see why my app is crashing? On ADB I don't see options for DroidX in Device and neither do I see option for 2.3.4 under Target.
I'm new and trying to figure out where to go from here to find out why my app is crashing on this phone?
It sounds like you've built the app using an API that isn't available on the Droid X. As you noted above, the X is at Android 2.3.4, and your simulator is at 4.3.
Check here for more information on setting the API in your app's manifest. Android 2.3 is API level 9.
Note, though, that if you downgrade the API your app is using, you won't be able to use features available in newer versions of Android. One of the most noticeable additions to Android since Gingerbread, for example, is the action bar.
If you do want to downgrade, you'll need to download and install the SDK for that API level to use it for development. The easiest way to do that is via the SDK Manager.

about older android versions on google market

I have developed my app in android 2.2, and put it on google market (munspel-appen).
I could see in the statistics that 4% are using android version 2.1 i dont have access to such device, so I wonder if my app will still work on that older version device if downloaded from market too or is it only working from 2.2 and up? How can one tell?
The configuration of your app (https://play.google.com/store/apps/details?id=com.munspel.munspelappen) seems to limit the app to devices with 2.2 and higher.
Users with a lower OS Version then 2.2. can not download your app from google market.
I would test your App in an Android 2.1 Emulator and if it works there change the minSDK for your app to 2.1 and upload an update to the market. In that way your app will be available to as much users as possible.
you can try in the android emulator in eclipse for example
Your application may work for 2.1 version provided that your application is compatible with API Level 7.
Well you can specify android:minSdkVersion=8 in AndroidManifest, (from document)The Android system will prevent the user from installing the application if the system's API Level is lower than the value specified in this attribute, You can try running your application on Emulator running 2.1 version. read more http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#uses
If you're willing to pay, there are several companies specializing in testing Android apps on physical devices. Examples:
http://duarlander.ning.com
http://www.perfectomobile.com
I think there's a lot more in google.
First, the Market should use the minSdkVersion in your Manifest to filter the apps when searched.
To test, you can use an emulator of version 2.1 and see whether it works.
Most probably most of the code will work except those new in 2.2.

Categories

Resources