Android DrEdit Registration Of Google console api - android

I am creating Oauth 2.0 client id for DrEdit gdrive sample application.
I am doing everything as explained in Readme file of the repo. providing my SH1 certificate and giving package "com.example.android.notepad" , but when i am clicking on "create client id" then it is saying that "This client ID is globally unique and is already in use."
Please tell me how to setup this app and create client id for it.
Thanx

(From comments, please give complete answers in the future)
com.example.android.notepad is already in use. Change the package name of you app.

Just to add a little more detail Ali's correct answer:
You must change the package name in your android manifest file for it to work. You do not need to change the package names in the java files themselves.

Related

Leaked GCP API Keys : Your app contains exposed Google Cloud Platform (GCP) API keys. Please see this Google Help Center article for details

I am getting this error from Play Store:
I tried to limit the access of API key within that file but still getting this error. How can I solve this?
Make sure that keys are not leaked via sites such as GitHub.
Notice the message wording "Your app contains exposed ...". That message did not say your app is exposing the keys.
You will need to delete the key and create a new key, update your app, etc.
Delete current key and create new one. Also make sure you apply restrictions like HTTP referrers, IP Address restrictions etc. based on your use case. For more info, check this
https://cloud.google.com/docs/authentication/api-keys#api_key_restrictions
The error is due to the API key being included in your source code. Consider using Google's Secrets Gradle Plugin for Android to hide your API keys from source code. Documentation at https://github.com/google/secrets-gradle-plugin and demo by the author at https://youtu.be/X8lYNW_Or2o

Can i publish a new app by using existing app package name

I want to know that can I publish a new android app with existing app package name?
i.e I have a photo editor and its package name is com.myapps.photoeditor. now I want to make new version but i will publish VPN. so the new app will totally different.
VPN will be ok with existing package name com.myapps.photoeditor?
plz guide me
No, you cannot do this. Package name basically I unique ID for an app. When a package name is associated with an app and it is published over google play this is a unique ID for that app. You cannot publish new app with the same package name but you can update the app.
You can't publish two apps with same package name as google consider it as primary key but story doesn't end here. There are two things you can do:
you can update your app, here updates mean you can remove existing feature, you can add new feature, you can modify existing feature but you have to handle it properly.
But you want the new feature in a separate app then you should change clone your existing code and add new feature and change package name before publishing. (Not Recommended)
If you mean by package name as the applicationId in build.gradle, then the answer is NO. Your new VPN app will overwrite your existing Photo editor app.
If you mean by package name as the package name used by your source codes, then the answer is IT DEPENDS. YES you can use same package name in source code provided that you provide different name for applicationId. NO you cannot if you provide the same name for applicationId regardless of what you use as the package name used by your source codes.
Know the difference here: https://developer.android.com/studio/build/application-id
If you want to release a new app with applicationId (from app/build.gradle) same as any apps before, you can't do it.
If you want to update an existing app with complete new ideas or feature or name or type, having access to that app's signing keys and developer account, yes you can do it. Just release with version code greater than before

When I change the package name, where else I have to change?

First I uploaded one app with one package and now client changed the package name, in my app I used FB login and push notifications with the old app, so I have to change any thing in the FB developer either I have to create new account or I can use the old fb developer account and app_ID, with changing of the Package name.I am so much confused what I have to do, when I change the package name,please suggest some solution.
You also have to change the folder names to match the name of the new package.
For example the package:
xxx.yyy.zzz
Should correspond to the directory:
xxx/yyy/zzz
First , In android code, you will need to change package names in manifest xml and gradle mainly. use refractor for that.
secondly,
you mentioned that you used fb login and push notifications,
so for these, you will need to make some changes .
in Facebook developer app settings page, simple add your new package name to existing package list,
and for GCM push notifications, do the same on developer console and create new configuration files and add them to your project and everything will work fine.

ACRA formkey where to get it?

So I tried to follow instructions of https://github.com/ACRA/acra/wiki/BasicSetup but its too old or something.
Using my own gmail account I did import the csv file but there is no option "Create a LEGACY Form" in tools menu but only "Create form". If I create a form there are no fields of imported csv file (like I can see on screenshot in BasicSetup document) but it prompts to add fields manually using "Add item". And there is no any formkey around. The http link of form is looks like: https://docs.google.com/forms/d/1KNF_R4_Re0X0giFfEXwqXY50mpnFvQUvp0NLkKxyI/edit# or if I choose "view live form" it is https://docs.google.com/forms/d/1KNF_R4_Re0X0giFfEXwqXY50mpnFvQUvp0NLkKxyI/viewform As you can see there is no formkey included.
So the question is there I can find that fomkey now?
As the use of Google Docs is deprecated for ACRA I recommend you to use BugSense as your Back-End service:
1. Go to their site and sign in: http://www.bugsense.com/
2. Create a new project to monitor in BugSense site, as a result you will receive an API Key for this application.
3. Finally add this line to you Application class in you project:
#ReportsCrashes(formUri = "http://www.bugsense.com/api/acra?api_key=YOUR_API_KEY", formKey="")
You can also check this blog post I wrote on:
Crash Reports and Usage Monitoring
Google spreadsheets are not supported on ACRA. Use a third party provider like BugSense instead or write your own error collector.
I have tried ACRA with my custom domain which handled by google and at that time i could not found any option to create to
Create a LEGACY Form
then after i have tried with my personal gmail account and its works .
so i came to conclusion is that :
ACRA dose not support Third party domain even-though they provided
google .

Android GCM SENDER_ID, how to get it?

I try to migrate to GCM and I have an issue with the SENDER_ID I need to provide. I use the demo project from google. In this project I need, if I understand this well, to provide a SENDER_ID to the application in the CommonUtilities.java file.
The SENDER_ID I provided is the API key I registered on https://code.google.com/apis/console/ and has this form: AIzaSyAxxxxxxx_xxxxxxxxxxxnoGZw (total 40 chars).
Using this string as SENDER_ID I get on "BroadcastReceiver mHandleMessageReceiver" an error message: From GCM: error (INVALID_SENDER)..
Where is the mistake? The string I provide is not the SENDER_ID?
Thank you.
No, the SENDER_ID is the project ID you signed up at Google API console, it should a numeric string. e.g. on your browser URI, you should see this:
https://code.google.com/apis/console/#project:4815162342
The Sender ID is 4815162342
Updated Answer:
Google has not updated its docs completely. The above answer is old and its based on this documentation and it seems that its still not updated.
According to updated Google docs, it seems that Project Number on Google API Console is used as SENDER ID
I have done for Latest Google API Console.
How to get SenderId:
Steps:
Open Google api console
Create project
Click on Left hand side menu icon
Click on Google cloud Platform
You would get SenderId form there
Reference:
Hope this will help you.
Go to your Google APIs Console page. Select the project you use from the drop down menu on the left. Select Overview and now you can see you project number. It is the SENDER_ID you have to use
Another way to get your project number is to get the value of "project" from your url. Your url has to be like this: "https://code.google.com/apis/console/b/0/#project:886025556782". Here the project number is "886025556782". this number is SENDER_ID
An updated answer as of Nov 2014 IF YOU'VE CREATED AN API PROJECT RECENTLY.
First of all, correct, you should absolutely go to the Google Developers Console and find the Project that you have GCM enabled on. When looking at the Overview section (left-hand nav panel), you'll see Project ID and Project Number listed on the right hand side. Project ID was failing for me (which is what led me here), but when I tried the Project Number, I'm able to register my clients correctly now.
Note that this is different because Google modified how they assign project IDs recently. In October I made a project and was given an all numerical Project ID, which I assume would work fine. But the one I created today was given a two-word and a number id (like Hamster-Party-420) and a numeric Project Number. The URL to my project contains Hamster-Party-420, and the Project Number is only visible on the Overview screen.
Yet another updated answer with little more explanation for the confused(..like I was).(with due credit to #azgolfer, #PankajAndroid and #Adam)
1- If you create a project at https://console.developers.google.com, you can see two things "PROJECT ID" and "PROJECT NUMBER" in project overview. Project Id is no longer numeric but alpha numeric like master-xxxxx-1234. Project number is a 11 digit number like 123456789100.
2- Even when you inspect the browser link you can find it as:
https://console.developers.google.com/project/master-xxxxx-1234
So is master-xxxxx-1234 is the SENDER_ID (at some places referred as PROJECT ID)? NO.
You have to use the project number as project id in GCM.
3- Where can you cross check that project id is being used as project id?
On API Dashbaord. (url: https://code.google.com/apis/console/b/0/?noredirect#project:12345678900 - where 12345678900 is your project number on project dashboard.
SUMMARY: Project Id in Project Dashboard and API Dashboard are different. The project number in project dashbaord is used as project id in API Dashboard and Project Id in project dashbaord as Project name in API Dashboard. So the project number shown in the Project Dashboard when we create project in developer console is used as SENDER_ID in GCM.
Go to "Dashboard" in the latest version of the developers console, click the drop down arrow under "Project: Turtle Power" and you can see the Project number right there! Use that as your SENDER_ID
(fake project so don't even try it =P)
Maybe you haven't activated Google Cloud Messaging for Android in API COnsole.
Here is the instructions:
http://developer.android.com/google/gcm/gs.html
We spent hours trying to figure this out. The problem was that our android manifest did not include the sender id!
If you came here because you are doing web push, Android push, or the like, there is a different answer.
Source: https://firebase.google.com/docs/cloud-messaging/js/client
the SENDER_ID you are using is nothing but the authorization key.
you can find the SENDER_ID at your projects Google APIs Console pages URL
https://code.google.com/apis/console/#project:8543162367
here 8543162367 will be your SENDER_ID ,
and also the Project Id is no longer numeric its alpha-numeric or only numeric or only alphabetic anything but its position is same as shown by me

Categories

Resources