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
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.
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!
If you want to know if the client is connected to the server before calling setValue() , you can attach a listener to . info/connected .
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
Delete this app
button will appear, click it and it will disconnect your android app from your Firebase projectI 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.
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:
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
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.
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