FirebaseAuth-Google
所属分类:android开发
开发工具:kotlin
文件大小:874KB
下载次数:0
上传日期:2021-12-17 04:47:18
上 传 者:
sh-1993
说明: Firebase验证与Google帐户和Kotlin编程Android Studio
(Firebase Authentication with Google Account & Kotlin Programming Android Studio)
文件列表:
.idea (0, 2021-12-17)
.idea\codeStyles (0, 2021-12-17)
.idea\codeStyles\Project.xml (4408, 2021-12-17)
.idea\codeStyles\codeStyleConfig.xml (142, 2021-12-17)
.idea\compiler.xml (170, 2021-12-17)
.idea\gradle.xml (1025, 2021-12-17)
.idea\jarRepositories.xml (1240, 2021-12-17)
.idea\misc.xml (372, 2021-12-17)
.idea\vcs.xml (180, 2021-12-17)
Screenshot_App (0, 2021-12-17)
Screenshot_App\1639540868941.jpg (213199, 2021-12-17)
Screenshot_App\1639540868944.jpg (142106, 2021-12-17)
Screenshot_App\1639540868947.jpg (163921, 2021-12-17)
Screenshot_App\1639540868949.jpg (164024, 2021-12-17)
Screenshot_App\1639540868951.jpg (114880, 2021-12-17)
Screenshot_App\Screenshot 2021-12-15 110852.png (64727, 2021-12-17)
Screenshot_App\Screenshot 2021-12-15 112505.png (11280, 2021-12-17)
app (0, 2021-12-17)
app\build.gradle (1679, 2021-12-17)
app\google-services.json (2570, 2021-12-17)
app\proguard-rules.pro (750, 2021-12-17)
app\src (0, 2021-12-17)
app\src\androidTest (0, 2021-12-17)
app\src\androidTest\java (0, 2021-12-17)
app\src\androidTest\java\com (0, 2021-12-17)
app\src\androidTest\java\com\sabo (0, 2021-12-17)
app\src\androidTest\java\com\sabo\firebaseauth_google (0, 2021-12-17)
app\src\androidTest\java\com\sabo\firebaseauth_google\ExampleInstrumentedTest.kt (683, 2021-12-17)
app\src\main (0, 2021-12-17)
app\src\main\AndroidManifest.xml (849, 2021-12-17)
app\src\main\ic_launcher-playstore.png (19107, 2021-12-17)
app\src\main\java (0, 2021-12-17)
app\src\main\java\com (0, 2021-12-17)
app\src\main\java\com\sabo (0, 2021-12-17)
app\src\main\java\com\sabo\firebaseauth_google (0, 2021-12-17)
... ...
#
Firebase Authentication with Google Account
Authentication Android application using
`Firebase` with the login system using **Google Account**
### **App Features Firebase Authentication with Google Account** :
- **_Firebase_**
- Authentication with **`Google Account`**
## Important!
### Add Firebase to your Android project go to
`Firebase Setup`
## Design UI App Firebase Authentication with Google Account
### **`Preview Firebase Auth with Google Account`**
### **`Preview UI FirebaseAuth-Google`**
| Name Page | Preview UI |
| :---------------------: | :--------------------------------------------------------: |
| `Home` |
|
| `Choose an Account` |
|
| `Account created` |
|
| `Account already exist` |
|
| `Sign out` |
|
## Result on Firebase Console
### **`Authentication`**
## Dependencies used
```groovy
/** Firebase*/
implementation platform('com.google.firebase:firebase-bom:29.0.1')
implementation 'com.google.firebase:firebase-analytics-ktx'
implementation 'com.google.firebase:firebase-auth-ktx'
implementation 'com.google.android.gms:play-services-auth:20.0.0'
```
### Integration Step Used Binding in Kotlin
1. Add **viewBinding `true`**
`build.gralde (Module)`
```groovy
android {
...
buildFeatures {
viewBinding true
}
}
```
2. Activity Kotlin Class
```kotlin
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"
}
}
```
3. Activity Java Class
```java
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
近期下载者:
相关文件:
收藏者: