TP-39844 | analytics integration
This commit is contained in:
@@ -263,14 +263,10 @@ android {
|
||||
|
||||
dependencies {
|
||||
implementation fileTree(dir: "libs", include: ["*.jar"])
|
||||
implementation(platform("com.google.firebase:firebase-bom:32.2.3"))
|
||||
implementation("com.google.firebase:firebase-analytics")
|
||||
|
||||
|
||||
//noinspection GradleDynamicVersion
|
||||
implementation "com.facebook.react:react-native:+" // From node_modules
|
||||
//implementation project(path: ":@react-native-firebase_analytics")
|
||||
|
||||
|
||||
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"
|
||||
|
||||
|
||||
@@ -1,98 +0,0 @@
|
||||
{
|
||||
"project_info": {
|
||||
"project_number": "60755663443",
|
||||
"firebase_url": "https://address-verification-app-default-rtdb.firebaseio.com",
|
||||
"project_id": "address-verification-app",
|
||||
"storage_bucket": "address-verification-app.appspot.com"
|
||||
},
|
||||
"client": [
|
||||
{
|
||||
"client_info": {
|
||||
"mobilesdk_app_id": "1:60755663443:android:4a948ee9d0b4e3098584a6",
|
||||
"android_client_info": {
|
||||
"package_name": "com.avapp"
|
||||
}
|
||||
},
|
||||
"oauth_client": [
|
||||
{
|
||||
"client_id": "60755663443-40k0fbrbbqv4ci4hrjlbrphab5fj387b.apps.googleusercontent.com",
|
||||
"client_type": 3
|
||||
}
|
||||
],
|
||||
"api_key": [
|
||||
{
|
||||
"current_key": "AIzaSyA70_d2M2ke-Mu0OHGZ6iZilBbD6A-_z0c"
|
||||
}
|
||||
],
|
||||
"services": {
|
||||
"appinvite_service": {
|
||||
"other_platform_oauth_client": [
|
||||
{
|
||||
"client_id": "60755663443-40k0fbrbbqv4ci4hrjlbrphab5fj387b.apps.googleusercontent.com",
|
||||
"client_type": 3
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"client_info": {
|
||||
"mobilesdk_app_id": "1:60755663443:android:06c549681d7e8ed38584a6",
|
||||
"android_client_info": {
|
||||
"package_name": "com.avapp.dev"
|
||||
}
|
||||
},
|
||||
"oauth_client": [
|
||||
{
|
||||
"client_id": "60755663443-40k0fbrbbqv4ci4hrjlbrphab5fj387b.apps.googleusercontent.com",
|
||||
"client_type": 3
|
||||
}
|
||||
],
|
||||
"api_key": [
|
||||
{
|
||||
"current_key": "AIzaSyA70_d2M2ke-Mu0OHGZ6iZilBbD6A-_z0c"
|
||||
}
|
||||
],
|
||||
"services": {
|
||||
"appinvite_service": {
|
||||
"other_platform_oauth_client": [
|
||||
{
|
||||
"client_id": "60755663443-40k0fbrbbqv4ci4hrjlbrphab5fj387b.apps.googleusercontent.com",
|
||||
"client_type": 3
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"client_info": {
|
||||
"mobilesdk_app_id": "1:60755663443:android:0cc128e56779f1bc8584a6",
|
||||
"android_client_info": {
|
||||
"package_name": "com.avapp.qa"
|
||||
}
|
||||
},
|
||||
"oauth_client": [
|
||||
{
|
||||
"client_id": "60755663443-40k0fbrbbqv4ci4hrjlbrphab5fj387b.apps.googleusercontent.com",
|
||||
"client_type": 3
|
||||
}
|
||||
],
|
||||
"api_key": [
|
||||
{
|
||||
"current_key": "AIzaSyA70_d2M2ke-Mu0OHGZ6iZilBbD6A-_z0c"
|
||||
}
|
||||
],
|
||||
"services": {
|
||||
"appinvite_service": {
|
||||
"other_platform_oauth_client": [
|
||||
{
|
||||
"client_id": "60755663443-40k0fbrbbqv4ci4hrjlbrphab5fj387b.apps.googleusercontent.com",
|
||||
"client_type": 3
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"configuration_version": "1"
|
||||
}
|
||||
@@ -17,15 +17,12 @@ import java.util.List;
|
||||
import com.microsoft.codepush.react.CodePush;
|
||||
import android.database.CursorWindow;
|
||||
import java.lang.reflect.Field;
|
||||
import com.google.firebase.analytics.FirebaseAnalytics;
|
||||
import android.os.Bundle;
|
||||
|
||||
|
||||
|
||||
|
||||
public class MainApplication extends Application implements ReactApplication {
|
||||
|
||||
private FirebaseAnalytics mFirebaseAnalytics;
|
||||
|
||||
private final ReactNativeHost mReactNativeHost =
|
||||
new ReactNativeHost(this) {
|
||||
@@ -72,20 +69,8 @@ public class MainApplication extends Application implements ReactApplication {
|
||||
ReactFeatureFlags.useTurboModules = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED;
|
||||
SoLoader.init(this, /* native exopackage */ false);
|
||||
initializeFlipper(this, getReactNativeHost().getReactInstanceManager());
|
||||
mFirebaseAnalytics = FirebaseAnalytics.getInstance(this);
|
||||
mFirebaseAnalytics.setAnalyticsCollectionEnabled(true);
|
||||
|
||||
//mFirebaseAnalytics.setMinimumSessionDuration(10000);
|
||||
|
||||
mFirebaseAnalytics.setSessionTimeoutDuration(300);
|
||||
|
||||
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putString(FirebaseAnalytics.Param.ITEM_ID,"ID");
|
||||
bundle.putString(FirebaseAnalytics.Param.ITEM_NAME,"NAME");
|
||||
bundle.putString(FirebaseAnalytics.Param.CONTENT_TYPE,"image");
|
||||
|
||||
mFirebaseAnalytics.logEvent(FirebaseAnalytics.Event.SELECT_CONTENT, bundle);
|
||||
|
||||
|
||||
// https://github.com/rt2zz/redux-persist/issues/284#issuecomment-1011214066
|
||||
|
||||
Reference in New Issue
Block a user