diff --git a/.gitignore b/.gitignore
index 2bf3015d..e2e271cc 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,7 @@
*.iml
+*.apk
+*.ap_
+*.aab
.gradle
/local.properties
/.idea/caches
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 4540c781..2b2b18a1 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -83,9 +83,20 @@
-
+
+
+
+
+
+
+
-
+
+
+
+
+
+
@@ -182,7 +193,7 @@
@@ -244,7 +255,7 @@
},
"keyToStringList": {
"ExportApk.BuildVariants": [
- "release"
+ "generalRelease"
]
}
}
@@ -774,7 +785,7 @@
-
+
diff --git a/app/build.gradle b/app/build.gradle
index ef707da9..05c4714c 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -2,19 +2,19 @@ apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
apply plugin: 'com.google.gms.google-services'
-//apply plugin: 'com.google.firebase.crashlytics'
+apply plugin: 'com.google.firebase.crashlytics'
android {
compileSdkVersion 33
- // buildToolsVersion "29.0.3"
+ // buildToolsVersion "29.0.3"
defaultConfig {
applicationId "es.verdnatura"
minSdkVersion 24 //21
targetSdkVersion 33
versionCode 161
- //versionName = "23.3Beta" versionCode 160
+ //versionName = "23.4" versionCode 157
versionName = "23.4Beta"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
@@ -27,17 +27,20 @@ android {
//package de la app general = "package_name": "es.verdnatura"
//package de la app beta = "package_name": "es.verdnatura.sfusion"
- /*scaleFusion
- getByName("debug") {
- applicationIdSuffix = ".debug"
- }*/
- getByName("release") {
- applicationIdSuffix = ".sfusion"
- }
-
}
+ flavorDimensions "version"
+ productFlavors {
+ create("beta") {
+ applicationIdSuffix = ".sfusion"
+ }
+ create("general") {
+ //versionNameSuffix = "General"
+ }
+ }
+
+
buildFeatures {
viewBinding = true
}
@@ -55,6 +58,8 @@ android {
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
+ implementation 'com.google.firebase:firebase-crashlytics-ktx:18.2.9'
+ implementation 'com.google.firebase:firebase-analytics-ktx:20.1.2'
debugImplementation fileTree(dir: 'libs/debug', include: ['*.jar'])
releaseImplementation fileTree(dir: 'libs/release', include: ['*.jar'])
diff --git a/app/google-services.json b/app/google-services.json
index 1f9a4fd1..1308e9f5 100644
--- a/app/google-services.json
+++ b/app/google-services.json
@@ -1,34 +1,62 @@
{
"project_info": {
- "project_number": "519813071137",
- "firebase_url": "https://gestoralmacen-bfa2a.firebaseio.com",
- "project_id": "gestoralmacen-bfa2a",
- "storage_bucket": "gestoralmacen-bfa2a.appspot.com"
+ "project_number": "975691769093",
+ "project_id": "picking-2b9a0",
+ "storage_bucket": "picking-2b9a0.appspot.com"
},
"client": [
{
"client_info": {
- "mobilesdk_app_id": "1:519813071137:android:3de54686c580a6f79dfe60",
+ "mobilesdk_app_id": "1:975691769093:android:83eff0dadf5ca9d3e3c36c",
"android_client_info": {
- "package_name": "es.verdnatura.sfusion"
+ "package_name": "es.verdnatura"
}
},
"oauth_client": [
{
- "client_id": "519813071137-5099s9mme9juufnrkm88ajt5n7cmluqh.apps.googleusercontent.com",
+ "client_id": "975691769093-j2u5241eac30n2saa1mvbguq670tsvd0.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
- "current_key": "AIzaSyA74wQCwDCpCjWs49lCX5m2SsdqcYb_J8s"
+ "current_key": "AIzaSyC3skTw7I7BbOuSS4jOBa373zV5e8wCMDM"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
- "client_id": "519813071137-5099s9mme9juufnrkm88ajt5n7cmluqh.apps.googleusercontent.com",
+ "client_id": "975691769093-j2u5241eac30n2saa1mvbguq670tsvd0.apps.googleusercontent.com",
+ "client_type": 3
+ }
+ ]
+ }
+ }
+ },
+ {
+ "client_info": {
+ "mobilesdk_app_id": "1:975691769093:android:83eff0dadf5ca9d3e3c36c",
+ "android_client_info": {
+ "package_name": "es.verdnatura.sfusion"
+ }
+ },
+ "oauth_client": [
+ {
+ "client_id": "975691769093-j2u5241eac30n2saa1mvbguq670tsvd0.apps.googleusercontent.com",
+ "client_type": 3
+ }
+ ],
+ "api_key": [
+ {
+ "current_key": "AIzaSyC3skTw7I7BbOuSS4jOBa373zV5e8wCMDM"
+ }
+ ],
+ "services": {
+ "appinvite_service": {
+ "other_platform_oauth_client": [
+ {
+ "client_id": "975691769093-j2u5241eac30n2saa1mvbguq670tsvd0.apps.googleusercontent.com",
"client_type": 3
}
]
diff --git a/app/src/main/java/es/verdnatura/presentation/view/feature/login/fragment/LoginFragment.kt b/app/src/main/java/es/verdnatura/presentation/view/feature/login/fragment/LoginFragment.kt
index 1c855a3c..3226e828 100644
--- a/app/src/main/java/es/verdnatura/presentation/view/feature/login/fragment/LoginFragment.kt
+++ b/app/src/main/java/es/verdnatura/presentation/view/feature/login/fragment/LoginFragment.kt
@@ -12,6 +12,8 @@ import android.provider.Settings
import android.view.View
import androidx.lifecycle.Observer
import androidx.recyclerview.widget.LinearLayoutManager
+import com.google.firebase.crashlytics.ktx.crashlytics
+import com.google.firebase.ktx.Firebase
import es.verdnatura.R
import es.verdnatura.databinding.FragmentLoginBinding
import es.verdnatura.domain.notNull
@@ -433,6 +435,7 @@ class LoginFragment : BaseFragment(LoginVi
binding.edittextUsername.text.toString(),
binding.edittextPassword.text.toString()
)
+ setupFirebase()
//Tarea 4351 quitar el if y poner e device_checkLogin a continuaciĆ³n del response de operator_add
viewModel.operator_add()
@@ -444,6 +447,10 @@ class LoginFragment : BaseFragment(LoginVi
super.observeViewModel()
}
+ private fun setupFirebase() {
+ Firebase.crashlytics.setUserId(getData(USER))
+ }
+
private fun getInfoVersionNameApp(): String {
val manager: PackageManager = requireContext().packageManager
val info: PackageInfo = manager.getPackageInfo(requireContext().packageName, 0)
diff --git a/build.gradle b/build.gradle
index 0f8d1888..624508fc 100644
--- a/build.gradle
+++ b/build.gradle
@@ -21,8 +21,8 @@ buildscript {
dependencies {
classpath 'com.android.tools.build:gradle:7.0.4'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
- classpath 'com.google.gms:google-services:4.3.10'//4.3.5
- // classpath 'com.google.firebase:firebase-crashlytics-gradle:2.8.1'//2.5.2
+ classpath 'com.google.gms:google-services:4.3.10'
+ classpath 'com.google.firebase:firebase-crashlytics-gradle:2.8.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files