├── .buckconfig ├── .env.dev ├── .env.example ├── .eslintrc.js ├── .flowconfig ├── .gitattributes ├── .github └── workflows │ ├── build-android-debug.yml │ └── build-test.yml ├── .gitignore ├── .npmignore ├── .prettierrc ├── .watchmanconfig ├── CODE_OF_CONDUCT.md ├── LICENSE ├── Readme.md ├── ReleaseNote.md ├── __tests__ └── App.tsx ├── android ├── ChangeAppIcon.md ├── app │ ├── BUCK │ ├── build.gradle │ ├── google-services.json │ ├── proguard-rules.pro │ ├── release │ │ └── app-release.aab │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ ├── assets │ │ ├── appcenter-config.json │ │ ├── cmdcenter.cer │ │ ├── fonts │ │ │ ├── AntDesign.ttf │ │ │ ├── DBHelvethaicaX-Bd.ttf │ │ │ ├── DBHelvethaicaX-BdIt.ttf │ │ │ ├── DBHelvethaicaX-Blk.ttf │ │ │ ├── DBHelvethaicaX-BlkIt.ttf │ │ │ ├── DBHelvethaicaX-It.ttf │ │ │ ├── DBHelvethaicaX-Li.ttf │ │ │ ├── DBHelvethaicaX-LiIt.ttf │ │ │ ├── DBHelvethaicaX-Med.ttf │ │ │ ├── DBHelvethaicaX-MedIt.ttf │ │ │ ├── DBHelvethaicaX-Reg.ttf │ │ │ ├── DBHelvethaicaX-Thin.ttf │ │ │ ├── DBHelvethaicaX-ThinIt.ttf │ │ │ ├── DBHelvethaicaX-UlLi.ttf │ │ │ ├── DBHelvethaicaX-UlLiExt.ttf │ │ │ ├── DBHelvethaicaX-UlLiIt.ttf │ │ │ ├── Entypo.ttf │ │ │ ├── EvilIcons.ttf │ │ │ ├── Feather.ttf │ │ │ ├── FontAwesome.ttf │ │ │ ├── FontAwesome5_Brands.ttf │ │ │ ├── FontAwesome5_Regular.ttf │ │ │ ├── FontAwesome5_Solid.ttf │ │ │ ├── Fontisto.ttf │ │ │ ├── Foundation.ttf │ │ │ ├── Ionicons.ttf │ │ │ ├── MaterialCommunityIcons.ttf │ │ │ ├── MaterialIcons.ttf │ │ │ ├── Octicons.ttf │ │ │ ├── Roboto.ttf │ │ │ ├── Roboto_medium.ttf │ │ │ ├── SimpleLineIcons.ttf │ │ │ ├── Zocial.ttf │ │ │ └── rubicon-icon-font.ttf │ │ ├── index.android.bundle │ │ ├── shopqr-dev.cer │ │ ├── shopqr.cer │ │ ├── thaialert-dev.cer │ │ ├── thaialert-staging.cer │ │ └── thaialert.cer │ │ ├── bg_geo-web.png │ │ ├── bg_geo_no_transparency-web.png │ │ ├── java │ │ └── com │ │ │ └── thaialert │ │ │ └── app │ │ │ ├── MainActivity.java │ │ │ ├── MainApplication.java │ │ │ └── SplashActivity.java │ │ ├── res │ │ ├── drawable-xhdpi │ │ │ ├── ic_contact_tracer_noti.png │ │ │ └── ic_launcher_background.png │ │ ├── drawable-xxhdpi │ │ │ ├── ic_contact_tracer_noti.png │ │ │ └── ic_launcher_background.png │ │ ├── drawable │ │ │ ├── ic_launcher_foreground.xml │ │ │ └── splash_screen.xml │ │ ├── layout │ │ │ ├── launch_screen.xml │ │ │ └── notification_layout.xml │ │ ├── mipmap-hdpi │ │ │ ├── bg_geo.png │ │ │ ├── bg_geo_no_transparency.png │ │ │ ├── ic_launcher.png │ │ │ └── splash_icon.png │ │ ├── mipmap-mdpi │ │ │ ├── bg_geo.png │ │ │ ├── bg_geo_no_transparency.png │ │ │ ├── ic_launcher.png │ │ │ └── splash_icon.png │ │ ├── mipmap-xhdpi │ │ │ ├── bg_geo.png │ │ │ ├── bg_geo_no_transparency.png │ │ │ ├── ic_launcher.png │ │ │ └── splash_icon.png │ │ ├── mipmap-xxhdpi │ │ │ ├── bg_geo.png │ │ │ ├── bg_geo_no_transparency.png │ │ │ ├── ic_launcher.png │ │ │ └── splash_icon.png │ │ ├── mipmap-xxxhdpi │ │ │ ├── bg_geo.png │ │ │ ├── bg_geo_no_transparency.png │ │ │ ├── ic_launcher.png │ │ │ └── splash_icon.png │ │ ├── playstore-icon.png │ │ ├── raw │ │ │ └── app2.json │ │ └── values │ │ │ ├── colors.xml │ │ │ ├── strings.xml │ │ │ └── styles.xml │ │ └── splash_icon@3x.png ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── keystores │ ├── BUCK │ └── debug.keystore.properties ├── sentry.properties └── settings.gradle ├── app.json ├── appcenter-pre-build.sh ├── assets └── fonts │ ├── DBHelvethaicaX-Bd.ttf │ ├── DBHelvethaicaX-BdIt.ttf │ ├── DBHelvethaicaX-Blk.ttf │ ├── DBHelvethaicaX-BlkIt.ttf │ ├── DBHelvethaicaX-It.ttf │ ├── DBHelvethaicaX-Li.ttf │ ├── DBHelvethaicaX-LiIt.ttf │ ├── DBHelvethaicaX-Med.ttf │ ├── DBHelvethaicaX-MedIt.ttf │ ├── DBHelvethaicaX-Reg.ttf │ ├── DBHelvethaicaX-Thin.ttf │ ├── DBHelvethaicaX-ThinIt.ttf │ ├── DBHelvethaicaX-UlLi.ttf │ ├── DBHelvethaicaX-UlLiExt.ttf │ └── DBHelvethaicaX-UlLiIt.ttf ├── babel.config.js ├── docker-compose.yml ├── fastlane ├── Fastfile ├── README.md └── report.xml ├── i18n ├── i18n.js └── locales │ ├── en.js │ ├── id.js │ ├── km.js │ ├── lo.js │ ├── ma.js │ └── th.js ├── index.android.js ├── index.eu.js ├── index.js ├── ios ├── Launch Screen.storyboard ├── Podfile ├── Podfile.lock ├── ThaiAlert.xcodeproj │ ├── project.pbxproj │ └── xcshareddata │ │ └── xcschemes │ │ ├── ThaiAlert Debug.xcscheme │ │ ├── ThaiAlert Release.xcscheme │ │ └── ThaiAlert Staging.xcscheme ├── ThaiAlert.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ ├── IDEWorkspaceChecks.plist │ │ └── WorkspaceSettings.xcsettings ├── ThaiAlert │ ├── AppCenter-Config.plist │ ├── AppCenter-Config.plist.example │ ├── AppDelegate.h │ ├── AppDelegate.m │ ├── ContactTracerModule.swift │ ├── Images.xcassets │ │ ├── AppIcon-stg.appiconset │ │ │ ├── Contents.json │ │ │ ├── Icon-1024.png │ │ │ ├── Icon-114.png │ │ │ ├── Icon-120.png │ │ │ ├── Icon-121.png │ │ │ ├── Icon-180.png │ │ │ ├── Icon-29.png │ │ │ ├── Icon-40.png │ │ │ ├── Icon-57.png │ │ │ ├── Icon-58.png │ │ │ ├── Icon-60.png │ │ │ ├── Icon-80.png │ │ │ └── Icon-87.png │ │ ├── AppIcon.appiconset │ │ │ ├── 1024.png │ │ │ ├── 114.png │ │ │ ├── 120.png │ │ │ ├── 180.png │ │ │ ├── 29.png │ │ │ ├── 40.png │ │ │ ├── 57.png │ │ │ ├── 58.png │ │ │ ├── 60.png │ │ │ ├── 80.png │ │ │ ├── 87.png │ │ │ └── Contents.json │ │ ├── Contents.json │ │ └── Logo.imageset │ │ │ ├── Contents.json │ │ │ ├── Logo.png │ │ │ ├── Logo@2x.png │ │ │ └── Logo@3x.png │ ├── Info.plist │ ├── ThaiAlert.entitlements │ └── main.m ├── cmdcenter.cer ├── en.lproj │ └── InfoPlist.strings ├── sentry.properties ├── sentry.properties.example ├── shopqr-dev.cer ├── shopqr.cer ├── th.lproj │ └── InfoPlist.strings ├── thaialert-dev.cer ├── thaialert-staging.cer └── thaialert.cer ├── jest.config.js ├── metro.config.js ├── package.json ├── react-native.config.js ├── rn-cli.config.js ├── screenshot.jpg ├── scripts └── postinstall.js ├── src ├── App.tsx ├── AppContext.tsx ├── CheckBoxItem.tsx ├── HudView.tsx ├── api.ts ├── apollo-client.ts ├── assets │ ├── Logo.png │ ├── Logo@2x.png │ ├── bg-dark.png │ ├── bg-home.png │ ├── bg-light.png │ ├── covid.png │ ├── home.png │ ├── logo_header.png │ ├── logo_white.png │ ├── logo_white@2x.png │ ├── mock-avatar.png │ ├── morchana-permission-bluetooth.png │ ├── morchana-permission-bluetooth@2x.png │ ├── morchana-permission-location.png │ ├── morchana-permission-location@2x.png │ ├── morchana-permission-notification.png │ ├── morchana-permission-notification@2x.png │ ├── perm-bluetooth-icon.png │ ├── perm-bluetooth-icon@2x.png │ ├── perm-location-icon.png │ ├── perm-location-icon@2x.png │ ├── perm-motion-icon.png │ ├── perm-motion-icon@2x.png │ └── qr-placeholder.png ├── components │ ├── BackButton.tsx │ ├── Base.tsx │ ├── Button.tsx │ ├── Camera.tsx │ ├── CircularProgressAvatar.tsx │ ├── DebugTouchable.tsx │ ├── Form │ │ ├── FormHeader.tsx │ │ ├── assets │ │ │ ├── doctor.png │ │ │ ├── doctor@2x.png │ │ │ └── logo.png │ │ ├── form-logo-white.png │ │ ├── form-logo.png │ │ ├── header-logo.png │ │ └── header-logo@2x.png │ ├── Logo.tsx │ ├── MyBackground.tsx │ ├── QuestionaireSelect.tsx │ ├── SelfieCaptureGuideline.tsx │ ├── UpdateFaceCamera.tsx │ └── WhiteBackground.tsx ├── config.ts ├── navigations │ ├── 0-Home │ │ ├── AgreementPolicy.tsx │ │ ├── Home.tsx │ │ └── HomeStack.tsx │ ├── 1-Auth │ │ ├── AuthOTP.tsx │ │ ├── AuthPhone.tsx │ │ ├── AuthStack.tsx │ │ ├── OnboardPhone.tsx │ │ ├── onboard-phone.png │ │ └── onboard-phone@2x.png │ ├── 2-Onboarding │ │ ├── OnboadHeader.tsx │ │ ├── OnboardBluetooth.tsx │ │ ├── OnboardComplete.tsx │ │ ├── OnboardFace.tsx │ │ ├── OnboardFaceCamera.tsx │ │ ├── OnboardLocation.tsx │ │ ├── OnboardNotification.tsx │ │ ├── OnboardProgressing.tsx │ │ ├── OnboardingStack.tsx │ │ ├── camera-mask.png │ │ ├── camera-mask@2x.png │ │ └── const.ts │ ├── 3-MainApp │ │ ├── BeaconFoundPopup.tsx │ │ ├── ContactTracer.tsx │ │ ├── Debug.tsx │ │ ├── DebugBackgroundLocation.tsx │ │ ├── MainApp │ │ │ ├── Beacon.tsx │ │ │ ├── QRAvatar.tsx │ │ │ ├── QRBackground.tsx │ │ │ ├── QRFooter.tsx │ │ │ ├── QRHeader.tsx │ │ │ ├── QRSection.tsx │ │ │ ├── QRStateText.tsx │ │ │ ├── QRTagLabel.tsx │ │ │ ├── UpdateProfileButton.tsx │ │ │ └── index.tsx │ │ ├── MainAppFaceCamera.tsx │ │ ├── MainAppStack.tsx │ │ ├── NewMainApp │ │ │ ├── Beacon.tsx │ │ │ ├── QRStateText.tsx │ │ │ ├── UpdateProfileButton.tsx │ │ │ ├── index.tsx │ │ │ ├── logo-pin-morchana.png │ │ │ └── logo-pin-morchana@2x.png │ │ ├── QRCodeResult.tsx │ │ ├── QRCodeScan.tsx │ │ ├── QRPopupContent.tsx │ │ ├── Settings.tsx │ │ ├── beacon_icon.png │ │ ├── beacon_icon@2x.png │ │ ├── morchana.png │ │ ├── morchana@2x.png │ │ ├── noti_icon.png │ │ ├── risk_icon.png │ │ ├── risk_icon.svg │ │ └── risk_icon@2x.png │ ├── 4-Questionaire │ │ ├── QuestionaireForm.tsx │ │ ├── QuestionaireHome.tsx │ │ ├── QuestionaireStack.tsx │ │ ├── QuestionaireSummary.tsx │ │ ├── assets │ │ │ ├── doctor.png │ │ │ ├── doctor@2x.png │ │ │ ├── icon_1.png │ │ │ ├── icon_1@2x.png │ │ │ ├── icon_2.png │ │ │ ├── icon_2@2x.png │ │ │ ├── icon_3.png │ │ │ ├── icon_3@2x.png │ │ │ ├── logo.png │ │ │ ├── logo_white.png │ │ │ ├── logo_white@2x.png │ │ │ └── smile-doctor.png │ │ └── form-input.ts │ ├── ChangeLanguage.tsx │ ├── MockScreen.tsx │ ├── Navigator.tsx │ ├── PrivacyPolicy.tsx │ ├── Webview.tsx │ └── const.ts ├── react-native-background-geolocation.ts ├── services │ ├── background-tracking.ts │ ├── beacon-lookup.ts │ ├── contact-scanner.ts │ ├── contact-tracing-provider.tsx │ └── notification.ts ├── state │ ├── app-state.ts │ ├── qr.ts │ └── userPrivateData.ts ├── styles.ts └── utils │ ├── Permission.tsx │ ├── change-lang.ts │ ├── compose.ts │ ├── crypto.ts │ ├── enforce-update.tsx │ ├── hook-state.ts │ ├── jwt.ts │ ├── navigation.ts │ └── responsive.ts ├── test-noti.js ├── tsconfig.json └── yarn.lock /.buckconfig: -------------------------------------------------------------------------------- 1 | 2 | [android] 3 | target = Google Inc.:Google APIs:23 4 | 5 | [maven_repositories] 6 | central = https://repo1.maven.org/maven2 7 | -------------------------------------------------------------------------------- /.env.dev: -------------------------------------------------------------------------------- 1 | SSL_PINNING_CERT_NAME=thaialert-dev 2 | API_URL=https://api.dev.thaialert.com 3 | SHOP_QR_PINNING_CERT=shopqr-dev 4 | SHOP_API_URL=https://api-dev.covid.odds.team 5 | SHOP_API_NAME=morchana-app 6 | SHOP_API_KEY=qWjchJvz5cMRBk3EUeFPBhkUXybUBSaPTkVacsUfVztkzqHRQKZCT -------------------------------------------------------------------------------- /.env.example: -------------------------------------------------------------------------------- 1 | SSL_PINNING_CERT_NAME= 2 | API_URL= 3 | API_KEY= -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | extends: [ 3 | '@react-native-community', 4 | 'prettier/@typescript-eslint', 5 | 'plugin:prettier/recommended', 6 | ], 7 | } 8 | -------------------------------------------------------------------------------- /.flowconfig: -------------------------------------------------------------------------------- 1 | [ignore] 2 | ; We fork some components by platform 3 | .*/*[.]android.js 4 | 5 | ; Ignore "BUCK" generated dirs 6 | /\.buckd/ 7 | 8 | ; Ignore polyfills 9 | node_modules/react-native/Libraries/polyfills/.* 10 | 11 | ; These should not be required directly 12 | ; require from fbjs/lib instead: require('fbjs/lib/warning') 13 | node_modules/warning/.* 14 | 15 | ; Flow doesn't support platforms 16 | .*/Libraries/Utilities/LoadingView.js 17 | 18 | [untyped] 19 | .*/node_modules/@react-native-community/cli/.*/.* 20 | 21 | [include] 22 | 23 | [libs] 24 | node_modules/react-native/Libraries/react-native/react-native-interface.js 25 | node_modules/react-native/flow/ 26 | 27 | [options] 28 | emoji=true 29 | 30 | esproposal.optional_chaining=enable 31 | esproposal.nullish_coalescing=enable 32 | 33 | module.file_ext=.js 34 | module.file_ext=.json 35 | module.file_ext=.ios.js 36 | 37 | munge_underscores=true 38 | 39 | module.name_mapper='^react-native$' -> '/node_modules/react-native/Libraries/react-native/react-native-implementation' 40 | module.name_mapper='^react-native/\(.*\)$' -> '/node_modules/react-native/\1' 41 | module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> '/node_modules/react-native/Libraries/Image/RelativeImageStub' 42 | 43 | suppress_type=$FlowIssue 44 | suppress_type=$FlowFixMe 45 | suppress_type=$FlowFixMeProps 46 | suppress_type=$FlowFixMeState 47 | 48 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\) 49 | suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)?:? #[0-9]+ 50 | suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError 51 | 52 | [lints] 53 | sketchy-null-number=warn 54 | sketchy-null-mixed=warn 55 | sketchy-number=warn 56 | untyped-type-import=warn 57 | nonstrict-import=warn 58 | deprecated-type=warn 59 | unsafe-getters-setters=warn 60 | unnecessary-invariant=warn 61 | signature-verification-failure=warn 62 | deprecated-utility=error 63 | 64 | [strict] 65 | deprecated-type 66 | nonstrict-import 67 | sketchy-null 68 | unclear-type 69 | unsafe-getters-setters 70 | untyped-import 71 | untyped-type-import 72 | 73 | [version] 74 | ^0.122.0 -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | *.pbxproj -text 2 | -------------------------------------------------------------------------------- /.github/workflows/build-android-debug.yml: -------------------------------------------------------------------------------- 1 | name: Build Debug Android Package 2 | on: 3 | push: 4 | branches: 5 | - master 6 | jobs: 7 | build: 8 | runs-on: ubuntu-20.04 9 | steps: 10 | - uses: actions/checkout@v2 11 | # https://github.com/expo/expo-github-action/issues/20#issuecomment-541676895 12 | - name: Setup kernel for React Native, increase watchers 13 | run: | 14 | echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p 15 | - run: | 16 | docker-compose run builder bash -c 'yarn && cd android && ./gradlew assembleDebug' 17 | - uses: actions/upload-artifact@v2 18 | with: 19 | name: app-debug-apk 20 | path: android/app/build/outputs/apk/debug/app-debug.apk 21 | -------------------------------------------------------------------------------- /.github/workflows/build-test.yml: -------------------------------------------------------------------------------- 1 | 2 | 3 | name: Lint and Test 4 | on: [push, pull_request] 5 | 6 | # A workflow run is made up of one or more jobs that can run sequentially or in parallel 7 | jobs: 8 | # This workflow contains a single job called "build" 9 | build: 10 | # The type of runner that the job will run on 11 | runs-on: ubuntu-latest 12 | 13 | # Steps represent a sequence of tasks that will be executed as part of the job 14 | steps: 15 | # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it 16 | - uses: actions/checkout@v2 17 | 18 | - name: Setup Node.js environment 19 | uses: actions/setup-node@v2 20 | with: 21 | node-version: '10' 22 | check-latest: true 23 | # Runs a set of commands using the runners shell 24 | 25 | - run: yarn install 26 | - run: yarn lint 27 | - run: yarn test 28 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # OSX 2 | # 3 | .DS_Store 4 | 5 | # Xcode 6 | # 7 | build/ 8 | *.pbxuser 9 | !default.pbxuser 10 | *.mode1v3 11 | !default.mode1v3 12 | *.mode2v3 13 | !default.mode2v3 14 | *.perspectivev3 15 | !default.perspectivev3 16 | xcuserdata 17 | *.xccheckout 18 | *.moved-aside 19 | DerivedData 20 | *.hmap 21 | *.ipa 22 | *.xcuserstate 23 | project.xcworkspace 24 | 25 | # Android/IJ 26 | # 27 | *.iml 28 | .idea 29 | .gradle 30 | local.properties 31 | 32 | # node.js 33 | # 34 | node_modules/ 35 | npm-debug.log 36 | 37 | # BUCK 38 | buck-out/ 39 | \.buckd/ 40 | android/app/libs 41 | android/keystores/debug.keystore 42 | *.keystore 43 | !debug.keystore 44 | 45 | ios/Pods/ 46 | *.hprof 47 | .env.production 48 | .env 49 | ThaiAlert.app.dSYM.zip 50 | # sentry.properties 51 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | # OSX 2 | # 3 | .DS_Store 4 | 5 | # Xcode 6 | # 7 | build/ 8 | *.pbxuser 9 | !default.pbxuser 10 | *.mode1v3 11 | !default.mode1v3 12 | *.mode2v3 13 | !default.mode2v3 14 | *.perspectivev3 15 | !default.perspectivev3 16 | xcuserdata 17 | *.xccheckout 18 | *.moved-aside 19 | DerivedData 20 | *.hmap 21 | *.ipa 22 | *.xcuserstate 23 | 24 | # node.js 25 | # 26 | node_modules/ 27 | npm-debug.log 28 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "semi": false, 3 | "trailingComma": "all", 4 | "singleQuote": true, 5 | "no-func-assign": false, 6 | "proseWrap": "always" 7 | } 8 | -------------------------------------------------------------------------------- /.watchmanconfig: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) Code For Public 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Readme.md: -------------------------------------------------------------------------------- 1 | # [Morchana - หมอชนะ aka ThaiAlert] 2 | [![Build Status](https://build.appcenter.ms/v0.1/apps/f8d0296f-daf0-4e4f-a167-c3aaf2fbf195/branches/staging/badge)](https://appcenter.ms/orgs/ThaiAlert.id/apps/ThaiAlert-Staging/build/branches/staging) 3 | ## Getting Started 4 | 5 | First follow this instruction to setup react-native https://reactnative.dev/docs/getting-started 6 | 7 | Create .env file by rename from .env.dev 8 | 9 | ### iOS 10 | 11 | 1. Clone ```git clone https://github.com/codeforpublic/SQUID.git``` 12 | 2. Install Dependencies `cd SQUID && yarn && (cd ios; pod install)` 13 | 3. Start `yarn ios` 14 | 15 | ### Android 16 | 17 | 1. Clone ```git clone https://github.com/codeforpublic/SQUID.git``` 18 | 2. Install Dependencies `cd SQUID && yarn` 19 | 3. Start `npx react-native run-android` 20 | 21 | ## App Flow 22 | 23 | https://www.figma.com/file/lZx75oXlD92cikgSNNXvor/%E0%B8%AA%E0%B8%B9%E0%B9%89-Covid-19?node-id=5%3A366 24 | 25 | ![App Flow](screenshot.jpg "AppFlow") 26 | -------------------------------------------------------------------------------- /ReleaseNote.md: -------------------------------------------------------------------------------- 1 | # Release Note 2 | 3 | ## 24 เมษายน 2020 4 | - แก้ไขระบบตรวจสอบ JWT บน Android 5 | - แก้ไขระบบแสกน QR Code 6 | 7 | ## 20 เมษายน 2020 8 | 9 | - เพิ่มระบบตรวจสอบ jwt signature ใน QR Code ด้วยมาตรฐาน secp256k1 10 | - รองรับ QR แบบพิเศษ เช่น สถานที่ 11 | - อัพเดทหน้าแสดงผล Badge พิเศษ 12 | - อัพเดตการแสดงผลหน้าแสกน QR 13 | - ปรับปรุงระบบการรับ Notification 14 | - ปรับปรุงเงื่อนไขการคำนวนค่าสีต่าง 15 | - ปรับปรุงเสถียรภาพการทำงานบนระบบปฏิบัติการณ์แอนดรอยด์ 16 | -------------------------------------------------------------------------------- /__tests__/App.tsx: -------------------------------------------------------------------------------- 1 | import { Text } from 'react-native' 2 | import React from 'react' 3 | 4 | // Note: test renderer must be required after react-native. 5 | import renderer from 'react-test-renderer' 6 | 7 | it('renders correctly', () => { 8 | renderer.create(Test) 9 | }) 10 | -------------------------------------------------------------------------------- /android/ChangeAppIcon.md: -------------------------------------------------------------------------------- 1 | # Change AppIcon & SplashScreen 2 | 3 | ## Change AppIcon 4 | ### Android 5 | ```android/app/src/main/res/**-mipmap/ic_launcher.png ``` 6 | ### iOS 7 | ```ios/ThaiAlert/Images.xcassets/AppIcon.appiconset ``` 8 | 9 | ## Change SplashScreen 10 | ### Android 11 | ```android/app/src/main/res/**-mipmap/splash_icon.png``` 12 | ### iOS 13 | ```ios/ThaiAlert/Images.xcassets/Logo.imageset``` 14 | 15 | Imageset แต่ละแบบลอง search google ดูครับว่าสร้างยังไง สร้างมือก็ได้ขอแค่มี resolution ใหญ่สุด 16 | 17 | -------------------------------------------------------------------------------- /android/app/BUCK: -------------------------------------------------------------------------------- 1 | # To learn about Buck see [Docs](https://buckbuild.com/). 2 | # To run your application with Buck: 3 | # - install Buck 4 | # - `npm start` - to start the packager 5 | # - `cd android` 6 | # - `keytool -genkey -v -keystore keystores/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US"` 7 | # - `./gradlew :app:copyDownloadableDepsToLibs` - make all Gradle compile dependencies available to Buck 8 | # - `buck install -r android/app` - compile, install and run application 9 | # 10 | 11 | lib_deps = [] 12 | 13 | for jarfile in glob(['libs/*.jar']): 14 | name = 'jars__' + jarfile[jarfile.rindex('/') + 1: jarfile.rindex('.jar')] 15 | lib_deps.append(':' + name) 16 | prebuilt_jar( 17 | name = name, 18 | binary_jar = jarfile, 19 | ) 20 | 21 | for aarfile in glob(['libs/*.aar']): 22 | name = 'aars__' + aarfile[aarfile.rindex('/') + 1: aarfile.rindex('.aar')] 23 | lib_deps.append(':' + name) 24 | android_prebuilt_aar( 25 | name = name, 26 | aar = aarfile, 27 | ) 28 | 29 | android_library( 30 | name = "all-libs", 31 | exported_deps = lib_deps, 32 | ) 33 | 34 | android_library( 35 | name = "app-code", 36 | srcs = glob([ 37 | "src/main/java/**/*.java", 38 | ]), 39 | deps = [ 40 | ":all-libs", 41 | ":build_config", 42 | ":res", 43 | ], 44 | ) 45 | 46 | android_build_config( 47 | name = "build_config", 48 | package = "com.thaialert.app", 49 | ) 50 | 51 | android_resource( 52 | name = "res", 53 | package = "com.thaialert.app", 54 | res = "src/main/res", 55 | ) 56 | 57 | android_binary( 58 | name = "app", 59 | keystore = "//android/keystores:debug", 60 | manifest = "src/main/AndroidManifest.xml", 61 | package_type = "debug", 62 | deps = [ 63 | ":app-code", 64 | ], 65 | ) 66 | -------------------------------------------------------------------------------- /android/app/google-services.json: -------------------------------------------------------------------------------- 1 | { 2 | "project_info": { 3 | "project_number": "914417222955", 4 | "firebase_url": "https://thaialert-23ebe.firebaseio.com", 5 | "project_id": "thaialert-23ebe", 6 | "storage_bucket": "thaialert-23ebe.appspot.com" 7 | }, 8 | "client": [ 9 | { 10 | "client_info": { 11 | "mobilesdk_app_id": "1:914417222955:android:3dc894ec6bccbc9c55716e", 12 | "android_client_info": { 13 | "package_name": "com.thaialert.app" 14 | } 15 | }, 16 | "oauth_client": [ 17 | { 18 | "client_id": "914417222955-os46gtaa3nl1iv3svukerfhl5rv0u9v4.apps.googleusercontent.com", 19 | "client_type": 3 20 | } 21 | ], 22 | "api_key": [ 23 | { 24 | "current_key": "AIzaSyAiTR5qXFlzCwCEt1oGmAwzxkFJlLWPH7c" 25 | } 26 | ], 27 | "services": { 28 | "appinvite_service": { 29 | "other_platform_oauth_client": [ 30 | { 31 | "client_id": "914417222955-os46gtaa3nl1iv3svukerfhl5rv0u9v4.apps.googleusercontent.com", 32 | "client_type": 3 33 | }, 34 | { 35 | "client_id": "914417222955-pv28mc71e2kaemthhgtpbbcca1t5tkme.apps.googleusercontent.com", 36 | "client_type": 2, 37 | "ios_info": { 38 | "bundle_id": "com.thaialert.app" 39 | } 40 | } 41 | ] 42 | } 43 | } 44 | }, 45 | { 46 | "client_info": { 47 | "mobilesdk_app_id": "1:914417222955:android:3dc894ec6bccbc9c55716e", 48 | "android_client_info": { 49 | "package_name": "com.thaialert.app.dev" 50 | } 51 | }, 52 | "oauth_client": [ 53 | { 54 | "client_id": "914417222955-os46gtaa3nl1iv3svukerfhl5rv0u9v4.apps.googleusercontent.com", 55 | "client_type": 3 56 | } 57 | ], 58 | "api_key": [ 59 | { 60 | "current_key": "AIzaSyAiTR5qXFlzCwCEt1oGmAwzxkFJlLWPH7c" 61 | } 62 | ], 63 | "services": { 64 | "appinvite_service": { 65 | "other_platform_oauth_client": [ 66 | { 67 | "client_id": "914417222955-os46gtaa3nl1iv3svukerfhl5rv0u9v4.apps.googleusercontent.com", 68 | "client_type": 3 69 | }, 70 | { 71 | "client_id": "914417222955-pv28mc71e2kaemthhgtpbbcca1t5tkme.apps.googleusercontent.com", 72 | "client_type": 2, 73 | "ios_info": { 74 | "bundle_id": "com.thaialert.app.dev" 75 | } 76 | } 77 | ] 78 | } 79 | } 80 | } 81 | ], 82 | "configuration_version": "1" 83 | } 84 | -------------------------------------------------------------------------------- /android/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | 19 | # For hermes 20 | -keep class com.facebook.hermes.unicode.** { *; } 21 | -------------------------------------------------------------------------------- /android/app/release/app-release.aab: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeforpublic/SQUID/c1a00f7d57e4f364968afd064faea838f3320cab/android/app/release/app-release.aab -------------------------------------------------------------------------------- /android/app/src/main/assets/appcenter-config.json: -------------------------------------------------------------------------------- 1 | { 2 | "app_secret": "b483d52e-ac28-4fdd-bb34-31e86f2eacf1" 3 | } 4 | -------------------------------------------------------------------------------- /android/app/src/main/assets/cmdcenter.cer: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeforpublic/SQUID/c1a00f7d57e4f364968afd064faea838f3320cab/android/app/src/main/assets/cmdcenter.cer -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/AntDesign.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeforpublic/SQUID/c1a00f7d57e4f364968afd064faea838f3320cab/android/app/src/main/assets/fonts/AntDesign.ttf -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/DBHelvethaicaX-Bd.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeforpublic/SQUID/c1a00f7d57e4f364968afd064faea838f3320cab/android/app/src/main/assets/fonts/DBHelvethaicaX-Bd.ttf -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/DBHelvethaicaX-BdIt.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeforpublic/SQUID/c1a00f7d57e4f364968afd064faea838f3320cab/android/app/src/main/assets/fonts/DBHelvethaicaX-BdIt.ttf -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/DBHelvethaicaX-Blk.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeforpublic/SQUID/c1a00f7d57e4f364968afd064faea838f3320cab/android/app/src/main/assets/fonts/DBHelvethaicaX-Blk.ttf -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/DBHelvethaicaX-BlkIt.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeforpublic/SQUID/c1a00f7d57e4f364968afd064faea838f3320cab/android/app/src/main/assets/fonts/DBHelvethaicaX-BlkIt.ttf -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/DBHelvethaicaX-It.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeforpublic/SQUID/c1a00f7d57e4f364968afd064faea838f3320cab/android/app/src/main/assets/fonts/DBHelvethaicaX-It.ttf -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/DBHelvethaicaX-Li.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeforpublic/SQUID/c1a00f7d57e4f364968afd064faea838f3320cab/android/app/src/main/assets/fonts/DBHelvethaicaX-Li.ttf -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/DBHelvethaicaX-LiIt.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeforpublic/SQUID/c1a00f7d57e4f364968afd064faea838f3320cab/android/app/src/main/assets/fonts/DBHelvethaicaX-LiIt.ttf -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/DBHelvethaicaX-Med.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeforpublic/SQUID/c1a00f7d57e4f364968afd064faea838f3320cab/android/app/src/main/assets/fonts/DBHelvethaicaX-Med.ttf -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/DBHelvethaicaX-MedIt.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeforpublic/SQUID/c1a00f7d57e4f364968afd064faea838f3320cab/android/app/src/main/assets/fonts/DBHelvethaicaX-MedIt.ttf -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/DBHelvethaicaX-Reg.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeforpublic/SQUID/c1a00f7d57e4f364968afd064faea838f3320cab/android/app/src/main/assets/fonts/DBHelvethaicaX-Reg.ttf -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/DBHelvethaicaX-Thin.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeforpublic/SQUID/c1a00f7d57e4f364968afd064faea838f3320cab/android/app/src/main/assets/fonts/DBHelvethaicaX-Thin.ttf -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/DBHelvethaicaX-ThinIt.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeforpublic/SQUID/c1a00f7d57e4f364968afd064faea838f3320cab/android/app/src/main/assets/fonts/DBHelvethaicaX-ThinIt.ttf -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/DBHelvethaicaX-UlLi.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeforpublic/SQUID/c1a00f7d57e4f364968afd064faea838f3320cab/android/app/src/main/assets/fonts/DBHelvethaicaX-UlLi.ttf -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/DBHelvethaicaX-UlLiExt.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeforpublic/SQUID/c1a00f7d57e4f364968afd064faea838f3320cab/android/app/src/main/assets/fonts/DBHelvethaicaX-UlLiExt.ttf -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/DBHelvethaicaX-UlLiIt.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeforpublic/SQUID/c1a00f7d57e4f364968afd064faea838f3320cab/android/app/src/main/assets/fonts/DBHelvethaicaX-UlLiIt.ttf -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/Entypo.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeforpublic/SQUID/c1a00f7d57e4f364968afd064faea838f3320cab/android/app/src/main/assets/fonts/Entypo.ttf -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/EvilIcons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeforpublic/SQUID/c1a00f7d57e4f364968afd064faea838f3320cab/android/app/src/main/assets/fonts/EvilIcons.ttf -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/Feather.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeforpublic/SQUID/c1a00f7d57e4f364968afd064faea838f3320cab/android/app/src/main/assets/fonts/Feather.ttf -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/FontAwesome.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeforpublic/SQUID/c1a00f7d57e4f364968afd064faea838f3320cab/android/app/src/main/assets/fonts/FontAwesome.ttf -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/FontAwesome5_Brands.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeforpublic/SQUID/c1a00f7d57e4f364968afd064faea838f3320cab/android/app/src/main/assets/fonts/FontAwesome5_Brands.ttf -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/FontAwesome5_Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeforpublic/SQUID/c1a00f7d57e4f364968afd064faea838f3320cab/android/app/src/main/assets/fonts/FontAwesome5_Regular.ttf -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/FontAwesome5_Solid.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeforpublic/SQUID/c1a00f7d57e4f364968afd064faea838f3320cab/android/app/src/main/assets/fonts/FontAwesome5_Solid.ttf -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/Fontisto.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeforpublic/SQUID/c1a00f7d57e4f364968afd064faea838f3320cab/android/app/src/main/assets/fonts/Fontisto.ttf -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/Foundation.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeforpublic/SQUID/c1a00f7d57e4f364968afd064faea838f3320cab/android/app/src/main/assets/fonts/Foundation.ttf -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/Ionicons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeforpublic/SQUID/c1a00f7d57e4f364968afd064faea838f3320cab/android/app/src/main/assets/fonts/Ionicons.ttf -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/MaterialCommunityIcons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeforpublic/SQUID/c1a00f7d57e4f364968afd064faea838f3320cab/android/app/src/main/assets/fonts/MaterialCommunityIcons.ttf -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/MaterialIcons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeforpublic/SQUID/c1a00f7d57e4f364968afd064faea838f3320cab/android/app/src/main/assets/fonts/MaterialIcons.ttf -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/Octicons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeforpublic/SQUID/c1a00f7d57e4f364968afd064faea838f3320cab/android/app/src/main/assets/fonts/Octicons.ttf -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/Roboto.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeforpublic/SQUID/c1a00f7d57e4f364968afd064faea838f3320cab/android/app/src/main/assets/fonts/Roboto.ttf -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/Roboto_medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeforpublic/SQUID/c1a00f7d57e4f364968afd064faea838f3320cab/android/app/src/main/assets/fonts/Roboto_medium.ttf -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/SimpleLineIcons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeforpublic/SQUID/c1a00f7d57e4f364968afd064faea838f3320cab/android/app/src/main/assets/fonts/SimpleLineIcons.ttf -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/Zocial.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeforpublic/SQUID/c1a00f7d57e4f364968afd064faea838f3320cab/android/app/src/main/assets/fonts/Zocial.ttf -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/rubicon-icon-font.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeforpublic/SQUID/c1a00f7d57e4f364968afd064faea838f3320cab/android/app/src/main/assets/fonts/rubicon-icon-font.ttf -------------------------------------------------------------------------------- /android/app/src/main/assets/shopqr-dev.cer: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeforpublic/SQUID/c1a00f7d57e4f364968afd064faea838f3320cab/android/app/src/main/assets/shopqr-dev.cer -------------------------------------------------------------------------------- /android/app/src/main/assets/shopqr.cer: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeforpublic/SQUID/c1a00f7d57e4f364968afd064faea838f3320cab/android/app/src/main/assets/shopqr.cer -------------------------------------------------------------------------------- /android/app/src/main/assets/thaialert-dev.cer: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeforpublic/SQUID/c1a00f7d57e4f364968afd064faea838f3320cab/android/app/src/main/assets/thaialert-dev.cer -------------------------------------------------------------------------------- /android/app/src/main/assets/thaialert-staging.cer: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeforpublic/SQUID/c1a00f7d57e4f364968afd064faea838f3320cab/android/app/src/main/assets/thaialert-staging.cer -------------------------------------------------------------------------------- /android/app/src/main/assets/thaialert.cer: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeforpublic/SQUID/c1a00f7d57e4f364968afd064faea838f3320cab/android/app/src/main/assets/thaialert.cer -------------------------------------------------------------------------------- /android/app/src/main/bg_geo-web.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeforpublic/SQUID/c1a00f7d57e4f364968afd064faea838f3320cab/android/app/src/main/bg_geo-web.png -------------------------------------------------------------------------------- /android/app/src/main/bg_geo_no_transparency-web.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeforpublic/SQUID/c1a00f7d57e4f364968afd064faea838f3320cab/android/app/src/main/bg_geo_no_transparency-web.png -------------------------------------------------------------------------------- /android/app/src/main/java/com/thaialert/app/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.thaialert.app; 2 | 3 | import com.facebook.react.ReactActivity; 4 | import org.devio.rn.splashscreen.SplashScreen; 5 | import android.os.Bundle; 6 | 7 | public class MainActivity extends ReactActivity { 8 | @Override 9 | protected void onCreate(Bundle savedInstanceState) { 10 | SplashScreen.show(this); 11 | super.onCreate(savedInstanceState); 12 | } 13 | /** 14 | * Returns the name of the main component registered from JavaScript. 15 | * This is used to schedule rendering of the component. 16 | */ 17 | @Override 18 | protected String getMainComponentName() { 19 | return "ThaiAlert"; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /android/app/src/main/java/com/thaialert/app/MainApplication.java: -------------------------------------------------------------------------------- 1 | package com.thaialert.app; 2 | 3 | import android.app.Application; 4 | import android.content.Context; 5 | import android.content.Intent; 6 | import android.os.Build; 7 | import android.os.StrictMode; 8 | 9 | import com.facebook.react.PackageList; 10 | import com.facebook.react.ReactApplication; 11 | import com.nuuneoi.lib.contacttracer.service.TracerService; 12 | import com.nuuneoi.lib.contacttracer.utils.ServiceUtils; 13 | import com.reactnativecommunity.imageeditor.ImageEditorPackage; 14 | import com.facebook.react.ReactNativeHost; 15 | import com.facebook.react.ReactPackage; 16 | import com.facebook.soloader.SoLoader; 17 | import com.microsoft.codepush.react.CodePush; 18 | 19 | import java.lang.reflect.InvocationTargetException; 20 | import java.util.List; 21 | 22 | public class MainApplication extends Application implements ReactApplication { 23 | 24 | private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) { 25 | @Override 26 | public boolean getUseDeveloperSupport() { 27 | return BuildConfig.DEBUG; 28 | } 29 | 30 | @Override 31 | protected String getJSBundleFile() { 32 | return CodePush.getJSBundleFile(); 33 | } 34 | 35 | @Override 36 | protected List getPackages() { 37 | @SuppressWarnings("UnnecessaryLocalVariable") 38 | List packages = new PackageList(this).getPackages(); 39 | // Packages that cannot be autolinked yet can be added manually here, for example: 40 | // packages.add(new ReactNativePushNotificationPackage()); 41 | return packages; 42 | } 43 | 44 | @Override 45 | protected String getJSMainModuleName() { 46 | return "index"; 47 | } 48 | }; 49 | 50 | @Override 51 | public ReactNativeHost getReactNativeHost() { 52 | return mReactNativeHost; 53 | } 54 | 55 | @Override 56 | public void onCreate() { 57 | // Strict mode. Should be disabled on RELEASE. 58 | /* 59 | StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder() 60 | .detectDiskReads() 61 | .detectDiskWrites() 62 | .detectAll() 63 | .penaltyLog() 64 | .build()); 65 | 66 | StrictMode.setVmPolicy(new StrictMode.VmPolicy.Builder() 67 | .detectLeakedSqlLiteObjects() 68 | .detectLeakedClosableObjects() 69 | .penaltyLog() 70 | .penaltyDeath() 71 | .build()); 72 | */ 73 | super.onCreate(); 74 | SoLoader.init(this, /* native exopackage */ false); 75 | 76 | boolean serviceEnabled = TracerService.isEnabled(getApplicationContext()); 77 | if (serviceEnabled) { 78 | ServiceUtils.startAdvertiserService(getApplicationContext()); 79 | } else { 80 | ServiceUtils.stopAdvertiserService(getApplicationContext()); 81 | } 82 | } 83 | 84 | 85 | } -------------------------------------------------------------------------------- /android/app/src/main/java/com/thaialert/app/SplashActivity.java: -------------------------------------------------------------------------------- 1 | package com.thaialert.app; 2 | 3 | import android.content.Intent; 4 | import android.os.Bundle; 5 | import androidx.appcompat.app.AppCompatActivity; 6 | 7 | public class SplashActivity extends AppCompatActivity { 8 | @Override 9 | protected void onCreate(Bundle savedInstanceState) { 10 | super.onCreate(savedInstanceState); 11 | 12 | Intent intent = new Intent(this, MainActivity.class); 13 | Bundle extras = getIntent().getExtras(); 14 | if (extras != null) { 15 | intent.putExtras(extras); 16 | } 17 | startActivity(intent); 18 | finish(); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-xhdpi/ic_contact_tracer_noti.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeforpublic/SQUID/c1a00f7d57e4f364968afd064faea838f3320cab/android/app/src/main/res/drawable-xhdpi/ic_contact_tracer_noti.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-xhdpi/ic_launcher_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeforpublic/SQUID/c1a00f7d57e4f364968afd064faea838f3320cab/android/app/src/main/res/drawable-xhdpi/ic_launcher_background.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-xxhdpi/ic_contact_tracer_noti.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeforpublic/SQUID/c1a00f7d57e4f364968afd064faea838f3320cab/android/app/src/main/res/drawable-xxhdpi/ic_contact_tracer_noti.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-xxhdpi/ic_launcher_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeforpublic/SQUID/c1a00f7d57e4f364968afd064faea838f3320cab/android/app/src/main/res/drawable-xxhdpi/ic_launcher_background.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/ic_launcher_foreground.xml: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | 15 | 18 | 21 | 22 | 23 | 24 | 30 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/splash_screen.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 11 | 12 | -------------------------------------------------------------------------------- /android/app/src/main/res/layout/launch_screen.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | -------------------------------------------------------------------------------- /android/app/src/main/res/layout/notification_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 17 | 18 | 24 | 25 | 34 | 35 | 36 | 43 | 44 | 51 | 52 | 58 | 59 |