1. Setting up the project
- Create a Firebase project in the Firebase console. The link will redirect you to the console, and click Create New Project.
- Click Add Firebase to your Android app.
- A window will appear asking you for your application’s package name:
- The package name should match the one indicated in the
AndroidManifest.xmlfile in your project directory as shown below:
- After adding the application to the Firebase console, you will be prompted to download a
google-services.jsonfile. Download and place the file in the app/ directory of your project.
2. Adding Firebase support to Android studio project.
- Add the following rules to your root-level
build.gradlefile, to enable google-services plugin:
- In your app-level Gradle file (app/build.gradle), add the apply plugin at the bottom, and also add the Firebase dependency:
3. Uploading the API key to Skillz
- Go to https://console.firebase.google.com/, and select your project.
- Select Settings (top left corner of the console)
- Select Cloud messaging tab
- You will see the server key, copy the server key
- Go to your Skillz developers console and select your application
- Select the Push Notification tab on your left
- In the Android - GCM Push notification, paste your server key to the blank text field, and hit Save: