Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android 2.2.2 Firebase Assistant reconnect your app to firebase

I used Firebase Assistant which comes with Android Studio 2.2.2 to create a Firebase project. First I connected to a previous firebase project and then I wanted to create a new Firebase project but it always shows "Connect your app to Firebase" step as Connected and there is no button to get it back. I manually configured it but I wanna know if there is a way to do disconnect and reconnect it.

Thanks

Firebase Assitant

like image 985
ugur Avatar asked Oct 30 '16 20:10

ugur


People also ask

How do I connect my Android app to Firebase?

Open the Firebase Assistant: Tools > Firebase. In the Assistant pane, choose a Firebase product to add to your app. Expand its section, then click the tutorial link (for example, Analytics > Log an Analytics event). Click Connect to Firebase to connect your Android project with Firebase.

Why is my Android Studio not connecting to Firebase?

Just sign out your gmail account from Android Studio and then re-sign in again. After this, try again connecting to the firebase. It should connect!

How can I tell if firebase is connected Android?

If you want to know if the client is connected to the server before calling setValue() , you can attach a listener to . info/connected .


3 Answers

It seems you can't use the android studio client to disconnect your app project from your Firebase project.

But it is possible to do so from the Firebase Console

  1. Simply log in to the console
  2. Choose the project the app is connected to
  3. You will see a box displaying information about the Android App connected to the Firebase project
  4. Click on the 3 dots button at the top right of the android app box and click Manage
  5. Scroll down a bit and click the arrow button next to the Advanced Options header
  6. A Delete this app button will appear, click it and it will disconnect your android app from your Firebase project
like image 51
Mor Paz Avatar answered Oct 10 '22 22:10

Mor Paz


I have used a little trick that also solves the problem for me. You can delete your your google-services file and cut all the firebase dependencies from your gradle (i.e. compile 'com.google.firebase:firebase-auth:11.0.4'), hence, when you try to sync your project it will fail. After doing so, you can copy all your firebase dependencies back to your gradle file and sync the project. It will still fail since the google-services file is missing. Now, you can go to your firebase tool and the project will be disconnected.

like image 45
Raul Guerra Avatar answered Oct 10 '22 21:10

Raul Guerra


I know it is an old question but here is my answer in case someone needs again.

Follow every step in solution from Mor Paz. If even after that "connected" text does not dissapear you must follow these steps:

  1. In android studio just switch to "Project" mode in viewing folders. Mostly it will be on "android" mode by default. In Project mode you will have an access to all folders, files which are not visible in android mode. To do that just, click dropwdown menu in top left corner of window and select "Project" mode

  2. go to app folder and there you will find google-services.json file. Delete that file and restart you project. This file is from your previous FireBase project. Even if you disconnect your app from Firebase project, this file will not be deleted. Android studio recognizes this file and thinks that your app is still connected to FireBase. Thats why "connected" text in Firebase assistant does not dissapear so deleting this file is necessery

Now you should be good to go.

like image 1
Yeager Avatar answered Oct 10 '22 22:10

Yeager