diff --git a/.bundle/config b/.bundle/config
new file mode 100644
index 00000000..d137d242
--- /dev/null
+++ b/.bundle/config
@@ -0,0 +1,2 @@
+BUNDLE_PATH: "vendor/bundle"
+BUNDLE_FORCE_RUBY_PLATFORM: 1
\ No newline at end of file
diff --git a/.env b/.env
index 6f09c5b5..d9036908 100644
--- a/.env
+++ b/.env
@@ -1,9 +1,15 @@
# after making changes to the env file, ensure to start the bundler (or the project) with a --reset-cache
# eg . npm build android:newlogic --reset-cache
-MIMOTO_HOST=https://api.qa-inji.mosip.net
#MIMOTO_HOST=http://mock.mimoto.newlogic.dev
+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 )
APPLICATION_THEME=orange
@@ -12,3 +18,6 @@ CREDENTIAL_REGISTRY_EDIT=true
#supported languages( en, fil, ar, hi, kn, ta)
APPLICATION_LANGUAGE=en
+
+#Toggle for openID for VC
+ENABLE_OPENID_FOR_VC=false
diff --git a/.eslintrc.js b/.eslintrc.js
new file mode 100644
index 00000000..187894b6
--- /dev/null
+++ b/.eslintrc.js
@@ -0,0 +1,4 @@
+module.exports = {
+ root: true,
+ extends: '@react-native',
+};
diff --git a/.github/workflows/android-beta-build.yml b/.github/workflows/android-beta-build.yml
index 4747fcd6..21844566 100644
--- a/.github/workflows/android-beta-build.yml
+++ b/.github/workflows/android-beta-build.yml
@@ -1,7 +1,8 @@
name: Android Beta Build
env:
- backendServiceDefaultUrl: https://api.sandbox.mosip.net
+ mimotoBackendServiceDefaultUrl: https://api.sandbox.mosip.net
+ esignetBackendServiceDefaultUrl: https://api.sandbox.mosip.net
on:
workflow_dispatch:
@@ -21,8 +22,13 @@ on:
required: true
default: False
type: string
- backendServiceUrl:
- description: 'Backend service URL'
+ mimotoBackendServiceUrl:
+ description: 'Mimoto backend service URL'
+ required: true
+ default: 'https://api.sandbox.mosip.net'
+ type: string
+ esignetBackendServiceUrl:
+ description: 'Esignet backend service URL'
required: true
default: 'https://api.sandbox.mosip.net'
type: string
@@ -133,7 +139,8 @@ jobs:
cd android/scripts
./beta-build.sh
env:
- MIMOTO_HOST: ${{ github.event.inputs.backendServiceUrl }}
+ MIMOTO_HOST: ${{ github.event.inputs.mimotoBackendServiceUrl }}
+ ESIGNET_HOST: ${{ github.event.inputs.esignetBackendServiceUrl }}
APPLICATION_THEME: ${{ github.event.inputs.theme }}
RELEASE_KEYSTORE_ALIAS: androidreleasekey
RELEASE_KEYSTORE_PASSWORD: '${{secrets.INJI_ANDROID_RELEASE_STOREPASS}}'
diff --git a/.github/workflows/android-internal-build.yml b/.github/workflows/android-internal-build.yml
index 9e0622e8..bbf90619 100644
--- a/.github/workflows/android-internal-build.yml
+++ b/.github/workflows/android-internal-build.yml
@@ -1,13 +1,25 @@
name: Android Internal Build
+run-name: ${{ github.event.inputs.buildname }}
env:
- backendServiceDefaultUrl: https://api.sandbox.mosip.net
+ mimotoBackendServiceDefaultUrl: https://api.sandbox.mosip.net
+ esignetBackendServiceDefaultUrl: https://api.sandbox.mosip.net
on:
workflow_dispatch:
inputs:
- backendServiceUrl:
- description: 'Backend service URL'
+ buildname:
+ description: 'Build App For'
+ required: true
+ default: 'Sprint-x/Collab/release-x.x.x'
+ type: string
+ mimotoBackendServiceUrl:
+ description: 'Mimoto backend service URL'
+ required: true
+ default: 'https://api.sandbox.mosip.net'
+ type: string
+ esignetBackendServiceUrl:
+ description: 'Esignet backend service URL'
required: true
default: 'https://api.sandbox.mosip.net'
type: string
@@ -41,7 +53,7 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: '16.x'
-
+
- name: Cache local npm repository
uses: actions/cache@v3.0.11
with:
@@ -68,7 +80,7 @@ jobs:
run: |
# Strip git ref prefix from version
echo "BRANCH_NAME=$(echo ${{ github.ref }} | sed -e 's,.*/\(.*\),\1,')" >> $GITHUB_ENV
- echo "GPG_TTY=$(tty)" >> $GITHUB_ENV
+ echo "GPG_TTY=$(tty)" >> $GITHUB_ENV
- name: Setup branch and GPG public key
run: |
@@ -99,11 +111,11 @@ jobs:
cd android/app
export RELEASE_KEYSTORE_ALIAS=androidreleasekey
export RELEASE_KEYSTORE_PASSWORD=$RELEASE_KEYSTORE_PASSWORD
- env:
+ env:
RELEASE_KEYSTORE_PASSWORD: '${{secrets.INJI_ANDROID_RELEASE_STOREPASS}}'
- name: Create Google Play Config file
- run : |
+ run: |
cd android
echo "$INJI_ANDROID_PLAY_STORE_CONFIG_JSON" > play_config.json.b64
base64 -d -i play_config.json.b64 > play_config.json
@@ -111,14 +123,103 @@ jobs:
INJI_ANDROID_PLAY_STORE_CONFIG_JSON: ${{ secrets.INJI_ANDROID_PLAY_STORE_CONFIG_JSON }}
- name: Run Build
- run: |
+ run: |
cd android/scripts
./internal-build.sh
env:
- MIMOTO_HOST: ${{ github.event.inputs.backendServiceUrl }}
- APPLICATION_THEME: ${{ github.event.inputs.theme }}
+ MIMOTO_HOST: ${{ github.event.inputs.mimotoBackendServiceUrl }}
+ ESIGNET_HOST: ${{ github.event.inputs.esignetBackendServiceUrl }}
+ APPLICATION_THEME: ${{ github.event.inputs.theme }}
RELEASE_KEYSTORE_ALIAS: androidreleasekey
RELEASE_KEYSTORE_PASSWORD: '${{secrets.INJI_ANDROID_RELEASE_STOREPASS}}'
SLACK_URL: '${{ secrets.SLACK_WEBHOOK_DEVOPS }}'
PLAY_CONSOLE_RELEASE_DESCRIPTION: ${{ github.event.inputs.buildDescription }}
- CREDENTIAL_REGISTRY_EDIT: ${{ github.event.inputs.registry_edit }}
\ No newline at end of file
+ CREDENTIAL_REGISTRY_EDIT: ${{ github.event.inputs.registry_edit }}
+
+ upload-to-actions:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v3.1.0
+ - uses: actions/setup-node@v3
+ with:
+ node-version: '16.x'
+
+ - name: Cache local npm repository
+ uses: actions/cache@v3.0.11
+ with:
+ key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
+ path: ~/.npm
+
+ - name: Cache local gradle repository
+ uses: actions/cache@v3.0.11
+ with:
+ key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
+ path: |
+ ~/.gradle/caches
+ ~/.gradle/wrapper
+
+ - name: Install npm dependencies
+ run: |
+ npm i
+
+ - name: Create .env.local file
+ run: |
+ echo "${{ secrets.ENV_FILE }}" > .env.local > android/local.properties
+
+ - name: Setup branch and env
+ run: |
+ # Strip git ref prefix from version
+ echo "BRANCH_NAME=$(echo ${{ github.ref }} | sed -e 's,.*/\(.*\),\1,')" >> $GITHUB_ENV
+ echo "GPG_TTY=$(tty)" >> $GITHUB_ENV
+
+ - name: Setup branch and GPG public key
+ run: |
+ # Strip git ref prefix from version
+ echo ${{ env.BRANCH_NAME }}
+ echo ${{ env.GPG_TTY }}
+
+ sudo apt-get --yes install gnupg2
+ gpg2 --import ./.github/keys/mosipgpgkey_pub.gpg
+ gpg2 --quiet --batch --passphrase=${{secrets.gpg_secret}} --allow-secret-key-import --import ./.github/keys/mosipgpgkey_sec.gpg
+
+ - name: Setup Firebase
+ run: |
+ cd android
+ if [ ! -z "$FIREBASE_SECRET" ] && [ -f app/google-services.json.gpg ];then rm -f app/google-services.json;gpg2 --quiet --batch --passphrase=$FIREBASE_SECRET --pinentry-mode loopback --decrypt --output app/google-services.json app/mosip-google-services.json.gpg;fi
+ env:
+ FIREBASE_SECRET: ${{ secrets.GPG_SECRET }}
+
+ - name: Generate keystore
+ run: |
+ echo "$ANDROID_KEYSTORE_FILE" > release.keystore.b64
+ base64 -d -i release.keystore.b64 > android/app/release.keystore
+ env:
+ ANDROID_KEYSTORE_FILE: ${{ secrets.INJI_ANDROID_RELEASE_KEYSTORE }}
+
+ - name: Create Google Play Config file
+ run: |
+ cd android
+ echo "$INJI_ANDROID_PLAY_STORE_CONFIG_JSON" > play_config.json.b64
+ base64 -d -i play_config.json.b64 > play_config.json
+ env:
+ INJI_ANDROID_PLAY_STORE_CONFIG_JSON: ${{ secrets.INJI_ANDROID_PLAY_STORE_CONFIG_JSON }}
+
+ - name: Run Build for upload
+ run: |
+ npx jetify
+ cd android
+ ./gradlew :app:assembleMosipRelease
+ env:
+ MIMOTO_HOST: ${{ github.event.inputs.mimotoBackendServiceUrl }}
+ ESIGNET_HOST: ${{ github.event.inputs.esignetBackendServiceUrl }}
+ APPLICATION_THEME: ${{ github.event.inputs.theme }}
+ RELEASE_KEYSTORE_ALIAS: androidreleasekey
+ RELEASE_KEYSTORE_PASSWORD: '${{secrets.INJI_ANDROID_RELEASE_STOREPASS}}'
+ CREDENTIAL_REGISTRY_EDIT: ${{ github.event.inputs.registry_edit }}
+
+ - name: Upload Artifact
+ uses: actions/upload-artifact@v3.1.1
+ with:
+ name: ${{ github.event.inputs.buildname }}
+ path: android/app/build/outputs/apk/mosip/release/
+ retention-days: 10
diff --git a/.github/workflows/ios-automation-build.yml b/.github/workflows/ios-automation-build.yml
new file mode 100644
index 00000000..26c9ef3e
--- /dev/null
+++ b/.github/workflows/ios-automation-build.yml
@@ -0,0 +1,72 @@
+name: Inji iOS Automation Build
+
+on:
+ workflow_dispatch:
+ inputs:
+ mimotoBackendServiceUrl:
+ description: 'Mimoto backend service URL'
+ required: true
+ default: 'https://api.sandbox.mosip.net'
+ type: string
+ esignetBackendServiceUrl:
+ description: 'Esignet backend service URL'
+ required: true
+ default: 'https://api.sandbox.mosip.net'
+ type: string
+ theme:
+ description: 'Application Theme'
+ required: true
+ default: 'orange'
+ type: choice
+ options:
+ - orange
+ - purple
+ registry_edit:
+ description: 'Edit Registry'
+ required: true
+ default: 'true'
+ type: choice
+ options:
+ - false
+ - true
+
+jobs:
+ build_ios:
+ name: Uploading app to Actions
+ runs-on: macos-13
+
+ steps:
+ - uses: actions/checkout@v3.1.0
+ - uses: actions/setup-node@v3
+ with:
+ node-version: '18.x'
+
+ - name: Install npm dependencies
+ run: |
+ npm install
+
+ - name: Install Pod
+ run: |
+ cd ios
+ pod install
+ pod install
+
+ - name: Build iOS for automation on simulator
+ run: |
+ cd ios
+ fastlane build_app_for_automation_on_simulator
+
+ - name: Upload Inji.app artifact
+ uses: actions/upload-artifact@v3.1.1
+ with:
+ name: Inji
+ path: ios/fastlane/Inji_app_file/Products/Applications/
+ retention-days: 1
+
+ - name: Upload Runner Log on Failure
+ if: failure() # Only run this step if the previous steps failed
+ uses: actions/upload-artifact@v3.1.1
+ with:
+ name: runner-log
+ path: /Users/runner/Library/Logs/gym/
+ retention-days: 1
\ No newline at end of file
diff --git a/.github/workflows/ios-build.yml b/.github/workflows/ios-build.yml
index 2a955c5d..a5a2f2e8 100644
--- a/.github/workflows/ios-build.yml
+++ b/.github/workflows/ios-build.yml
@@ -1,10 +1,15 @@
name: Inji iOS build
-on:
+on:
workflow_dispatch:
inputs:
- backendServiceUrl:
- description: 'Backend service URL'
+ mimotoBackendServiceUrl:
+ description: 'Mimoto backend service URL'
+ required: true
+ default: 'https://api.sandbox.mosip.net'
+ type: string
+ esignetBackendServiceUrl:
+ description: 'Esignet backend service URL'
required: true
default: 'https://api.sandbox.mosip.net'
type: string
@@ -45,22 +50,23 @@ jobs:
build_ios:
name: Deploying to Testflight
runs-on: macos-13
-
+
steps:
- uses: actions/checkout@v3.1.0
- uses: actions/setup-node@v3
with:
- node-version: '16.x'
-
+ node-version: '18.x'
+
- name: Install npm dependencies
run: |
npm install
-
+
- name: Install Pod
run: |
cd ios
pod install
-
+ pod install
+
- name: Deploy iOS Beta to TestFlight
run: |
cd ios
@@ -82,7 +88,13 @@ jobs:
SLACK_URL: '${{ secrets.SLACK_WEBHOOK_DEVOPS }}'
MATCH_PASSWORD: '${{ secrets.INJI_IOS_MATCH_PASSWORD }}'
APPLICATION_THEME: ${{ github.event.inputs.theme }}
- CREDENTIAL_REGISTRY_EDIT: ${{ github.event.inputs.registry_edit }}
- MIMOTO_HOST: ${{ github.event.inputs.backendServiceUrl }}
TESTFLIGHT_INTERNAL_TESTERS_GROUP: ${{ github.event.inputs.internal-testers }}
TESTFLIGHT_BETA_APP_DESCRIPTION: ${{ github.event.inputs.buildDescription }}
+
+ - name: Upload Runner Log on Failure
+ if: failure() # Only run this step if the previous steps failed
+ uses: actions/upload-artifact@v3.1.1
+ with:
+ name: runner-log
+ path: /Users/runner/Library/Logs/gym/
+ retention-days: 1
diff --git a/.gitignore b/.gitignore
index dc099a79..8daf666c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -41,6 +41,7 @@ DerivedData
*.ipa
*.xcuserstate
project.xcworkspace
+ios/.xcode.env.local
# Android/IntelliJ
#
@@ -50,6 +51,10 @@ build/
local.properties
*.iml
*.hprof
+*.hprof
+.cxx/
+*.keystore
+!debug.keystore
# node.js
#
@@ -57,6 +62,18 @@ node_modules/
npm-debug.log
yarn-error.log
+
+
+# fastlane
+#
+# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
+# For more information about the recommended setup visit:
+# https://docs.fastlane.tools/best-practices/source-control/
+**/fastlane/report.xml
+**/fastlane/Preview.html
+**/fastlane/screenshots
+**/fastlane/test_output
+
# BUCK
buck-out/
\.buckd/
@@ -64,9 +81,15 @@ buck-out/
# Bundle artifacts
*.jsbundle
-# CocoaPods
-ios/Pods/
+# Ruby / CocoaPods
+/ios/Pods/
+/vendor/bundle/
+# Temporary files created by Metro to check the health of the file watcher
+.metro-health-check*
+# testing
+/coverage
+c
# OS X temporary files that should never be committed
.DS_Store
src/components/.DS_Store
@@ -94,3 +117,8 @@ temp/
yalc.lock
android/app/debug.keystore
+
+# Expo
+.expo
+dist/
+web-build/
\ No newline at end of file
diff --git a/.prettierrc.js b/.prettierrc.js
new file mode 100644
index 00000000..2b540746
--- /dev/null
+++ b/.prettierrc.js
@@ -0,0 +1,7 @@
+module.exports = {
+ arrowParens: 'avoid',
+ bracketSameLine: true,
+ bracketSpacing: false,
+ singleQuote: true,
+ trailingComma: 'all',
+};
diff --git a/.prettierrc.json b/.prettierrc.json
deleted file mode 100644
index 3c8528fa..00000000
--- a/.prettierrc.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "arrowParens": "always",
- "bracketSpacing": true,
- "bracketSameLine": true,
- "jsxSingleQuote": false,
- "quoteProps": "consistent",
- "printWidth": 80,
- "semi": true,
- "singleQuote": true,
- "tabWidth": 2,
- "trailingComma": "es5",
- "useTabs": false
-}
diff --git a/.watchmanconfig b/.watchmanconfig
new file mode 100644
index 00000000..a0912636
--- /dev/null
+++ b/.watchmanconfig
@@ -0,0 +1,5 @@
+{
+ "ignore_dirs": [],
+ "fsevents_latency": 0.5,
+ "fsevents_try_resync": true
+}
diff --git a/App.tsx b/App.tsx
index 8f9f5799..1199aee1 100644
--- a/App.tsx
+++ b/App.tsx
@@ -1,23 +1,29 @@
-import React, { useContext, useEffect } from 'react';
+import React, {useContext, useEffect} from 'react';
import AppLoading from 'expo-app-loading';
-import { AppLayout } from './screens/AppLayout';
-import { useFont } from './shared/hooks/useFont';
-import { GlobalContextProvider } from './components/GlobalContextProvider';
-import { GlobalContext } from './shared/GlobalContext';
-import { useSelector } from '@xstate/react';
-import { useTranslation } from 'react-i18next';
+import {AppLayout} from './screens/AppLayout';
+import {useFont} from './shared/hooks/useFont';
+import {GlobalContextProvider} from './components/GlobalContextProvider';
+import {GlobalContext} from './shared/GlobalContext';
+import {useSelector} from '@xstate/react';
+import {useTranslation} from 'react-i18next';
import {
selectIsDecryptError,
selectIsKeyInvalidateError,
selectIsReadError,
selectIsReady,
} from './machines/app';
-import { DualMessageOverlay } from './components/DualMessageOverlay';
-import { useApp } from './screens/AppController';
-import { Alert } from 'react-native';
-import { ErrorMessageOverlay } from './components/MessageOverlay';
+import {DualMessageOverlay} from './components/DualMessageOverlay';
+import {useApp} from './screens/AppController';
+import {Alert} from 'react-native';
+import {
+ getAppInfoData,
+ getTelemetryConfigData,
+ initializeTelemetry,
+ sendAppInfoEvent,
+} from './shared/telemetry/TelemetryUtils';
+import {MessageOverlay} from './components/MessageOverlay';
import SecureKeystore from 'react-native-secure-keystore';
-import { isCustomSecureKeystore } from './shared/cryptoutil/cryptoUtil';
+import {isCustomSecureKeystore} from './shared/cryptoutil/cryptoUtil';
import i18n from './i18n';
// kludge: this is a bad practice but has been done temporarily to surface
@@ -35,36 +41,43 @@ const DecryptErrorAlert = (controller, t) => {
},
]);
};
+function configureTelemetry() {
+ const config = getTelemetryConfigData();
+ initializeTelemetry(config);
+ sendAppInfoEvent(getAppInfoData());
+}
const AppLayoutWrapper: React.FC = () => {
- const { appService } = useContext(GlobalContext);
+ const {appService} = useContext(GlobalContext);
const isDecryptError = useSelector(appService, selectIsDecryptError);
const controller = useApp();
- const { t } = useTranslation('WelcomeScreen');
+ const {t} = useTranslation('WelcomeScreen');
if (isDecryptError) {
DecryptErrorAlert(controller, t);
}
+ configureTelemetry();
return ;
};
const AppLoadingWrapper: React.FC = () => {
- const { appService } = useContext(GlobalContext);
+ const {appService} = useContext(GlobalContext);
const isReadError = useSelector(appService, selectIsReadError);
const isKeyInvalidateError = useSelector(
appService,
- selectIsKeyInvalidateError
+ selectIsKeyInvalidateError,
);
const controller = useApp();
- const { t } = useTranslation('WelcomeScreen');
+ const {t} = useTranslation('WelcomeScreen');
return (
<>
-
-
{isReadError ? (
@@ -81,16 +94,16 @@ const AppLoadingWrapper: React.FC = () => {
};
const AppInitialization: React.FC = () => {
- const { appService } = useContext(GlobalContext);
+ const {appService} = useContext(GlobalContext);
const isReady = useSelector(appService, selectIsReady);
const hasFontsLoaded = useFont();
- const { t } = useTranslation('common');
+ const {t} = useTranslation('common');
useEffect(() => {
if (isCustomSecureKeystore()) {
SecureKeystore.updatePopup(
t('biometricPopup.title'),
- t('biometricPopup.description')
+ t('biometricPopup.description'),
);
}
}, [i18n.language]);
diff --git a/README.md b/README.md
index ef19c1bb..48d5ad36 100644
--- a/README.md
+++ b/README.md
@@ -174,3 +174,26 @@ More info here:
## Credits
Credits listed [here](/Credits.md)
+
+## Congratulations! :tada:
+
+You've successfully run and modified your React Native App. :partying_face:
+
+### Now what?
+
+- If you want to add this new React Native code to an existing application, check out the [Integration guide](https://reactnative.dev/docs/integration-with-existing-apps).
+- If you're curious to learn more about React Native, check out the [Introduction to React Native](https://reactnative.dev/docs/getting-started).
+
+# Troubleshooting
+
+If you can't get this to work, see the [Troubleshooting](https://reactnative.dev/docs/troubleshooting) page.
+
+# Learn More
+
+To learn more about React Native, take a look at the following resources:
+
+- [React Native Website](https://reactnative.dev) - learn more about React Native.
+- [Getting Started](https://reactnative.dev/docs/environment-setup) - an **overview** of React Native and how setup your environment.
+- [Learn the Basics](https://reactnative.dev/docs/getting-started) - a **guided tour** of the React Native **basics**.
+- [Blog](https://reactnative.dev/blog) - read the latest official React Native **Blog** posts.
+- [`@facebook/react-native`](https://github.com/facebook/react-native) - the Open Source; GitHub **repository** for React Native.
diff --git a/android/.settings/org.eclipse.buildship.core.prefs b/android/.settings/org.eclipse.buildship.core.prefs
deleted file mode 100644
index 267336a2..00000000
--- a/android/.settings/org.eclipse.buildship.core.prefs
+++ /dev/null
@@ -1,13 +0,0 @@
-arguments=
-auto.sync=false
-build.scans.enabled=false
-connection.gradle.distribution=GRADLE_DISTRIBUTION(WRAPPER)
-connection.project.dir=
-eclipse.preferences.version=1
-gradle.user.home=
-java.home=C\:/Program Files/OpenJDK/openjdk-11.0.12_7
-jvm.arguments=
-offline.mode=false
-override.workspace.settings=true
-show.console.view=true
-show.executions.view=true
diff --git a/android/app/BUCK b/android/app/BUCK
deleted file mode 100644
index b4ce6f6a..00000000
--- a/android/app/BUCK
+++ /dev/null
@@ -1,55 +0,0 @@
-# To learn about Buck see [Docs](https://buckbuild.com/).
-# To run your application with Buck:
-# - install Buck
-# - `npm start` - to start the packager
-# - `cd android`
-# - `keytool -genkey -v -keystore keystores/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US"`
-# - `./gradlew :app:copyDownloadableDepsToLibs` - make all Gradle compile dependencies available to Buck
-# - `buck install -r android/app` - compile, install and run application
-#
-
-load(":build_defs.bzl", "create_aar_targets", "create_jar_targets")
-
-lib_deps = []
-
-create_aar_targets(glob(["libs/*.aar"]))
-
-create_jar_targets(glob(["libs/*.jar"]))
-
-android_library(
- name = "all-libs",
- exported_deps = lib_deps,
-)
-
-android_library(
- name = "app-code",
- srcs = glob([
- "src/main/java/**/*.java",
- ]),
- deps = [
- ":all-libs",
- ":build_config",
- ":res",
- ],
-)
-
-android_build_config(
- name = "build_config",
- package = "io.mosip.residentapp",
-)
-
-android_resource(
- name = "res",
- package = "io.mosip.residentapp",
- res = "src/main/res",
-)
-
-android_binary(
- name = "app",
- keystore = "//android/keystores:debug",
- manifest = "src/main/AndroidManifest.xml",
- package_type = "debug",
- deps = [
- ":app-code",
- ],
-)
diff --git a/android/app/build.gradle b/android/app/build.gradle
index d689d91a..48608aa1 100644
--- a/android/app/build.gradle
+++ b/android/app/build.gradle
@@ -5,152 +5,109 @@ 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
-/**
- * The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets
- * and bundleReleaseJsAndAssets).
- * These basically call `react-native bundle` with the correct arguments during the Android build
- * cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the
- * bundle directly from the development server. Below you can see all the possible configurations
- * and their defaults. If you decide to add a configuration block, make sure to add it before the
- * `apply from: "../../node_modules/react-native/react.gradle"` line.
- *
- * project.ext.react = [
- * // the name of the generated asset file containing your JS bundle
- * bundleAssetName: "index.android.bundle",
- *
- * // the entry file for bundle generation. If none specified and
- * // "index.android.js" exists, it will be used. Otherwise "index.js" is
- * // default. Can be overridden with ENTRY_FILE environment variable.
- * entryFile: "index.android.js",
- *
- * // https://reactnative.dev/docs/performance#enable-the-ram-format
- * bundleCommand: "ram-bundle",
- *
- * // whether to bundle JS and assets in debug mode
- * bundleInDebug: false,
- *
- * // whether to bundle JS and assets in release mode
- * bundleInRelease: true,
- *
- * // whether to bundle JS and assets in another build variant (if configured).
- * // See http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Variants
- * // The configuration property can be in the following formats
- * // 'bundleIn${productFlavor}${buildType}'
- * // 'bundleIn${buildType}'
- * // bundleInFreeDebug: true,
- * // bundleInPaidRelease: true,
- * // bundleInBeta: true,
- *
- * // whether to disable dev mode in custom build variants (by default only disabled in release)
- * // for example: to disable dev mode in the staging build type (if configured)
- * devDisabledInStaging: true,
- * // The configuration property can be in the following formats
- * // 'devDisabledIn${productFlavor}${buildType}'
- * // 'devDisabledIn${buildType}'
- *
- * // the root of your project, i.e. where "package.json" lives
- * root: "../../",
- *
- * // where to put the JS bundle asset in debug mode
- * jsBundleDirDebug: "$buildDir/intermediates/assets/debug",
- *
- * // where to put the JS bundle asset in release mode
- * jsBundleDirRelease: "$buildDir/intermediates/assets/release",
- *
- * // where to put drawable resources / React Native assets, e.g. the ones you use via
- * // require('./image.png')), in debug mode
- * resourcesDirDebug: "$buildDir/intermediates/res/merged/debug",
- *
- * // where to put drawable resources / React Native assets, e.g. the ones you use via
- * // require('./image.png')), in release mode
- * resourcesDirRelease: "$buildDir/intermediates/res/merged/release",
- *
- * // by default the gradle tasks are skipped if none of the JS files or assets change; this means
- * // that we don't look at files in android/ or ios/ to determine whether the tasks are up to
- * // date; if you have any other folders that you want to ignore for performance reasons (gradle
- * // indexes the entire tree), add them here. Alternatively, if you have JS files in android/
- * // for example, you might want to remove it from here.
- * inputExcludes: ["android/**", "ios/**"],
- *
- * // override which node gets called and with what additional arguments
- * nodeExecutableAndArgs: ["node"],
- *
- * // supply additional arguments to the packager
- * extraPackagerArgs: []
- * ]
- */
-
-project.ext.react = [
- enableHermes: (findProperty('expo.jsEngine') ?: "jsc") == "hermes",
- bundleInDebug: true,
- bundleInRelease: true,
- devDisabledInRelease: true,
- cliPath: new File(["node", "--print", "require.resolve('react-native/package.json')"].execute(null, rootDir).text.trim()).getParentFile().getAbsolutePath() + "/cli.js",
- hermesCommand: new File(["node", "--print", "require.resolve('hermes-engine/package.json')"].execute(null, rootDir).text.trim()).getParentFile().getAbsolutePath() + "/%OS-BIN%/hermesc",
- composeSourceMapsPath: new File(["node", "--print", "require.resolve('react-native/package.json')"].execute(null, rootDir).text.trim()).getParentFile().getAbsolutePath() + "/scripts/compose-source-maps.js",
-]
-
-apply from: new File(["node", "--print", "require.resolve('react-native/package.json')"].execute(null, rootDir).text.trim(), "../react.gradle")
+react {
+ /* Folders */
+ // The root of your project, i.e. where "package.json" lives. Default is '..'
+ // root = file("../")
+ // The folder where the react-native NPM package is. Default is ../node_modules/react-native
+ // reactNativeDir = file("../node_modules/react-native")
+ // The folder where the react-native Codegen package is. Default is ../node_modules/@react-native/codegen
+ // codegenDir = file("../node_modules/@react-native/codegen")
+ // The cli.js file which is the React Native CLI entrypoint. Default is ../node_modules/react-native/cli.js
+ // cliFile = file("../node_modules/react-native/cli.js")
+ /* Variants */
+ // The list of variants to that are debuggable. For those we're going to
+ // skip the bundling of the JS bundle and the assets. By default is just 'debug'.
+ // If you add flavors like lite, prod, etc. you'll have to list your debuggableVariants.
+ // debuggableVariants = ["liteDebug", "prodDebug"]
+ /* Bundling */
+ // A list containing the node command and its flags. Default is just 'node'.
+ // nodeExecutableAndArgs = ["node"]
+ //
+ // The command to run when bundling. By default is 'bundle'
+ // bundleCommand = "ram-bundle"
+ //
+ // The path to the CLI configuration file. Default is empty.
+ // bundleConfig = file(../rn-cli.config.js)
+ //
+ // The name of the generated asset file containing your JS bundle
+ // bundleAssetName = "MyApplication.android.bundle"
+ //
+ // The entry file for bundle generation. Default is 'index.android.js' or 'index.js'
+ // entryFile = file("../js/MyApplication.android.js")
+ //
+ // A list of extra flags to pass to the 'bundle' commands.
+ // See https://github.com/react-native-community/cli/blob/main/docs/commands.md#bundle
+ // extraPackagerArgs = []
+ /* Hermes Commands */
+ // The hermes compiler command to run. By default it is 'hermesc'
+ // hermesCommand = "$rootDir/my-custom-hermesc/bin/hermesc"
+ //
+ // The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map"
+ // hermesFlags = ["-O", "-output-source-map"]
+}
/**
- * Set this to true to create two separate APKs instead of one:
- * - An APK that only works on ARM devices
- * - An APK that only works on x86 devices
- * The advantage is the size of the APK is reduced by about 4MB.
- * Upload all the APKs to the Play Store and people will download
- * the correct one based on the CPU architecture of their device.
+ * Set this to true to create four separate APKs instead of one,
+ * one for each native architecture. This is useful if you don't
+ * use App Bundles (https://developer.android.com/guide/app-bundle/)
+ * and want to have separate APKs to upload to the Play Store.
*/
def enableSeparateBuildPerCPUArchitecture = true
/**
- * Run Proguard to shrink the Java bytecode in release builds.
+ * Set this to true to Run Proguard on Release builds to minify the Java bytecode.
*/
def enableProguardInReleaseBuilds = false
/**
- * The preferred build flavor of JavaScriptCore.
+ * The preferred build flavor of JavaScriptCore (JSC)
*
* For example, to use the international variant, you can use:
* `def jscFlavor = 'org.webkit:android-jsc-intl:+'`
*
* The international variant includes ICU i18n library and necessary data
* allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that
- * give correct results when using with locales other than en-US. Note that
+ * give correct results when using with locales other than en-US. Note that
* this variant is about 6MiB larger per architecture than default.
*/
def jscFlavor = 'org.webkit:android-jsc:+'
/**
- * Whether to enable the Hermes VM.
- *
- * This should be set on project.ext.react and mirrored here. If it is not set
- * on project.ext.react, JavaScript will not be compiled to Hermes Bytecode
- * and the benefits of using Hermes will therefore be sharply reduced.
+ * Private function to get the list of Native Architectures you want to build.
+ * This reads the value from reactNativeArchitectures in your gradle.properties
+ * file and works together with the --active-arch-only flag of react-native run-android.
*/
-def enableHermes = project.ext.react.get("enableHermes", false);
+def reactNativeArchitectures() {
+ def value = project.getProperties().get("reactNativeArchitectures")
+ return value ? value.split(",") : ["armeabi-v7a", "x86", "x86_64", "arm64-v8a"]
+}
androidGitVersion {
baseCode 0
codeFormat 'MXXNXXPXX'
- format '% tag %%commit_%%branch%'
+ format '%tag_%%commit_%%branch%'
}
android {
+ ndkVersion rootProject.ext.ndkVersion
compileSdkVersion rootProject.ext.compileSdkVersion
ext {
APP_NAME_RELEASE = "@string/app_name"
- APP_NAME_PH = "@string/app_name_ph"
APP_NAME_MOSIP = "@string/app_name_mosip"
APP_NAME_BETA = "@string/app_name_beta"
}
- compileOptions {
- sourceCompatibility JavaVersion.VERSION_1_8
- targetCompatibility JavaVersion.VERSION_1_8
- }
+
+ namespace 'io.mosip.residentapp'
+
+
+ namespace 'io.mosip.residentapp'
defaultConfig {
applicationId 'io.mosip.residentapp'
@@ -164,7 +121,8 @@ android {
manifestPlaceholders = [
APP_NAME: APP_NAME_RELEASE,
- GOOGLE_NEARBY_MESSAGES_API_KEY: "${properties.getProperty('GOOGLE_NEARBY_MESSAGES_API_KEY')}"
+ GOOGLE_NEARBY_MESSAGES_API_KEY: "${properties.getProperty('GOOGLE_NEARBY_MESSAGES_API_KEY')}",
+ appAuthRedirectScheme: 'io.mosip.residentapp.inji'
]
}
splits {
@@ -175,6 +133,7 @@ android {
include "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
}
}
+
signingConfigs {
release {
def keystore = file('release.keystore')
@@ -233,28 +192,22 @@ android {
]
dimension "inji"
}
- ph {
- versionName defaultConfig.versionName + "-ph"
- manifestPlaceholders = [
- APP_NAME: APP_NAME_PH
- ]
- dimension "inji"
- }
}
android.applicationVariants.all { variant ->
variant.outputs.all { output ->
def datetime = new Date().format('yyyyMMdd_HHmm')
def architecture = output.getFilter(com.android.build.OutputFile.ABI) ?: "universal"
- outputFileName = "${defaultConfig.applicationId}-${variant.versionName}_${datetime}_${architecture}.apk"
+ outputFileName = "Inji_${variant.versionName}_${datetime}_${architecture}.apk"
}
}
}
dependencies {
- implementation fileTree(dir: "libs", include: ["*.jar"])
- //noinspection GradleDynamicVersion
- implementation "com.facebook.react:react-native:+"// From node_modules
+
+ // The version of react-native is set by the React Native Gradle Plugin
+ implementation("com.facebook.react:react-android")
+
implementation 'com.facebook.soloader:soloader:0.10.1+'
def isGifEnabled = (findProperty('expo.gif.enabled') ?: "") == "true";
@@ -283,9 +236,7 @@ dependencies {
}
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"
- debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") {
- exclude group:'com.facebook.fbjni'
- }
+ debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}")
debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
exclude group:'com.facebook.flipper'
exclude group:'com.squareup.okhttp3', module:'okhttp'
@@ -294,9 +245,8 @@ dependencies {
exclude group:'com.facebook.flipper'
}
- if (enableHermes) {
- debugImplementation files(new File(["node", "--print", "require.resolve('hermes-engine/package.json')"].execute(null, rootDir).text.trim(), "../android/hermes-debug.aar"))
- releaseImplementation files(new File(["node", "--print", "require.resolve('hermes-engine/package.json')"].execute(null, rootDir).text.trim(), "../android/hermes-release.aar"))
+ if (hermesEnabled.toBoolean()) {
+ implementation("com.facebook.react:hermes-android")
} else {
implementation jscFlavor
}
@@ -306,15 +256,7 @@ dependencies {
implementation 'com.jakewharton.timber:timber:4.7.1'
}
-// Run this once to be able to run the application with BUCK
-// puts all compile dependencies into folder libs for BUCK to use
-task copyDownloadableDepsToLibs(type: Copy) {
- from configurations.compile
- into 'libs'
-}
-
-apply from: new File(["node", "--print", "require.resolve('@react-native-community/cli-platform-android/package.json')"].execute(null, rootDir).text.trim(), "../native_modules.gradle");
-applyNativeModulesAppBuildGradle(project)
+apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
apply from: "./eas-build.gradle"
try {
diff --git a/android/app/build_defs.bzl b/android/app/build_defs.bzl
deleted file mode 100644
index fff270f8..00000000
--- a/android/app/build_defs.bzl
+++ /dev/null
@@ -1,19 +0,0 @@
-"""Helper definitions to glob .aar and .jar targets"""
-
-def create_aar_targets(aarfiles):
- for aarfile in aarfiles:
- name = "aars__" + aarfile[aarfile.rindex("/") + 1:aarfile.rindex(".aar")]
- lib_deps.append(":" + name)
- android_prebuilt_aar(
- name = name,
- aar = aarfile,
- )
-
-def create_jar_targets(jarfiles):
- for jarfile in jarfiles:
- name = "jars__" + jarfile[jarfile.rindex("/") + 1:jarfile.rindex(".jar")]
- lib_deps.append(":" + name)
- prebuilt_jar(
- name = name,
- binary_jar = jarfile,
- )
diff --git a/android/app/src/debug/AndroidManifest.xml b/android/app/src/debug/AndroidManifest.xml
index a1bdc91d..77f4f4f1 100644
--- a/android/app/src/debug/AndroidManifest.xml
+++ b/android/app/src/debug/AndroidManifest.xml
@@ -12,5 +12,8 @@
-
+
+
+
+
diff --git a/android/app/src/debug/java/io/mosip/residentapp/ReactNativeFlipper.java b/android/app/src/debug/java/io/mosip/residentapp/ReactNativeFlipper.java
index ef368bd9..f4263ee7 100644
--- a/android/app/src/debug/java/io/mosip/residentapp/ReactNativeFlipper.java
+++ b/android/app/src/debug/java/io/mosip/residentapp/ReactNativeFlipper.java
@@ -1,5 +1,5 @@
/**
- * Copyright (c) Facebook, Inc. and its affiliates.
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
*
*
This source code is licensed under the MIT license found in the LICENSE file in the root
* directory of this source tree.
@@ -17,22 +17,27 @@ import com.facebook.flipper.plugins.inspector.DescriptorMapping;
import com.facebook.flipper.plugins.inspector.InspectorFlipperPlugin;
import com.facebook.flipper.plugins.network.FlipperOkhttpInterceptor;
import com.facebook.flipper.plugins.network.NetworkFlipperPlugin;
-import com.facebook.flipper.plugins.react.ReactFlipperPlugin;
import com.facebook.flipper.plugins.sharedpreferences.SharedPreferencesFlipperPlugin;
+import com.facebook.react.ReactInstanceEventListener;
import com.facebook.react.ReactInstanceManager;
import com.facebook.react.bridge.ReactContext;
import com.facebook.react.modules.network.NetworkingModule;
import okhttp3.OkHttpClient;
+/**
+ * Class responsible of loading Flipper inside your React Native application. This is the debug
+ * flavor of it. Here you can add your own plugins and customize the Flipper setup.
+ */
public class ReactNativeFlipper {
public static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) {
if (FlipperUtils.shouldEnableFlipper(context)) {
final FlipperClient client = AndroidFlipperClient.getInstance(context);
+
client.addPlugin(new InspectorFlipperPlugin(context, DescriptorMapping.withDefaults()));
- client.addPlugin(new ReactFlipperPlugin());
client.addPlugin(new DatabasesFlipperPlugin(context));
client.addPlugin(new SharedPreferencesFlipperPlugin(context));
client.addPlugin(CrashReporterPlugin.getInstance());
+
NetworkFlipperPlugin networkFlipperPlugin = new NetworkFlipperPlugin();
NetworkingModule.setCustomClientBuilder(
new NetworkingModule.CustomClientBuilder() {
@@ -43,12 +48,13 @@ public class ReactNativeFlipper {
});
client.addPlugin(networkFlipperPlugin);
client.start();
+
// Fresco Plugin needs to ensure that ImagePipelineFactory is initialized
// Hence we run if after all native modules have been initialized
ReactContext reactContext = reactInstanceManager.getCurrentReactContext();
if (reactContext == null) {
reactInstanceManager.addReactInstanceEventListener(
- new ReactInstanceManager.ReactInstanceEventListener() {
+ new ReactInstanceEventListener() {
@Override
public void onReactContextInitialized(ReactContext reactContext) {
reactInstanceManager.removeReactInstanceEventListener(this);
diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml
index 047aeb58..12336076 100644
--- a/android/app/src/main/AndroidManifest.xml
+++ b/android/app/src/main/AndroidManifest.xml
@@ -1,54 +1,51 @@
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
+
+
-
-
-
-
+
+
+
+
-
+
-
+
\ No newline at end of file
diff --git a/android/app/src/main/java/io/mosip/residentapp/MainActivity.java b/android/app/src/main/java/io/mosip/residentapp/MainActivity.java
index 61304f51..cf7449c3 100644
--- a/android/app/src/main/java/io/mosip/residentapp/MainActivity.java
+++ b/android/app/src/main/java/io/mosip/residentapp/MainActivity.java
@@ -1,4 +1,5 @@
package io.mosip.residentapp;
+import expo.modules.ReactActivityDelegateWrapper;
import android.Manifest;
import android.content.Context;
@@ -13,6 +14,9 @@ import androidx.core.content.ContextCompat;
import com.facebook.react.ReactActivity;
import com.facebook.react.ReactActivityDelegate;
import com.facebook.react.ReactRootView;
+import com.facebook.react.ReactActivityDelegate;
+import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint;
+import com.facebook.react.defaults.DefaultReactActivityDelegate;
import expo.modules.ReactActivityDelegateWrapper;
/**
@@ -108,4 +112,20 @@ public class MainActivity extends ReactActivity {
}
recreate();
}
+
+ /**
+ * Returns the instance of the {@link ReactActivityDelegate}. Here we use a util class {@link
+ * DefaultReactActivityDelegate} which allows you to easily enable Fabric and Concurrent React
+ * (aka React 18) with two boolean flags.
+ */
+ @Override
+ protected ReactActivityDelegate createReactActivityDelegate() {
+ return new ReactActivityDelegateWrapper(this, BuildConfig.IS_NEW_ARCHITECTURE_ENABLED, new DefaultReactActivityDelegate( this,
+ getMainComponentName(),
+ // If you opted-in for the New Architecture, we enable the Fabric Renderer.
+ DefaultNewArchitectureEntryPoint.getFabricEnabled(), // fabricEnabled
+ // If you opted-in for the New Architecture, we enable Concurrent React (i.e. React 18).
+ DefaultNewArchitectureEntryPoint.getConcurrentReactEnabled() // concurrentRootEnabled
+ ));
+ }
}
diff --git a/android/app/src/main/java/io/mosip/residentapp/MainActivity.java.bak b/android/app/src/main/java/io/mosip/residentapp/MainActivity.java.bak
deleted file mode 100644
index 329fdf4c..00000000
--- a/android/app/src/main/java/io/mosip/residentapp/MainActivity.java.bak
+++ /dev/null
@@ -1,42 +0,0 @@
-package io.mosip.residentapp;
-
-import android.os.Bundle;
-
-import com.facebook.react.ReactActivity;
-import com.facebook.react.ReactActivityDelegate;
-import com.facebook.react.ReactRootView;
-import com.swmansion.gesturehandler.react.RNGestureHandlerEnabledRootView;
-
-import expo.modules.ReactActivityDelegateWrapper;
-
-public class MainActivity extends ReactActivity {
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- // Set the theme to AppTheme BEFORE onCreate to support
- // coloring the background, status bar, and navigation bar.
- // This is required for expo-splash-screen.
- setTheme(R.style.AppTheme);
- super.onCreate(null);
- }
-
- /**
- * Returns the name of the main component registered from JavaScript.
- * This is used to schedule rendering of the component.
- */
- @Override
- protected String getMainComponentName() {
- return "main";
- }
-
- @Override
- protected ReactActivityDelegate createReactActivityDelegate() {
- return new ReactActivityDelegateWrapper(
- this,
- new ReactActivityDelegate(this, getMainComponentName()) {
- @Override
- protected ReactRootView createRootView() {
- return new RNGestureHandlerEnabledRootView(MainActivity.this);
- }
- });
- }
-}
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 80c0d4bf..d952ffcf 100644
--- a/android/app/src/main/java/io/mosip/residentapp/MainApplication.java
+++ b/android/app/src/main/java/io/mosip/residentapp/MainApplication.java
@@ -1,4 +1,6 @@
package io.mosip.residentapp;
+import expo.modules.ApplicationLifecycleDispatcher;
+import expo.modules.ReactNativeHostWrapper;
import android.app.Application;
import android.content.Context;
@@ -12,10 +14,10 @@ import com.facebook.react.ReactApplication;
import com.facebook.react.ReactInstanceManager;
import com.facebook.react.ReactNativeHost;
import com.facebook.react.ReactPackage;
+import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint;
+import com.facebook.react.defaults.DefaultReactNativeHost;
import com.facebook.soloader.SoLoader;
-import expo.modules.ApplicationLifecycleDispatcher;
-import expo.modules.ReactNativeHostWrapper;
import timber.log.Timber;
import com.facebook.react.bridge.JSIModulePackage;
@@ -26,9 +28,8 @@ import java.lang.reflect.InvocationTargetException;
import java.util.List;
public class MainApplication extends Application implements ReactApplication {
- private final ReactNativeHost mReactNativeHost = new ReactNativeHostWrapper(
- this,
- new ReactNativeHost(this) {
+ private final ReactNativeHost mReactNativeHost =
+ new ReactNativeHostWrapper(this, new DefaultReactNativeHost(this) {
@Override
public boolean getUseDeveloperSupport() {
return BuildConfig.DEBUG;
@@ -47,6 +48,14 @@ public class MainApplication extends Application implements ReactApplication {
protected String getJSMainModuleName() {
return "index";
}
+ @Override
+ protected boolean isNewArchEnabled() {
+ return BuildConfig.IS_NEW_ARCHITECTURE_ENABLED;
+ }
+ @Override
+ protected Boolean isHermesEnabled() {
+ return BuildConfig.IS_HERMES_ENABLED;
+ }
});
@Override
@@ -59,8 +68,11 @@ public class MainApplication extends Application implements ReactApplication {
super.onCreate();
SoLoader.init(this, /* native exopackage */ false);
- initializeFlipper(this, getReactNativeHost().getReactInstanceManager());
- ApplicationLifecycleDispatcher.onApplicationCreate(this);
+ if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
+ // If you opted-in for the New Architecture, we load the native entry point for this app.
+ DefaultNewArchitectureEntryPoint.load();
+ }
+ ReactNativeFlipper.initializeFlipper(this, getReactNativeHost().getReactInstanceManager());
if (BuildConfig.DEBUG) {
Timber.plant(new Timber.DebugTree());
@@ -68,44 +80,10 @@ public class MainApplication extends Application implements ReactApplication {
// Setup Firebase
FirebaseAnalytics.getInstance(this);
Timber.plant(new CrashReportingTree());
+ ApplicationLifecycleDispatcher.onApplicationCreate(this);
}
- @Override
- public void onConfigurationChanged(@NonNull Configuration newConfig) {
- super.onConfigurationChanged(newConfig);
- ApplicationLifecycleDispatcher.onConfigurationChanged(this, newConfig);
- }
- /**
- * Loads Flipper in React Native templates. Call this in the onCreate method with something like
- * initializeFlipper(this, getReactNativeHost().getReactInstanceManager());
- *
- * @param context
- * @param reactInstanceManager
- */
- private static void initializeFlipper(
- Context context, ReactInstanceManager reactInstanceManager) {
- if (BuildConfig.DEBUG) {
- try {
- /*
- We use reflection here to pick up the class that initializes Flipper,
- since Flipper library is not available in release mode
- */
- Class> aClass = Class.forName("io.mosip.residentapp.ReactNativeFlipper");
- aClass
- .getMethod("initializeFlipper", Context.class, ReactInstanceManager.class)
- .invoke(null, context, reactInstanceManager);
- } catch (ClassNotFoundException e) {
- e.printStackTrace();
- } catch (NoSuchMethodException e) {
- e.printStackTrace();
- } catch (IllegalAccessException e) {
- e.printStackTrace();
- } catch (InvocationTargetException e) {
- e.printStackTrace();
- }
- }
- }
/**
* A tree which logs important information for crash reporting.
*/
@@ -128,4 +106,10 @@ public class MainApplication extends Application implements ReactApplication {
}
}
}
+
+ @Override
+ public void onConfigurationChanged(Configuration newConfig) {
+ super.onConfigurationChanged(newConfig);
+ ApplicationLifecycleDispatcher.onConfigurationChanged(this, newConfig);
+ }
}
diff --git a/android/app/src/main/res/drawable/mosip_logo.png b/android/app/src/main/res/drawable/mosip_logo.png
deleted file mode 100644
index c761d380..00000000
Binary files a/android/app/src/main/res/drawable/mosip_logo.png and /dev/null differ
diff --git a/android/app/src/main/res/drawable/splash_image.png b/android/app/src/main/res/drawable/splash_image.png
new file mode 100644
index 00000000..ce339f7d
Binary files /dev/null and b/android/app/src/main/res/drawable/splash_image.png differ
diff --git a/android/app/src/main/res/drawable/splashscreen.xml b/android/app/src/main/res/drawable/splashscreen.xml
index 70fc5faf..341aa537 100644
--- a/android/app/src/main/res/drawable/splashscreen.xml
+++ b/android/app/src/main/res/drawable/splashscreen.xml
@@ -1,5 +1,11 @@
-
-
\ No newline at end of file
+
+
+ -
+
+
+
diff --git a/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
index 00b86e2f..b8335715 100644
--- a/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
+++ b/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
@@ -1,5 +1,5 @@
-
+
\ No newline at end of file
diff --git a/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
index 00b86e2f..b8335715 100644
--- a/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
+++ b/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
@@ -1,5 +1,5 @@
-
+
\ No newline at end of file
diff --git a/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
index bdb1022a..fe1b1174 100644
Binary files a/android/app/src/main/res/mipmap-hdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ
diff --git a/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png b/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png
index 0baedc4b..d2f6a797 100644
Binary files a/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png and b/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png differ
diff --git a/android/app/src/main/res/mipmap-hdpi/ic_launcher_mosip.png b/android/app/src/main/res/mipmap-hdpi/ic_launcher_mosip.png
index 8fcc1dfc..d2f6a797 100644
Binary files a/android/app/src/main/res/mipmap-hdpi/ic_launcher_mosip.png and b/android/app/src/main/res/mipmap-hdpi/ic_launcher_mosip.png differ
diff --git a/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
index d699dce7..667f3631 100644
Binary files a/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png and b/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png differ
diff --git a/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
index 20ab661b..064fce09 100644
Binary files a/android/app/src/main/res/mipmap-mdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ
diff --git a/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png b/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png
index 4ac95aa5..a63d82ce 100644
Binary files a/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png and b/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png differ
diff --git a/android/app/src/main/res/mipmap-mdpi/ic_launcher_mosip.png b/android/app/src/main/res/mipmap-mdpi/ic_launcher_mosip.png
index d6694772..a63d82ce 100644
Binary files a/android/app/src/main/res/mipmap-mdpi/ic_launcher_mosip.png and b/android/app/src/main/res/mipmap-mdpi/ic_launcher_mosip.png differ
diff --git a/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
index f667950c..a832cd3f 100644
Binary files a/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png and b/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png differ
diff --git a/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
index 95cfd92b..3bf90871 100644
Binary files a/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ
diff --git a/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png b/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png
index 4932bbad..e3d82442 100644
Binary files a/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png and b/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png differ
diff --git a/android/app/src/main/res/mipmap-xhdpi/ic_launcher_mosip.png b/android/app/src/main/res/mipmap-xhdpi/ic_launcher_mosip.png
index 763e641b..e3d82442 100644
Binary files a/android/app/src/main/res/mipmap-xhdpi/ic_launcher_mosip.png and b/android/app/src/main/res/mipmap-xhdpi/ic_launcher_mosip.png differ
diff --git a/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
index f17fb26b..e0575f13 100644
Binary files a/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png and b/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png differ
diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
index 2852d710..554bf6ab 100644
Binary files a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ
diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png
index 5435db13..0eeac744 100644
Binary files a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png and b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png differ
diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_mosip.png b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_mosip.png
index b6d6d55e..0eeac744 100644
Binary files a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_mosip.png and b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_mosip.png differ
diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
index dd3eca94..dff3acfa 100644
Binary files a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png and b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png differ
diff --git a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
index 9f64b814..54c78b2f 100644
Binary files a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ
diff --git a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png
index 8e2fea97..aaa5b2cf 100644
Binary files a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png and b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png differ
diff --git a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_mosip.png b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_mosip.png
index b98b0328..aaa5b2cf 100644
Binary files a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_mosip.png and b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_mosip.png differ
diff --git a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
index c85fb66f..796f0d29 100644
Binary files a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png and b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png differ
diff --git a/android/app/src/main/res/values-night/colors.xml b/android/app/src/main/res/values-night/colors.xml
index 9dc2f904..3c05de5b 100644
--- a/android/app/src/main/res/values-night/colors.xml
+++ b/android/app/src/main/res/values-night/colors.xml
@@ -1,2 +1 @@
-
\ No newline at end of file
diff --git a/android/app/src/main/res/values/colors.xml b/android/app/src/main/res/values/colors.xml
index a2e76939..c9ee8c63 100644
--- a/android/app/src/main/res/values/colors.xml
+++ b/android/app/src/main/res/values/colors.xml
@@ -1,7 +1,7 @@
-
#FFFFFF
#FFFFFF
#023c69
#ffffff
+ #ffffff
\ No newline at end of file
diff --git a/android/app/src/main/res/values/strings.xml b/android/app/src/main/res/values/strings.xml
index ff10a980..811dbf26 100644
--- a/android/app/src/main/res/values/strings.xml
+++ b/android/app/src/main/res/values/strings.xml
@@ -1,4 +1,3 @@
-
Inji
MOSIP Resident App - Mosip/Inji
@@ -6,4 +5,5 @@
MOSIP Resident App - PH
cover
false
+ undefined
\ No newline at end of file
diff --git a/android/app/src/main/res/values/styles.xml b/android/app/src/main/res/values/styles.xml
index bef78ada..b0cbdbeb 100644
--- a/android/app/src/main/res/values/styles.xml
+++ b/android/app/src/main/res/values/styles.xml
@@ -1,4 +1,3 @@
-
+
+
+
+
+
+
+
+
+
+
Started
+
Sep 20, 2023 02:37:12 PM
+
+
+
+
+
Ended
+
Sep 20, 2023 02:48:14 PM
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+