diff --git a/.env b/.env index 6ff684b9d5..f598a9852b 100644 --- a/.env +++ b/.env @@ -6,8 +6,6 @@ MIMOTO_HOST=https://api.qa-inji.mosip.net ESIGNET_HOST=https://api.qa-inji.mosip.net -GOOGLE_NEARBY_MESSAGES_API_KEY= - OBSRV_HOST = https://dataset-api.obsrv.mosip.net #Application Theme can be ( orange | purple ) diff --git a/README.md b/README.md index 48d5ad3694..8020928482 100644 --- a/README.md +++ b/README.md @@ -52,16 +52,9 @@ Create a `.env.local` file using `.env` as your template: ``` MIMOTO_HOST= -GOOGLE_NEARBY_MESSAGES_API_KEY= ``` -And `android/local.properties`: - -``` -GOOGLE_NEARBY_MESSAGES_API_KEY= -``` - -More info here: [Setup Google Nearby Messages in React](https://github.com/mrousavy/react-native-google-nearby-messages#usage) +And `android/local.properties`. ### Android diff --git a/android/app/build.gradle b/android/app/build.gradle index b09cb81fd4..da5151253a 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -3,8 +3,6 @@ plugins { } apply plugin: "com.android.application" -apply plugin: 'com.google.gms.google-services' -apply plugin: 'com.google.firebase.crashlytics' apply plugin: "com.facebook.react" import com.android.build.OutputFile @@ -121,7 +119,6 @@ android { manifestPlaceholders = [ APP_NAME: APP_NAME_RELEASE, - GOOGLE_NEARBY_MESSAGES_API_KEY: "${properties.getProperty('GOOGLE_NEARBY_MESSAGES_API_KEY')}", appAuthRedirectScheme: 'io.mosip.residentapp.inji' ] } @@ -250,20 +247,9 @@ dependencies { } else { implementation jscFlavor } - // Firebase - implementation 'com.google.firebase:firebase-crashlytics:17.3.1' - implementation 'com.google.firebase:firebase-analytics:18.0.2' + implementation 'com.jakewharton.timber:timber:4.7.1' } apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project) -apply from: "./eas-build.gradle" - -try { - def servicesJSON = file('google-services.json') - if (servicesJSON.text) { - apply plugin: 'com.google.gms.google-services' - } -} catch(Exception e) { - logger.warn("google-services.json not found, google-services plugin not applied. Push Notifications won't work") -} \ No newline at end of file +apply from: "./eas-build.gradle" \ No newline at end of file diff --git a/android/app/google-services.json b/android/app/google-services.json deleted file mode 100644 index 3d2bb016da..0000000000 --- a/android/app/google-services.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "project_info": { - "project_number": "259470317171", - "project_id": "mosip-resident-app", - "storage_bucket": "mosip-resident-app.appspot.com" - }, - "client": [ - { - "client_info": { - "mobilesdk_app_id": "", - "android_client_info": { - "package_name": "io.mosip.residentapp" - } - }, - "oauth_client": [ - { - "client_id": "", - "client_type": 3 - } - ], - "api_key": [ - { - "current_key": "" - } - ], - "services": { - "appinvite_service": { - "other_platform_oauth_client": [ - { - "client_id": "", - "client_type": 3 - } - ] - } - } - } - ], - "configuration_version": "1" -} \ No newline at end of file diff --git a/android/app/google-services.json.gpg b/android/app/google-services.json.gpg deleted file mode 100644 index 6303fa5765..0000000000 Binary files a/android/app/google-services.json.gpg and /dev/null differ diff --git a/android/app/mosip-google-services.json.gpg b/android/app/mosip-google-services.json.gpg deleted file mode 100644 index 8b7b3382bb..0000000000 Binary files a/android/app/mosip-google-services.json.gpg and /dev/null differ diff --git a/android/app/src/main/java/io/mosip/residentapp/MainApplication.java b/android/app/src/main/java/io/mosip/residentapp/MainApplication.java index d952ffcff7..0271f4666d 100644 --- a/android/app/src/main/java/io/mosip/residentapp/MainApplication.java +++ b/android/app/src/main/java/io/mosip/residentapp/MainApplication.java @@ -21,8 +21,6 @@ import timber.log.Timber; import com.facebook.react.bridge.JSIModulePackage; -import com.google.firebase.analytics.FirebaseAnalytics; -import com.google.firebase.crashlytics.FirebaseCrashlytics; import java.lang.reflect.InvocationTargetException; import java.util.List; @@ -77,36 +75,9 @@ public void onCreate() { if (BuildConfig.DEBUG) { Timber.plant(new Timber.DebugTree()); } - // Setup Firebase - FirebaseAnalytics.getInstance(this); - Timber.plant(new CrashReportingTree()); ApplicationLifecycleDispatcher.onApplicationCreate(this); } - - /** - * A tree which logs important information for crash reporting. - */ - private static class CrashReportingTree extends Timber.Tree { - FirebaseCrashlytics crashlytics = FirebaseCrashlytics.getInstance(); - @Override - protected void log(int priority, String tag, @NonNull String message, Throwable t) { - if (priority == Log.VERBOSE || priority == Log.DEBUG) { - return; - } - - crashlytics.setCustomKey("priority", priority); - crashlytics.setCustomKey("tag", tag); - crashlytics.log(message); - - if (t != null) { - if (priority == Log.ERROR) { - crashlytics.recordException(t); - } - } - } - } - @Override public void onConfigurationChanged(Configuration newConfig) { super.onConfigurationChanged(newConfig); diff --git a/android/build.gradle b/android/build.gradle index 6df566b221..0824a6e5f8 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -17,8 +17,6 @@ buildscript { } dependencies { classpath("com.android.tools.build:gradle:7.3.1") - classpath 'com.google.gms:google-services:4.3.5' - classpath 'com.google.firebase:firebase-crashlytics-gradle:2.4.1' classpath("com.facebook.react:react-native-gradle-plugin") } } diff --git a/shared/constants.ts b/shared/constants.ts index 09b62c6f7e..19c43d8d3a 100644 --- a/shared/constants.ts +++ b/shared/constants.ts @@ -1,10 +1,5 @@ import {Platform} from 'react-native'; -import { - MIMOTO_HOST, - ESIGNET_HOST, - GOOGLE_NEARBY_MESSAGES_API_KEY, - DEBUG_MODE, -} from 'react-native-dotenv'; +import {MIMOTO_HOST, ESIGNET_HOST, DEBUG_MODE} from 'react-native-dotenv'; import {Argon2iConfig} from './commonUtil'; import {VcIdType} from '../types/vc'; @@ -31,11 +26,6 @@ export const ACTIVITY_LOG_STORE_KEY = 'activityLog'; export const SETTINGS_STORE_KEY = 'settings'; -export const GNM_API_KEY = GOOGLE_NEARBY_MESSAGES_API_KEY; - -// https://developers.google.com/android/reference/com/google/android/gms/nearby/messages/Message#MAX_CONTENT_SIZE_BYTES -export const GNM_MESSAGE_LIMIT = 102400 - 6400; // allowance for metadata - export const APP_ID_LENGTH = 12; // Numbers and Upper case Alphabets without confusing characters like 0, 1, 2, I, O, Z diff --git a/sonar-project.properties b/sonar-project.properties index 5cd49b0753..eb27b507b8 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -1,4 +1,4 @@ sonar.projectKey=mosip_inji sonar.organization=mosip -sonar.exclusions=.github/**, .vscode/**, android/**, assets/**, build/**, ios/**, node_modules/**, scripts/** +sonar.exclusions=.github/**, .vscode/**, android/**, assets/**, build/**, ios/**, node_modules/**, scripts/**, **/*.java