I have been struggling with setting up my app in the Android Developer Console. Specifically, I need to set up and assign a client ID to the App (or linked app, not sure), however, I am unable to do so.
Any attempt to create the client ID I am told one already exists. Yet, I can not publish my app since the app is not linked to one with a client ID.. or so I gather.
//I am unable to press the create button. I am blocked out from doing so.
///the step required to publish.
You need to provide the correct package name that your app uses as well as generate the fingerprint using key gen and paste that key there. Without those, you cannot create a client id for your app. The required steps are explained in great detail in their help pages.
Related
I have one query regarding usage of client Id in Google Developers console.
For one project, someone had created one clientId for using Google fit API's for storing fitness data. And I don't have the credentials for account used for creating the Client-id. Also I'm not able to find the client-id anywhere in code.
Now I want to add Google Sign-in using "AppAuth for Android". For which I need to add clientId and redirectUri in code.
My question is, can I create new clientId and redirectUri with any other account using same SHA1 fingerprint and package name? or Do I have to use the same existing client-id? (which doesn't seem to be a possible way)
Edit1:
As #iainmcgin mentioned I tried to create one using the same SHA-1 and package name, but getting below error.
The fingerprint that you specified is already being used by an Android OAuth2 client ID in this project or another project.
Google engineer on the Google Identity Platform team here - we enforce a 1:1 mapping between client IDs and package name + certificate hash, so you can't create another client ID. You'll need to regain access to the project that defined the original client ID; if you are not able to do that, contact me at iainmcgin#google.com with the details of your app and I'll try and put you in touch with people that can verify your ownership of the app and either delete the original client, or give you access to the original project, whichever turns out to be more appropriate.
I am getting exception as below:
Well, I've used or say copied same code as this shown in google doc https://developers.google.com/google-apps/calendar/quickstart/android .And I know it is the same error which is already mentioned in troubleshooting part of this doc but as mentioned in its solution, I had checked my SHA1 fingerprint and also package name and all the stuffs but still getting same error. And also I tried to google and followed each and every link the google suggested but nothing works for me so my last option was STACKOVERFLOW and so I am here. Please help if any one can. Thanks in advance.
Also I forgot to mention, it says "Unregistered Android application" it means that the OAuth2 client ID I created is not found by the app but I don't know how can I make it find my OAuth2 client ID and solve my problem.
Please make sure that:-
You enabled calendar API in google console for that project you are using, as the link provide in your response.
Also match your package name in AndroidManifest is similar to the package you mentioned in google dev console with SHA.
Try to create an Oauth client id under corresponding project in google console. Follow the steps in this link.
To create an OAuth 2.0 client ID in the console:
Go to the Cloud Platform Console.
From the projects list, select a project or create a new one.
If the API Manager page isn't already open, open the console menu and select API Manager.
On the left, click Credentials.
Click New Credentials, then select OAuth client ID.
Note: If you're unsure whether OAuth 2.0 is appropriate for your project, select Help me choose and follow the instructions to pick
the right credentials.
Select the appropriate application type for your project and enter any additional information required. Application types are described
in more detail in the following sections.
If this is your first time creating a client ID, you can also configure your consent screen by clicking Consent Screen. (The
following
procedure
explains how to set up the Consent screen.) You won't be prompted to
configure the consent screen after you do it the first time.
Click Create client ID.
Based also from this related post, you have to give permission from your calendar configuration (Calendar configuration -> Share this calendar) to the email account specified into Google Api Console (email adress).
Hope this helps!
This might sound like a stupid question but I can't grasp if I'm doing this correctly.
I created an app in the developer console using the "Game Services"-tab. Meaning I didn't actually "create" an app as far as I understand. In the "All applications"-tab I have ZERO apps because I haven't created one there yet. But if I check the "Linked apps"-tab, I already have an app there with a bundle-id xxx.yyy.zz (not the real id). If I now create an app in the "All applications"-tab with the same bundle-id (xxx.yyy.zz), will it automatically be linked?
To properly link an app to the Game Service you will need to also specify the fingerprint of the signing certificate you use for your app and the package must match.
Check out Step 2 in this guide for the exact steps needed.
I have created Android client id for expense.loremipsum.tracker for my app. Actually I have created 2 id, one for by Eclipse keystore and one is for my signed key store. My application is live so I can not change package.
I have tried by deleting project and recreating project but couldn't work. Now I am not able to create client id for expense.loremipsum.tracker.
I refereed this question. Should I contact Google? Now from any project I am getting this error This client ID is globally unique and is already in use
My application is live and not working Google Plus client.
Edit
Right now I have not any Android client id regarding this expense.loremipsum.tracker and I am still not able to create single one for this.
Try going here to see if you have old projects:
https://cloud.google.com/console#/project
What ended up resolving this for me is what Ketan suggested. You need to go here:
https://code.google.com/apis/console/
Then click the drop down menu in the top left underneath your name (if you don't have any, create a basic project, then go to the dropdown menu). From there, you can see in Ketan's screenshot that there is an undelete. Undelete your project.
Once undeleted, go to the 'API Access' section. If you have anything under 'Client ID for installed applications', click delete of this on the right. Then you can delete this project again.
Once that was done, I was able to recreate my game services OAuth 2.0 in the Google Play Game Services page at the regular Google Play publish page:
https://play.google.com/apps/publish/
No need to contact Google.
If you delete project it doesn't mean you delete client id.
You have to delete client id because it's unique.
If you have deleted project then Go to undelete>(your project) and delete client id
Go to the https://console.developers.google.com/project
select a deleted project then in the sidebar on the left, expand APIs & auth. Select credentials and click delete button to deactivate the clientID.
Now I managed to sign the apk (using Eclipse Android Tools) and adb install .. to the device for testing.
But this removed the debug function, e.g. "step over" which make problem tracing much more difficult.
Is it possible to debug the inapp billing using Eclipse?
Unfortunately I don't think there is any way to step debug, I have just been using print outputs. This is due to the fact that you have to sign your app with a release key in order for it to communicate properly with the billing service. Very annoying.
When you go through the in app billing documentation, you kinda realize that it can take substantial amount of time to understand this complex piece of technology. Most developers feel the need for a working HelloWorld, and then later play around with the builds.
I have uploaded 2 projects
The android sample project. You can download this project, and immediately run the sample. This will help you quickly debug/trace thru and figure out how the in app billing works.
A cleaned up project to help you integrate your app quickly. This can help like a library. Just integrate make your “purchase requests” on your “checkout” button action.
Mind you : I have not incorporated the security recommendations. Read android in app billing documentation. Until then you are on your own risk.
For 1
Download “http://www.4shared.com/file/f5wH3qke/InAppBilling1.html”
Create a new gmail account for all correspondence (Why, I will explain below)
Pay that 25$ and purchase a “Market Place” account.
Import the project to your eclipse environment
Create a signed application apk, File-Export-Select Your Project-Create OR Use keystore, it should be valid for 25 years from today.
Upload the signed apk to the market place as a “Draft Application”, DO NOT PUBLISH it.
For the uploaded apk, you need to add “In App Products”. You will find this link on the home page for your uploaded apk.
In Security.java dont forget to add your “public key” from your market place account “edit profile” page.
On the “In App Product List”, you need to add the following products one by one
The text below should used as “In app Product id”
sword_001 as Managed
potions_001 as Unmanaged
Title and Description dont matter (for testing purpose). Add what you need here.
Cost add 1$ (minimum)
Click auto fill
Save
Publish the in app project (dont get confused here, you only need to publish the in app product, NOT the APP)
In the test account, add your personal gmail id here. Now, this gmail account needs to be configured as your first gmail account on your phone.
Yes, this WONT work on your emulator
Now the sample app should work.
For 2
Download “http://www.4shared.com/file/h8YnJyf_/InAppBillingIntegration.html”
To integrate, in your calling activity initialize the checkout code
Handler handler = new Handler() ;
CheckoutPurchaseObserver checkout = new CheckoutPurchaseObserver(this, handler);
To send the checkout request for your product
checkout.sendCheckoutRequest(purchaseUri.toString(),null);
Important Note :
This purchaseUri is the “In-app Product ID” of your resource on the “market.android.com/publish-->Create New In-App Product” options. This string should be set as the “in app product” id.
That’s why the “id” is most important. The “In-App Product ID” is how you refer to that particular product.
Also, in Security.java dont forget to add your “public key” from your market place account “edit profile” page.**
Debugging Notes
LogCat will show all errors as InAppBilling tag
This project creates a shared_preferences named “inappbilling” And debug is set to true
The androidmanifest.xml may not be needed since this project does not
have a home screen.
Why do we need to create a new gmail account ?
Simple. The account you purchase your market place account for, cant be used for “testing” your in app billing. Since you cannot purchase products for yourself. And your primary account on your device should be set as a “test account” on the market place account. Chicken-Egg issue here. Hope its clear.
An interesting blog I came by “http://crazyviraj.blogspot.com/2011/06/some-notes-on-implementing-in-app.html“ (not mine).
In my app, I used the test product id, android.test.purchased, which will simulate the actual buying process (ie, will show the in app dialog and you'll be able to purchase and get a response that can be handled by your application). Using that product id, you can run the in app code on the device (unsigned) via eclipse over usb connection. You still might need to work around some things for testing (ie, account for the fact that you are using a testing product id and not your real id), but I found using that product ID did help me quite a bit.
See the testing section of the in app billing guide