Firebase Blog App Login and Register in Android Studio part 2

Опубликовано: 11 Январь 2025
на канале: Android Development Tutorials
66
1

In this we will make login and register in android studio for Firebase blog App part 2

Add Firebase to your Android project

Install or update Android Studio to its latest version.

Make sure that your project meets these requirements:

Targets API level 16 (Jelly Bean) or later
Uses Gradle 4.1 or later
Uses Jetpack (AndroidX), which includes meeting these version requirements:
com.android.tools.build:gradle v3.2.1 or later
compileSdkVersion 28 or later
Set up a physical device or use an emulator to run your app.
Emulators must use an emulator image with Google Play.

Sign into Firebase using your Google account.

Option 1: Add Firebase using the Firebase console
Adding Firebase to your app involves tasks both in the Firebase console and in your open Android project (for example, you download Firebase config files from the console, then move them into your Android project).

Step 1: Create a Firebase project
Before you can add Firebase to your Android app, you need to create a Firebase project to connect to your Android app. Visit Understand Firebase Projects to learn more about Firebase projects.

Create a Firebase project

Step 2: Register your app with Firebase
After you have a Firebase project, you can add your Android app to it.

Visit Understand Firebase Projects to learn more about best practices and considerations for adding apps to a Firebase project, including how to handle multiple build variants.

Go to the Firebase console.

In the center of the project overview page, click the Android icon (plat_android) to launch the setup workflow.

If you've already added an app to your Firebase project, click Add app to display the platform options.

Enter your app's package name in the Android package name field.

What's a package name, and where do you find it?

Make sure to enter the package name that your app is actually using. The package name value is case-sensitive, and it cannot be changed for this Firebase Android app after it's registered with your Firebase project.
(Optional) Enter other app information: App nickname and Debug signing certificate SHA-1.

How are the App nickname and the Debug signing certificate SHA-1 used within Firebase?

Click Register app.

Step 3: Add a Firebase configuration file
Add the Firebase Android configuration file to your app:

Click Download google-services.json to obtain your Firebase Android config file (google-services.json).

Move your config file into the module (app-level) directory of your app.

What do you need to know about this config file?

To enable Firebase products in your app, add the google-services plugin to your Gradle files.