This repository was archived by the owner on Jul 2, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +24
-1
lines changed
java/com/google/samples/quickstart/canonical Expand file tree Collapse file tree 4 files changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ apply plugin: 'com.android.application'
2
2
apply plugin : ' kotlin-android'
3
3
apply plugin : ' kotlin-android-extensions'
4
4
apply plugin : ' kotlin-kapt'
5
+ apply plugin : ' com.google.gms.google-services'
5
6
6
7
android {
7
8
compileSdkVersion 29
@@ -19,6 +20,7 @@ android {
19
20
versionName " 1.0"
20
21
21
22
testInstrumentationRunner " androidx.test.runner.AndroidJUnitRunner"
23
+ multiDexEnabled true
22
24
}
23
25
24
26
buildTypes {
@@ -42,9 +44,11 @@ dependencies {
42
44
implementation ' com.google.android.libraries.places:places:2.3.0'
43
45
implementation " android.arch.lifecycle:extensions:1.1.1"
44
46
implementation ' androidx.lifecycle:lifecycle-livedata-ktx:2.2.0'
47
+ implementation ' com.google.firebase:firebase-analytics:17.4.4'
48
+ implementation ' com.google.firebase:firebase-auth:19.3.2'
45
49
kapt ' com.android.databinding:compiler:3.1.4'
46
50
testImplementation ' junit:junit:4.12'
47
51
androidTestImplementation ' androidx.test.ext:junit:1.1.1'
48
52
androidTestImplementation ' androidx.test.espresso:espresso-core:3.2.0'
49
53
50
- }
54
+ }
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import androidx.fragment.app.Fragment
5
5
import android.view.LayoutInflater
6
6
import android.view.View
7
7
import android.view.ViewGroup
8
+ import com.google.android.gms.auth.api.signin.GoogleSignInOptions
8
9
9
10
// TODO: Rename parameter arguments, choose names that match
10
11
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
@@ -27,6 +28,13 @@ class MeFragment : Fragment() {
27
28
param1 = it.getString(ARG_PARAM1 )
28
29
param2 = it.getString(ARG_PARAM2 )
29
30
}
31
+
32
+ // // Configure Google Sign In
33
+ // val gso = GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)
34
+ // .requestIdToken(getString(R.string.default_web_client_id))
35
+ // .requestEmail()
36
+ // .build()
37
+
30
38
}
31
39
32
40
override fun onCreateView (
Original file line number Diff line number Diff line change 8
8
9
9
<!-- TODO: Update blank fragment layout -->
10
10
<TextView
11
+ android : id =" @+id/textView"
11
12
android : layout_width =" match_parent"
12
13
android : layout_height =" wrap_content"
13
14
android : gravity =" center"
16
17
app : layout_constraintBottom_toBottomOf =" parent"
17
18
app : layout_constraintTop_toTopOf =" parent" />
18
19
20
+ <com .google.android.gms.common.SignInButton
21
+ android : id =" @+id/sign_in_button"
22
+ android : layout_width =" wrap_content"
23
+ android : layout_height =" wrap_content"
24
+ android : layout_marginBottom =" 40dp"
25
+ app : layout_constraintBottom_toBottomOf =" parent"
26
+ app : layout_constraintEnd_toEndOf =" parent"
27
+ app : layout_constraintStart_toStartOf =" parent" />
28
+
19
29
</androidx .constraintlayout.widget.ConstraintLayout>
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ buildscript {
6
6
}
7
7
dependencies {
8
8
classpath " com.android.tools.build:gradle:4.0.0"
9
+ classpath ' com.google.gms:google-services:4.3.3'
9
10
classpath " org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version "
10
11
11
12
// NOTE: Do not place your application dependencies here; they belong
You can’t perform that action at this time.
0 commit comments