I have a number of apps in my Google console: android connected to app engine. I need to use App-Engine and Google Cloud Messaging. The procedure asks me to choose App name and android package name. Then it says
Services will be added to your existing project in the Google Developers Console.
How does it know which project to add the service to? I can't seem to find where to tell it which project to use. For sure it keeps attaching them (apparently) to some default project as opposed to the correct project. I know that for a fact because it is not passing the correct projectId of my app-engine backend to the google-services.json. I am not sure I should manually edit the file. So any ideas how to generate the file the correct way?
I am referring to the Configuration File
Presently I am following https://developers.google.com/cloud-messaging/android/start
App Name and package name fields are editable fields when you're trying to create a configuration file as described here
You can choose an existing project that you created in your google developer console from the dropdown or enter a new name. If no app with that name exists in your google developer console, a project with that name will be created in google developer console. Configuration file generated will have project_id, project_numberfor this project and when you will use this json file in the android app, it will use them to connect to the correct project.
Related
I have an Android project where I am using Google Cloud authentication service, where I downloaded the google-services.json file and everything is working.
Now that using Firebase's Dynamic Link service, where it asks to download another google-services.json file and put it in the same location.
I don't know how to proceed in this case, any tips?
If you are using the same project then feel free to use the last one google-services.json that it suggests downloading because it will already include your previous configuration.
You can easily check this if you compare the first and second one jsons.
Make sure that you only have this most recent downloaded config file in your app.
You can get the most recent config file for your Android app in Firebase Console at any moment.
Go to your Project settings in the Firebase console.
In the Your apps card, select the package name of the app for which you need a config file.
Click google-services.json.
From a Windows, Android or IOS application, I would like to create a new Firebase account\project when the user installs the app.
Is that possible?
No, it's not possible
In order to create and add a project on firebase you need to upload your package name and
SHA-1(optional but still required for authenticating your client)
After that a JSON file will be generated and you have to put that file in your projects App folder and configure your Gradle files
so you can see now.
You cannot do this process on installing of app
I've set up a React Native Android app using the react-native-google-signin package, and everything is working great. I created a keystore to sign the app, created the proper credentials, and have a downloaded google-services.json file in my android\app folder.
When I change the package name (which I need to do), the app initializes but throws GoogleSigninError: DEVELOPER ERROR (code 10) after I choose an account and authorize scopes. When I check the Google Developer Console, it show requests being made to the clientID associated with the old package name. I've tried:
reissuing the credentials
making a new project in the Google Developer Console
cleaning out the various gradle build directories
revoking permissions
My instinct from trying to find similar issues is that it's an Android build issue, which I'm not very familiar with. Any help would be appreciated.
That means application is misconfigured. This error is not recoverable and will be treated as fatal. The developer should look at the logs after this to determine more actionable information.
Generate new android appkeyvand clientID in google console. Because old key config with the old package name .
I tried clicking the GET A CONFIGURATION FILE link from the docs, but the resulting page just loads and loads. This happens in Firefox and Chrome and on my phone. Is there some other way to get a config file?
EDIT: I am getting these errors in Chrome Dev Console:
Refused to display 'https://accounts.google.com/ServiceLogin?service=cloudconsole&osid=1&passiv…ed%253Dtrue%26cntlbl%3DContinue%2BAdding%2BSign-In%26cntapi%3Dsignin&hl=en' in a frame because it set 'X-Frame-Options' to 'DENY'.
Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('https://console.developers.google.com') does not match the recipient window's origin ('null').(anonymous function) # script_foot.js:348n.event.dispatch # jquery.min.js:3r.handle # jquery.min.js:3
This might be a temporary issue due to network connectivity or something like that.
One solution would be to try again at a later point in time. This might be happening because you're trying to download the google-services.json for the sample project (com.google.samples.quickstart.signin).
If you want result now, you could follow the steps to integrate the Google Sign In into your app.
Create a new empty android studio project/if you have an existing
project skip this step.
Use this link and follow the onscreen instructions to generate the google-services.json for your app.
The app name here refers to your project name in Google Developers
Console. If you've already setup your Google developers console
project for your android app, you can select that via the drop-down
menu. If you have not created one, just enter a name and that
project will be created for you in your developers console.
Select the google services you need for your project viz Google Sign
In, Google Cloud Messaging, AdMob etc. In our case, we just selected
Google Sign In.
You will be asked for SHA-1 hash. Follow these steps to get one.
Click on generate configuration files. Next screen you will be presented with an option to download google-services.json for your app. Download that and you're good to go.
Once you have the google-services.json, follow these steps to complete the Google Sign In.
References
Start Integrating Google Sign-In into Your Android App,
Integrating Google Sign-In into Your Android App.
You will get "google-services.json" as soon as you create a Firebase project.
But, in case you missed and forgot to download that, you can still get the JSON file from the existing project-
Just select the project from firebase console.
Head over to project settings
scroll down (Yeah!, there it is!)
Screenshot :
OK, I've found a workaround if anyone else is having this problem.
Based on the error message about being unable to display https://accounts.google.com/ServiceLogin?service=cloudconsole&osid=1&passiv…ed%253Dtrue%26cntlbl%3DContinue%2BAdding%2BSign-In%26cntapi%3Dsignin&hl=en in a frame... I just followed that link directly.
EDIT: None of the other links were working for me. If you came searching for the console errors Refused to display..., this is the answer for you. This bug seems to have been fixed for the google-services.json, so if you're just looking for the link, the highest-rated answer is the one you want.
Referring to this page:
The Firebase console will help you download the google-services.json. In addition, the Quickstart guides for most APIs have instructions for generating this file. Once you have downloaded the google-services.json file, copy it into the app/ folder of your Android Studio project, or into the app/src/{build_type} folder if you are using multiple build types.
So go to Firebase Console, press add new project and follow instructions
I am trying to follow
https://developers.google.com/gmail/api/quickstart/android
To get talking to the GMail API for Google Play.
I have created my project, my credential using the SHA1 from my debug.keystore file. I have double checked the package name is correctly matching. I have verified that Android studio is signing w/ the debug.keystore. I am still getting Access Not Configured when trying to run the example code. Does anyone have any ideas?
I guess, if you have ended up following the documentation, the issue could be:
The build.gradle file in the app module, there, the package name would should point to a different one and not yours. Cross check.
Also try adding couple of other APIs as well, like Contacts and Google+ APIs in console.
It is working for me!