Posts

Showing posts with the label database

Firebase Database in Android with Phone Authentication - Kotlin

Image
Configure Database: (a) Go to https://console.firebase.google.com/ (b) Then click Add Project , a dialog will be prompted. Enter project name and choose country in it and click on Create Project . (c) Click on Add Firebase to your Android App, another dialog will be prompted. In that, enter package name and SHA-1 (compulsary for using Database) and click Register App . (d) Then download google_services.json file, by clicking download button and put that file in your module's root directory. (e) Then navigate to Database on Side tab and click on Get Started. Initially the Database rules will be like, { "rules" : { ".read" : "auth != null" , ".write" : "auth != null" } } Below rule is to allow everyone to read and write data without any authentication. { "rules" : { ".read" : true , ".write"