Google Drive Authentication Exception - Needs Permission? (v2) - android

I have been trying to add Google Drive(v2) into my Android application and I can’t get past authorization. I have been getting UserRecoverableAuthIOException, with the message “NeedPermission.” I have a feeling that there is something wrong with my Client ID on Google API Console, but I thought I should post here to see if anyone could shed some light on my situation.
I have implemented the Drive Quickstart for Android, and I ran DrEdit with no problems. (https://developers.google.com/drive/quickstart-android and https://developers.google.com/drive/examples/android)
The only real difference between my application and the sample/example applications is that the Google Drive code would be in a library project, so I tried the following:
I created a project with a package name (Let’s call it com.example.googledrivetest), that had the Android Quickstart code. This ran perfectly.
Then, I made this project into a Library Project, and changed the package name (Let’s call this com.example.googledrivetestlibrary), and made a project with “com.example.googledrivetest” as the package name. This new project called the library project. Running this new project worked correctly as well!
So, I tried moving the code that was getting the UserRecoverableAuthException in the other project into the library project (since, it was working). To my surprise, it worked perfectly.
Now, both “com.example.googledrivetest” and my other application (with the exception) are both registered on Google Console APIs’ API Access. So I tried changing “com.example.googledrivetest” to “, and then it started getting the UserRecoverableAuthIOException. If I changed it back to “com.example.googledrivetest,” it worked again.
So, I was wondering if there is anything I am doing wrong, or need to add to my code to get it to work.

Related

Google Places Autocomplete Can't load search results

I am trying to implement the Google Places Autocomplete API sometimes I am able to get location list but sometimes I get "can't load search results" message. Can someone pease help me with the issue.
This issue have a few possible reasons:
No billing account associated to the project
If you are still using the old Places
SDK
If you reach your quota limit(e.g. self imposed cap
usage)
If your app is not properly
restricted
If any of the above doesn't fix your issue, it would be best to reach out to the support team of the Google Maps Platform as this error commonly has something to do with your configuration in the GCP console wherein only the support team of Google Maps Platform can assist you.
Hope this helps.
i already added the billing service also then get the same error then i added the api key in gradle file and then its works for me
Added your api RNGP_ANDRIOD_API_KEY=***** in gradle.properties
If any of the above still doesnt work, and if you happen to be using an emulator to run the app, try uninstalling the app, then re-installing it when you run the program in android studios.
Background info:
I happened to encounter this issue on my emulator despite doing everything mentioned above, but when I tried downloading the app onto my phone, I found it working there so I tried uninstalling the app on my emulator and it worked after.

Codepush is not updating the app

I am using code push to update the app at run time. I already updated app 4-5 times. Now currently I have added auth and share functionality to the app with third party packages. I have commented all the code for share and auth functionality. I also did some native code changes also.
While doing code-push app is not updated. I got this error 'Unable to get the hash of the binary's bundled resources - "codepush.gradle" may have not been added to the build definition
As per document Codepush only update JS, CSS files. I already commented the new features auth and share.
I checked few solutions on the github, but none is working for me.
Note: 1. For testing purpose, I installed the app in device with auth, share functionality. Then I did some text change and then code push. Here changes are reflected properly.
2. I have also added custom fonts to the app.

Google sign in integration into android library project

i'm trying to integrate google sign in into my app, i've followed all the steps from developers site and it works perfectly on standalone app, BUT, i need to create an android library project where i'm going to have an activity, which must have google sign in button. So i include this library project into an application project and then extend that activity in it to reuse base sign in activity. Ok, now about a problem, when i run this project on device with Android 5.1 it works as it should, but on KitKat it fails. I've tried on different devices, the same story. I've tried with different Google Play Services versions, the same. Can anyone point me to what i'm doing wrong, please ?

Android: Licencing sample app works but integration doesn't

I've just finished designing a small android app and have now come to a point where i want to license this app and add it to the android market. I've implemented the LVL without any problems but when i come to test the licensing i am always getting the response "NOT_LICENSED" even though in the developer panel i have set the response to "LICENSED". I then uploaded the sample licensing app through the developers panel and tested it, this works fine and returns whatever i set the response to be.
I have copied and pasted the whole sample project into my existing project and am still getting the same response. Is there something i am missing?
My app in the developers panel is unpublished but still it should return a licensed response shouldn't it?
Thanks
Not sure why this wasn't working but i found a way to fix it anyway. I had to remove my app from the market then re-add it.

How to get Android Market licensing sample to work?

I downloaded the sdk and added the library to my workspace, then the sample for market licensing. The sample app seems to force close somewhere after/during the instantiation of LicenseChecker. I tried running on the emulator with Google API 8 and on a droid x with froyo and it force closes. The stack shows PerformLaunchActivity as the top item.
Both emulator and phone had a registered gmail account.
Any ideas how to get this to work?
Ok, simple answer was look in the code and replace the public key as it says.

Categories

Resources