-
Notifications
You must be signed in to change notification settings - Fork 1
Setup Firebase database
-
Go to https://console.firebase.google.com and login with a google account.
-
Click on the Add a Project button, name your project, and create it.
-
On the next page, click 'Add Firebase to your Android app'.
-
The following dialog will pop up [Add Firebase to your Android app]
- the Android package name is the applicationId in your app level build.gradle file in your Android Studio project
- the App nickname can be whatever you choose.
- the last field is necessary if you would like to allow users to sign-in with their Google accounts. This makes sign-in simpler for users and makes email validation simpler for the user. If you would like to enable these features, steps 5-9 will show how to acquire the Debug signing certificate SHA-1.
-
In Android Studio, navigate to Build -> Generate Signed APK... . This will give you the following dialog:
-
Click the create new... button and a second dialog will pop up: Here, you should specify a key store path, a password for your key store path, a key alias, and a password for the key. You will also have to enter at least one piece of information in the Certificate box at the bottom of the dialog. Click ok.
-
Now you're back to the Generate Signed APK dialog, and we'll simply cancel out of this.
-
Click on the Gradle Menu at the far right side of the Android Studio interface to expand it. Then click on Android, then Signing Report, then the Run option, as shown below.
-
After the command finishes running, go to the Run Tab at the bottom of the screen and click on the icon highlighted below. You will then see at the top of the Run Tab
SHA1
followed by your own key. Copy and paste this into the last field on the Firebase registration page. -
Now you will be able to download your own google-services.json file. Save it to the following location:
-
The add Firebase SDK portion has already been done for you - this code is already in the WurmPaint app. Simply click through.