I'm using Google Cloud messaging through google play services. The things is it only works on the devices with last version of play services installed, in remaining devices i need to show a dialog to send user to google play to install new version witch i really don't want to do!
So how can i avoid this?! I'm trying to use an older version of play services (lets say from 2 years ago) to insure majority of my users don't need to update but it seems impossible with grade and android sdk since it already deleted older versions! So what should i do? Is there any way to use older versions?! and if do find a way to use an older version are newer versions compatible with older one?
I don't want to force my users to update because
GCM it's not essential to my app although i like to have it!
It's over 30 MB witch is a lot in third world countries were my users are.
Google play blocks some of my users from accessing google play due to international lows! and i have to do update manually my self!
There is a solution for android studio:
1.Close your project
2.Browse to the folder where your projects has been saved
3.Go to folder 'app' and open the file 'build.gradle'
find this line :
compile 'com.google.android.gms:play-services:7.3.0'
and change the version (here 7.3.0) to an older one (like 6.5.87).
You can find out available versions by looking at sdk/extras/google/m2repository/com/google/android/gms/play-services
5.open the project again
Unfortunately Google Cloud Messaging was only added to the Play Services API in version 7.5, which was released end of May 2015 (see this Android Developers Blog post).
So, if you manage to find a copy of the v7.5 API (see my question regarding that here) or if the suggestion above by #Babak is safe (still investigating that one... and you can only go down to 7.5.0 before you lose GCM support), you might be able to gain a few months, but it will likely not make a huge difference...
Actually, I just noticed that your question was also posted end of May... So you probably won't be able to gain anything. But you may reduce support of you move to a new API version later!
Related
I know Apple has this API I can hit:
http://itunes.apple.com/lookup?bundleId={id}
However, for the PlayStore, I'm looking for something similar, rather than parsing the app page
https://play.google.com/store/apps/details?id={id}
and then looking for the <div> that contains itemprop="softwareVersion"
There are a few questions about this here on SO and elsewhere on the web, but they are outdated, and make reference to unofficial APIs.
There is no Official API for grabbing the App version from the Play store.
I'd be curious exactly what you would use such an API for, if you wanted to add it in a comment. There may be a better way of achieving what you want.
Edit:
For forcing an update to your app there are other recommendations. We normally recommend that you don't have "always update to the latest version in the Play store" to developers. For example, the user might want to use your app, but be in a place where they don't have much battery or wifi. Forcing them to update in such a situation is rude, it's much better to give them a week or two until a more convenient time.
If you want to do "never have a version that is more than a couple of weeks old", can I recommend Firebase Remote Config. This would let you on the server update a configuration options for your app saying "the user should have at least this version" and change the behaviour of your app accordingly. It is much more flexible at robust than polling the Play store.
Another approach can be the Support In-app updates besides Firebase Remote config.
Google has released the Support In-app updates feature in which the apps can nudge the users to update their apps without even going to the play store. If an update is available, the users will see a dialog or a full blocking screen where the UI is generated and controlled by google play.
In-app updates works only with devices running Android 5.0 (API level 21) or higher, and requires you to use Play Core library 1.5.0 or higher. After meeting these requirements, your app can support the following UX for in-app updates!
references are here and this helpful blog. Check this out, hope it will help.
I'm trying to update my app to the Google Play Store. I have the current version number of the app set to 2000000000 and would like to update it to 2000000001. Please don't ask my why there are such version numbers chosen.
I got this error message when I try to push the new version: "Upload failed
The version code of your APK is high and you risk not being able to update your APK.". The one thing I don't understand is that according to official google documentations the max version number is MAXINT, 2147483647, so I still have roughly 150 000 000 versions left. The other thing is, I managed to update other app with the same version numbering convention, the app is on the same dev account and I have no such error at all.
I checked all the numbers couple of times to be sure I'm not doing some stupid typo. I also already contacted Google support but maybe someone here have some kind of solution?
Google support responded to my requests. They changed the maximum available version code to 2000000000 and didn't update the documentation at the time I was posting this question (right now it is still MAXINT: 2147483647). Quite an edge case here but maybe someone will find this useful.
Looks like there was an update 08/11/2016 (UTC) in the docs. Not the old MAX_INT value or the 2000000000.
Warning: The greatest value Google Play allows for versionCode is 2100000000.
My Unity app had a high version code (not sure where from), I added version 3 and version code 3 in the Unity app, and that shut Google Play :) There is a crafty version for build.gradle though Unity 3D: What is the Android Bundle Version and Version Code and how do they relate?
Does anyone know, if google still plans to implement a delete functionality to their google drive android api?
To my astonishment, when implementing the last piece of some automatically scheduled 'cloud-backup' code using the 'drive android api' (using the latest Google Play service version, revision 22), I discovered that I was not able to delete files.
I found this hack here on stackoverflow, to mix in the 'Drive API Client Library for Java' for the delete part. I don't like this idea and would like to avoid this solution.
Additionally someone from google posted in January 2014 that a delete/trash functionality was 'coming soon' and it's March 2015 now...
Does anyone have a update/solution on this?
EDIT 24 March 2015:
The delete call is now natively supported by the Google Android Drive API. You just need to update your Play services lib to revision >= 23. Details: https://developers.google.com/drive/android/trash
UPDATE:
Delete is supported in the Google Drive Android API as of Google Play services 7.5 using the DriveResource.delete() method.
We recommend using trash for user visible files rather than delete, to give users the opportunity to restore any accidentally trashed content. Delete is permanent, and recommended only for App Folder content, where trash is not available.
Delete isn't currently available in the Drive Android API, but we are currently testing the behavior internally. It won't make the next Play services release, but we hope to have it in the one after; unfortunately I can't give a timeframe. Until that time, the Drive Java Client Library is the best way to do delete on Android.
If you have any other feature requests or bugs, we'd appreciate if you could file them against our issue tracker: https://code.google.com/a/google.com/p/apps-api-issues/
That gives requests more visibility to our teams internally, and issues will be marked resolved when we release updates.
As per the Cast SDK Docs, to use Cast SDK in Android I need, Google Play Services Revision 15.
I dont see Rev 15 in my SDK Manager. Can anyone else see it yet? or know by when we can expect to start developing for Android with rev 15? Is there an alternative stop gap to get around the problem till Google pushes out to all SDK Managers?
Can anyone else see it yet?
No, because it is not yet available.
UPDATE: OK, now it is. Let the downloading commence!
or know by when we can expect to start developing for Android with rev 15?
On the page that you linked to, in a large yellow box, you will find:
Developing with the Google Cast Android APIs requires Google Play services 4.2, which began rolling out to devices worldwide on February 3rd. Once the update to devices is complete, the corresponding Google Play services library (revision 15) will be available for download from the Android SDK Manager.
(emphasis added for emphasis, emphatically)
Note that today is February 3rd, which means the Play Services rollout just began today.
Is there an alternative stop gap to get around the problem till Google pushes out to all SDK Managers?
You can wait patiently. Or wait impatiently, if you prefer.
I believe AllCast "speaks" the Google Cast protocol (RAMP) and does not use the API. He probably sniffed it and reversed engineer it, much like others have with the AirPlay protocol.
So, if you are motivated and good with WireShark, you can do the same! Personally, I'm holding out for the API, most impatiently.
Sorry. I still can't comment, so I have to post everything as Answers (stupid rule)
I am looking for this library too and I didn't find it yet but why Allcast has one? I installed google play services 4.2 on my phone and then i installed allcast from google play and it works very nice. So why we can't get access to this library too? It is not fair we have been waiting for long time too! And why it is available first for iphone :(
It will take couple of weeks to release as mentioned here.
So we have to wait till couple of weeks more.
Google just released it. Check the SDK manager for an updated version of Google Play services (rev15).
Finally after some days challenges I can run the GoogleMapAndroid api version 2 on the monodroid by this link: https://github.com/xamarin/monodroid-samples/tree/master/MapsAndLocationDemo_v2
but when I start this this demo face with this error:
Google Play services out of date. Requires 3027100 but found 2012110
I want that my app be available on android 2.2 and upper. On the android 2.2 by default the google play services even is less than 2012110 what should I do to support 2.2 and upper?
Thanks in advance
Go to https://play.google.com/store/apps/details?id=com.google.android.gms from your device (or computer with the same gmail account logged on) and update it to 3.0.27.
If you can't see update for you device you may want to read last commens on this gmaps issue. I'm not sure how they do it, but my device didn't get update to 3.0.27 at first.
Edit:
Alternatively you may get an old version of google-play-services.jar (version 4 = 2.0.12 is first to have maps). This has small negative aspects: you will have some issues which are fixed in later versions, but not all of them as most are fixed in GooglePlayServices.APK and not inside jar file we add to our apps.
One thing I'm aware of is this:
http://code.google.com/p/gmaps-api-issues/issues/detail?id=4862 (see comment from Googler).
You will also not be able to create Circles, but that's not problematic for most apps.
Most of the time you don't want to use old version of jar and do checks like isGooglePlayServicesAvailable inside your app.