Google Drive Android API delete files - android

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.

Related

How to know what version of Google Play Developer API version I am using? What are the steps to update the Google Play Developer API version to v3?

A few days ago I got to see one warning notification in my Google Play Console. It says that
“We’ve discovered that you’re using an old version of the Google Play Developer API in your app. As of December 1, 2019, versions 1 and 2 of this API will no longer be available. Please upgrade to version 3 by then.”
But I can't figure out how am I even using the API or which version of the API I am using.
Please help me to get rid of this warning.
The documentations are not enough.
(I am not able to comment, so I am providing as answer)
Your post doesn't specify whether your app has a server component. But based on the error message I am assuming that it does. One way to know which version of the API you are querying is to log the outgoing API calls you are making, and your log should look similar in form to this: https://www.googleapis.com/androidpublisher/v3/applications/packageName/.... For example if you want to verify a subscription on your server side, you would call https://www.googleapis.com/androidpublisher/v3/applications/packageName/purchases/subscriptions/subscriptionId/tokens/token.
Notice that each of these paths has the substring v3. My guess is yours says something else. So identify where your app is making outgoing calls and log those.
If I misunderstand, please clarify in the comments and I will edit.

Official API for grabbing app version on Google PlayStore

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.

How can i use older version of google play services?

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!

Not seeing Google Play Services rev 15 in SDK Manager (yet) for Google Cast SDK

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).

GoogleMap android api version 2 Requires 3027100 ? (monodroid)

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.

Categories

Resources