I am trying to implement AppInvites. I have gone through all steps written here https://firebase.google.com/docs/invites/android
And constantly get RESULT_CODE = 3
, what have I done wrong?
Just to be sure it's not your code, you can download Firebase's quickstart samples from here: https://github.com/firebase/quickstart-android. Make sure to update the app-level gradle file with the right package name.
The guide you followed is a little incomplete, and doesn't explicitly mention the need to provide your app's SHA1 key when setting up your project in the Firebase console. Here's how to add the SHA1 key for a release certificate and a debug certificate to an existing Firebase project:
How to find the SHA1 for your keystore:
For the release certificate, type the following:
keytool -exportcert -list -v -alias <your-key-name> -keystore <path-to-production-keystore>
Note the SHA1 key it provides.
For the debug certificate, type the following:
keytool -exportcert -list -v -alias androiddebugkey -keystore %USERPROFILE%\.android\debug.keystore
Again, note the SHA1 key it provides. Since this key is unique to each Android development environment, feel free to repeat this step for each environment you want to build from.
Once your have your SHA1 keys, enter them both into your Firebase project:
From there, you just need to download the new google-services.json file and add it to your project's /app directory.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With