Skip to content

Firebase Authentication with Email & Password used Cloud Firestore Database & Realtime Database (Kotlin Programming)

Notifications You must be signed in to change notification settings

sabo99/FirebaseAuth-Email-Password

Repository files navigation

Firebase Authentication with Email & Password

Authentication Android application using Firebase with the login system using email & password

App Features Firebase Authentication with Email & Password :

  • Firebase
    • Cloud Firestore Database
    • Realtime Database
    • Authentication with Email & Password
  • MaterialAlertDialog
    • CustomView BottomSheet Dialog
  • SweetAlertDialog
    • Message Dialog
    • Loading Dialog

Important!

Add Firebase to your Android project go to Firebase Setup


Design UI App Firebase Authentication with Email & Password

Preview Firebase Auth with Phone Number

Preview UI FirebaseAuth-PhoneNumber

Name Page Preview UI Preview UI 2
Home Page None
Sign Up BottomSheet Dialog
Sign In BottomSheet Dialog
Main Page

Result on Firebase Console

Authentication

Realtime Database

Cloud Firestore Database


Dependencies used

    /** Firebase */
    implementation platform('com.google.firebase:firebase-bom:29.0.1')
    implementation 'com.google.firebase:firebase-analytics'
    implementation 'com.google.firebase:firebase-auth-ktx'
    implementation 'com.google.firebase:firebase-database-ktx'
    implementation 'com.google.firebase:firebase-firestore-ktx'

    implementation 'com.github.thomper:sweet-alert-dialog:1.4.0'
    implementation 'com.afollestad.material-dialogs:core:3.3.0'
    implementation 'com.afollestad.material-dialogs:bottomsheets:3.3.0'
    implementation 'org.greenrobot:eventbus:3.3.0'

Integration Step Used Binding in Kotlin

  1. Add viewBinding true build.gralde (Module)
android {
   ...
   buildFeatures {
      viewBinding true
   }
}
  1. Activity Kotlin Class
class MainActivity : AppCompatActivity() {

    /** Add this */
    private lateinit var binding: ActivityMainBinding

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        /** Add this */
        binding = ActivityMainBinding.inflate(layoutInflater)

        /** Change this */
        setContentView(binding.root)

        /** Without findViewById */
        binding.textView.text = "Bye bye findViewById"
    }
}
  1. Activity Java Class
public class MainActivity extends AppCompatActivity {

    /** Add this */
    private ActivityMainBinding binding;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        /** Add this */
        binding = ActivityMainBinding.inflate(getLayoutInflater());

        /** Change this */
        setContentView(binding.getRoot());

        /** Without findViewById */
        binding.textView.setText("Bye bye findViewById");
    }
}

binding in kotlin can be used directly without initializing findViewById on widgets in layout xml

About

Firebase Authentication with Email & Password used Cloud Firestore Database & Realtime Database (Kotlin Programming)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages