How to solve firebase not working by changing package name already in connection with firebase?

147 views Asked by At

- I have developed an app that is working properly with the default package name (i.e. com.example.appname.

  • But As the Play Store would not allow an app with a default package
    name, it must be changed.

  • So I have changed it throughout the app but you all know the
    connection with Firebase can be established using the app package
    name which creates a file( google.services.json).

  • Hence By changing the package name, the app wouldn't be using Firebase services.

Desired Solution: How I can use Firebase services without recreating the whole project with a Firebase connection?

1

There are 1 answers

0
Pawan Harariya On

You will have to re-register your app on Firebase.

  1. Go to the Firebase console.
  2. Go to the project that has your app. (Choose the same project, so you have your data if any)
  3. Click to Add app and then choose Android/Flutter. (You can delete your previous app once current app is registered)
  4. Fill in your new package name and SHA details.
  5. Download the new google-services.json file and replace it in your Android Project.

Step 2

Step 1

Step 3