Added Firebase (with analytics) dependencies
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -13,3 +13,4 @@
|
|||||||
.externalNativeBuild
|
.externalNativeBuild
|
||||||
.cxx
|
.cxx
|
||||||
local.properties
|
local.properties
|
||||||
|
/app/google-services.json
|
||||||
@@ -1,8 +1,17 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id("com.android.application")
|
id("com.android.application")
|
||||||
|
id("com.google.gms.google-services")
|
||||||
}
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
|
signingConfigs {
|
||||||
|
getByName("debug") {
|
||||||
|
storeFile = file("/Users/psmattas/.android/debug.keystore")
|
||||||
|
storePassword = "android"
|
||||||
|
keyAlias = "androiddebugkey"
|
||||||
|
keyPassword = "android"
|
||||||
|
}
|
||||||
|
}
|
||||||
namespace = "com.example.taskmuse"
|
namespace = "com.example.taskmuse"
|
||||||
compileSdk = 33
|
compileSdk = 33
|
||||||
|
|
||||||
@@ -39,4 +48,8 @@ dependencies {
|
|||||||
testImplementation("junit:junit:4.13.2")
|
testImplementation("junit:junit:4.13.2")
|
||||||
androidTestImplementation("androidx.test.ext:junit:1.1.5")
|
androidTestImplementation("androidx.test.ext:junit:1.1.5")
|
||||||
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1")
|
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1")
|
||||||
|
|
||||||
|
// FIREBASE PACKAGES
|
||||||
|
implementation(platform("com.google.firebase:firebase-bom:32.3.1"))
|
||||||
|
implementation("com.google.firebase:firebase-analytics")
|
||||||
}
|
}
|
||||||
@@ -4,11 +4,17 @@ import androidx.appcompat.app.AppCompatActivity;
|
|||||||
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
|
||||||
|
import com.google.firebase.analytics.FirebaseAnalytics; // Firebase Analytics
|
||||||
|
|
||||||
public class MainActivity extends AppCompatActivity {
|
public class MainActivity extends AppCompatActivity {
|
||||||
|
private FirebaseAnalytics mFirebaseAnalytics; // Firebase Analytics variable
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
|
||||||
|
mFirebaseAnalytics = FirebaseAnalytics.getInstance(this); // Obtain the FirebaseAnalytics instance.
|
||||||
|
|
||||||
setContentView(R.layout.activity_main);
|
setContentView(R.layout.activity_main);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,10 @@
|
|||||||
|
buildscript {
|
||||||
|
dependencies {
|
||||||
|
classpath("com.google.gms:google-services:4.4.0")
|
||||||
|
}
|
||||||
|
}
|
||||||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||||
plugins {
|
plugins {
|
||||||
id("com.android.application") version "8.1.1" apply false
|
id("com.android.application") version "8.1.1" apply false
|
||||||
|
id("com.google.gms.google-services") version "4.3.15" apply false
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user