├── .gitignore ├── LICENSE.md ├── README.md ├── angular.json ├── bin ├── actions.js ├── cli └── lib.js ├── config.xml ├── ionic.config.json ├── karma.conf.js ├── package-lock.json ├── package.json ├── resources ├── README.md ├── android │ ├── icon │ │ ├── drawable-hdpi-icon.png │ │ ├── drawable-ldpi-icon.png │ │ ├── drawable-mdpi-icon.png │ │ ├── drawable-xhdpi-icon.png │ │ ├── drawable-xxhdpi-icon.png │ │ └── drawable-xxxhdpi-icon.png │ ├── splash │ │ ├── drawable-land-hdpi-screen.png │ │ ├── drawable-land-ldpi-screen.png │ │ ├── drawable-land-mdpi-screen.png │ │ ├── drawable-land-xhdpi-screen.png │ │ ├── drawable-land-xxhdpi-screen.png │ │ ├── drawable-land-xxxhdpi-screen.png │ │ ├── drawable-port-hdpi-screen.png │ │ ├── drawable-port-ldpi-screen.png │ │ ├── drawable-port-mdpi-screen.png │ │ ├── drawable-port-xhdpi-screen.png │ │ ├── drawable-port-xxhdpi-screen.png │ │ └── drawable-port-xxxhdpi-screen.png │ └── xml │ │ └── network_security_config.xml ├── icon.png ├── ios │ ├── icon │ │ ├── Icon-40@3x.png │ │ ├── icon-1024.png │ │ ├── icon-108@2x.png │ │ ├── icon-20.png │ │ ├── icon-20@2x.png │ │ ├── icon-20@3x.png │ │ ├── icon-24@2x.png │ │ ├── icon-27.5@2x.png │ │ ├── icon-29.png │ │ ├── icon-29@2x.png │ │ ├── icon-29@3x.png │ │ ├── icon-40.png │ │ ├── icon-40@2x.png │ │ ├── icon-44@2x.png │ │ ├── icon-50.png │ │ ├── icon-50@2x.png │ │ ├── icon-60.png │ │ ├── icon-60@2x.png │ │ ├── icon-60@3x.png │ │ ├── icon-72.png │ │ ├── icon-72@2x.png │ │ ├── icon-76.png │ │ ├── icon-76@2x.png │ │ ├── icon-83.5@2x.png │ │ ├── icon-86@2x.png │ │ ├── icon-98@2x.png │ │ ├── icon-small.png │ │ ├── icon-small@2x.png │ │ ├── icon-small@3x.png │ │ ├── icon.png │ │ └── icon@2x.png │ └── splash │ │ ├── Default-1792h~iphone.png │ │ ├── Default-2436h.png │ │ ├── Default-2688h~iphone.png │ │ ├── Default-568h@2x~iphone.png │ │ ├── Default-667h.png │ │ ├── Default-736h.png │ │ ├── Default-Landscape-1792h~iphone.png │ │ ├── Default-Landscape-2436h.png │ │ ├── Default-Landscape-2688h~iphone.png │ │ ├── Default-Landscape-736h.png │ │ ├── Default-Landscape@2x~ipad.png │ │ ├── Default-Landscape@~ipadpro.png │ │ ├── Default-Landscape~ipad.png │ │ ├── Default-Portrait@2x~ipad.png │ │ ├── Default-Portrait@~ipadpro.png │ │ ├── Default-Portrait~ipad.png │ │ ├── Default@2x~iphone.png │ │ ├── Default@2x~universal~anyany.png │ │ └── Default~iphone.png └── splash.png ├── scripts ├── adb-install.sh ├── android-release.sh ├── build-ios ├── cycle-plugin.sh ├── link-framework.sh ├── logcat ├── pull-logback └── simulate-fetch.sh ├── src ├── android │ ├── BackgroundFetchHeadlessTask.java │ ├── BackgroundGeolocationHeadlessTask.java │ ├── build-extras.gradle │ ├── notification_layout.xml │ └── repositories.gradle ├── app │ ├── ENV.ts │ ├── advanced │ │ ├── advanced-routing.module.ts │ │ ├── advanced.module.ts │ │ ├── advanced.page.html │ │ ├── advanced.page.scss │ │ ├── advanced.page.spec.ts │ │ ├── advanced.page.ts │ │ ├── lib │ │ │ ├── BGService.ts │ │ │ ├── LongPress.ts │ │ │ ├── SettingsService.ts │ │ │ └── TestService.ts │ │ └── modals │ │ │ ├── about │ │ │ ├── about-routing.module.ts │ │ │ ├── about.module.ts │ │ │ ├── about.page.html │ │ │ ├── about.page.scss │ │ │ ├── about.page.spec.ts │ │ │ └── about.page.ts │ │ │ ├── geofence │ │ │ ├── geofence-routing.module.ts │ │ │ ├── geofence.module.ts │ │ │ ├── geofence.page.html │ │ │ ├── geofence.page.scss │ │ │ ├── geofence.page.spec.ts │ │ │ └── geofence.page.ts │ │ │ └── settings │ │ │ ├── settings-routing.module.ts │ │ │ ├── settings.module.ts │ │ │ ├── settings.page.html │ │ │ ├── settings.page.scss │ │ │ ├── settings.page.spec.ts │ │ │ └── settings.page.ts │ ├── app-routing.module.ts │ ├── app.component.html │ ├── app.component.scss │ ├── app.component.spec.ts │ ├── app.component.ts │ ├── app.module.ts │ ├── cordova-background-geolocation.ts │ ├── hello-world │ │ ├── hello-world-routing.module.ts │ │ ├── hello-world.module.ts │ │ ├── hello-world.page.html │ │ ├── hello-world.page.scss │ │ ├── hello-world.page.spec.ts │ │ └── hello-world.page.ts │ ├── home │ │ ├── home-routing.module.ts │ │ ├── home.module.ts │ │ ├── home.page.html │ │ ├── home.page.scss │ │ ├── home.page.spec.ts │ │ ├── home.page.ts │ │ └── registration │ │ │ ├── registration-routing.module.ts │ │ │ ├── registration.module.ts │ │ │ ├── registration.page.html │ │ │ ├── registration.page.scss │ │ │ ├── registration.page.spec.ts │ │ │ └── registration.page.ts │ └── lib │ │ ├── authorization.ts │ │ ├── colors.ts │ │ └── icon-map.ts ├── assets │ ├── icon │ │ └── favicon.png │ ├── imgs │ │ ├── logo.png │ │ └── transistor-logo.svg │ └── shapes.svg ├── environments │ ├── environment.local │ ├── environment.prod.ts │ └── environment.ts ├── global.scss ├── index.html ├── main.ts ├── polyfills.ts ├── test.ts ├── theme │ └── variables.scss └── zone-flags.ts ├── tsconfig.app.json ├── tsconfig.json └── tsconfig.spec.json /.gitignore: -------------------------------------------------------------------------------- 1 | # Specifies intentionally untracked files to ignore when using Git 2 | # http://git-scm.com/docs/gitignore 3 | 4 | # Ignore my keystore 5 | keystore 6 | 7 | *~ 8 | *.sw[mnpcod] 9 | .tmp 10 | *.tmp 11 | *.tmp.* 12 | UserInterfaceState.xcuserstate 13 | $RECYCLE.BIN/ 14 | 15 | *.log 16 | log.txt 17 | 18 | 19 | /.sourcemaps 20 | /.versions 21 | /coverage 22 | 23 | # Ionic 24 | /.ionic 25 | /www 26 | /platforms 27 | /plugins 28 | 29 | # Compiled output 30 | /dist 31 | /tmp 32 | /out-tsc 33 | /bazel-out 34 | 35 | # Node 36 | /node_modules 37 | npm-debug.log 38 | yarn-error.log 39 | 40 | # IDEs and editors 41 | .idea/ 42 | .project 43 | .classpath 44 | .c9/ 45 | *.launch 46 | .settings/ 47 | *.sublime-project 48 | *.sublime-workspace 49 | 50 | # Visual Studio Code 51 | .vscode/* 52 | !.vscode/settings.json 53 | !.vscode/tasks.json 54 | !.vscode/launch.json 55 | !.vscode/extensions.json 56 | .history/* 57 | 58 | 59 | # Miscellaneous 60 | /.angular 61 | /.angular/cache 62 | .sass-cache/ 63 | /connect.lock 64 | /coverage 65 | /libpeerconnection.log 66 | testem.log 67 | /typings 68 | 69 | # System files 70 | .DS_Store 71 | Thumbs.db 72 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 transistorsoft.com chris@transistorsoft.com 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 | # :large_blue_diamond: [Ionic 3] Cordova Background Geolocation — Demo 2 | 3 | [![Google Play](https://dl.dropboxusercontent.com/s/80rf906x0fheb26/google-play-icon.png?dl=1)](https://play.google.com/store/apps/details?id=com.transistorsoft.backgroundgeolocation.ionic2) 4 | 5 | Fully-featured [Ionic](http://ionicframework.com/)-based sample-application for [Cordova Background Geolocation](http://shop.transistorsoft.com/pages/cordova-background-geolocation-premium) 6 | 7 | ![Home](https://dl.dropboxusercontent.com/s/byaayezphkwn36h/home-framed-350.png?dl=1) 8 | ![Settings](https://dl.dropboxusercontent.com/s/8lvnpp0gowitagq/settings-framed-350.png?dl=1) 9 | 10 | ## :large_blue_diamond: Installation 11 | 12 | ### Step 1: Start by cloning this repo 13 | 14 | ```bash 15 | $ git clone https://github.com/transistorsoft/cordova-background-geolocation-SampleApp.git 16 | ``` 17 | 18 | ---------------------------------------------------------------------------- 19 | 20 | ### Step 2: Building and Running the Ionic 3 App 21 | 22 | ```bash 23 | $ npm install 24 | 25 | $ npm install -g cordova ionic # you should have ionic and cordova installed 26 | 27 | $ ionic cordova prepare android 28 | $ ionic cordova run android --device 29 | 30 | $ ionic cordova prepare ios 31 | $ ionic cordova run ios --emulator 32 | // opens a web console which receives all your locations 33 | $ npm run open 34 | ``` 35 | 36 | The quickest way to see the plugin in-action is to boot the **iOS** simulator and *simulate location* with *Freeway Drive*. 37 | 38 | The demo is composed of three separate and indpendant sub-applications implemented as Ionic page-modules. 39 | 40 | - [Hello World](./src/pages/hello-world/hello-world.ts) 41 | - [Simple Map](./src/pages/simple-map/simple-map.ts) 42 | - [Advanced](./src/pages/advanced) with complex settings screen and geofencing. 43 | 44 | ![](https://dl.dropboxusercontent.com/s/w87uylrgij9kd7r/ionic-demo-home.png?dl=1) 45 | 46 | ## :large_blue_diamond: Tracking Server 47 | 48 | The demo app is configured to post locations to Transistor Software's demo server, which hosts a web-application for visualizing and filtering your tracking on a map. 49 | 50 | - After booting the app the first time, you'll be asked to enter a **unique** "Organization" (eg: your company name) and "Device ID" (eg: Github username) so the plugin can post locations to `tracker.transistorsoft.com`. 51 | 52 | :warning: Make your organization and Device ID **unique** and known only to *you* — if every one uses *"test"*, you'll never find your device!) 53 | 54 | ![](https://dl.dropboxusercontent.com/s/yhb311q5shxri36/ionic-demo-username.png?dl=1) 55 | 56 | - You can view the plugin's tracking history by visiting [http://tracker.transistorsoft.com/your-organization-name](http://tracker.transistorsoft.com/your-organization-name). 57 | 58 | ![](https://dl.dropboxusercontent.com/s/1a4far51w70rjvj/Screenshot%202017-08-16%2011.34.43.png?dl=1) 59 | 60 | ## :large_blue_diamond: Debug Mode 61 | 62 | The plugin has a `debug` mode for field-testing. The plugin will emit sounds during its life-cycle events: 63 | 64 | | Event | iOS | Android | 65 | |-------|-----|---------| 66 | | Exit stationary-region | Dee-do Dee-do...Dee-do Dee-do | n/a | 67 | | Location recorded | SMS-sent sound | "blip" | 68 | | Aggressive geolocation engaged | SIRI listening sound | "doodly-doo" | 69 | | Acquiring location | "tick, tick, tick" | dial-tone sound | 70 | | Stationary state | "bloom" | long "beeeeeeep" | 71 | | Geofence crossing | trumpets/fanfare | beep-beep-beep | 72 | 73 | **NOTE:** In order for debug sounds to operate *when the app is in background*, you must enable the `Audio and Airplay` **Background Mode**. 74 | 75 | ![](https://dl.dropboxusercontent.com/s/fl7exx3g8whot9f/enable-background-audio.png?dl=1) 76 | 77 | ## :large_blue_diamond: Adding Geofences 78 | 79 | The **Advanced** app implements a **longtap** event on the map. Simply **tap & hold** the map to initiate adding a geofence. 80 | 81 | ![Tap-hold to add geofence](https://dl.dropboxusercontent.com/s/vpyc1fr66q4sixy/screenshot-add-geofence.png?dl=1) 82 | 83 | Enter an `identifier`, `radius`, `notifyOnExit`, `notifyOnEntry`. 84 | 85 | 86 | -------------------------------------------------------------------------------- /angular.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "./node_modules/@angular/cli/lib/config/schema.json", 3 | "version": 1, 4 | "newProjectRoot": "projects", 5 | "projects": { 6 | "app": { 7 | "projectType": "application", 8 | "schematics": { 9 | "@ionic/angular-toolkit:page": { 10 | "styleext": "scss", 11 | "standalone": true 12 | } 13 | }, 14 | "root": "", 15 | "sourceRoot": "src", 16 | "prefix": "app", 17 | "architect": { 18 | "build": { 19 | "builder": "@angular-devkit/build-angular:browser", 20 | "options": { 21 | "outputPath": "www", 22 | "index": "src/index.html", 23 | "main": "src/main.ts", 24 | "polyfills": "src/polyfills.ts", 25 | "tsConfig": "tsconfig.app.json", 26 | "inlineStyleLanguage": "scss", 27 | "assets": [ 28 | { 29 | "glob": "**/*", 30 | "input": "src/assets", 31 | "output": "assets" 32 | }, 33 | { 34 | "glob": "**/*.svg", 35 | "input": "node_modules/ionicons/dist/ionicons/svg", 36 | "output": "./svg" 37 | } 38 | ], 39 | "styles": [ 40 | "src/theme/variables.scss", 41 | "src/global.scss" 42 | ], 43 | "scripts": [] 44 | }, 45 | "configurations": { 46 | "production": { 47 | "budgets": [ 48 | { 49 | "type": "initial", 50 | "maximumWarning": "2mb", 51 | "maximumError": "5mb" 52 | }, 53 | { 54 | "type": "anyComponentStyle", 55 | "maximumWarning": "2kb", 56 | "maximumError": "4kb" 57 | } 58 | ], 59 | "fileReplacements": [ 60 | { 61 | "replace": "src/environments/environment.ts", 62 | "with": "src/environments/environment.prod.ts" 63 | } 64 | ], 65 | "outputHashing": "all" 66 | }, 67 | "development": { 68 | "buildOptimizer": false, 69 | "optimization": false, 70 | "vendorChunk": true, 71 | "extractLicenses": false, 72 | "sourceMap": true, 73 | "namedChunks": true 74 | }, 75 | "ci": { 76 | "progress": false 77 | } 78 | }, 79 | "defaultConfiguration": "production" 80 | }, 81 | "serve": { 82 | "builder": "@angular-devkit/build-angular:dev-server", 83 | "configurations": { 84 | "production": { 85 | "browserTarget": "app:build:production" 86 | }, 87 | "development": { 88 | "browserTarget": "app:build:development" 89 | }, 90 | "ci": { 91 | "progress": false 92 | } 93 | }, 94 | "defaultConfiguration": "development" 95 | }, 96 | "extract-i18n": { 97 | "builder": "@angular-devkit/build-angular:extract-i18n", 98 | "options": { 99 | "browserTarget": "app:build" 100 | } 101 | }, 102 | "test": { 103 | "builder": "@angular-devkit/build-angular:karma", 104 | "options": { 105 | "main": "src/test.ts", 106 | "polyfills": "src/polyfills.ts", 107 | "tsConfig": "tsconfig.spec.json", 108 | "karmaConfig": "karma.conf.js", 109 | "inlineStyleLanguage": "scss", 110 | "assets": [ 111 | { 112 | "glob": "**/*", 113 | "input": "src/assets", 114 | "output": "assets" 115 | }, 116 | { 117 | "glob": "**/*.svg", 118 | "input": "node_modules/ionicons/dist/ionicons/svg", 119 | "output": "./svg" 120 | } 121 | ], 122 | "styles": [ 123 | "src/theme/variables.scss", 124 | "src/global.scss" 125 | ], 126 | "scripts": [] 127 | }, 128 | "configurations": { 129 | "ci": { 130 | "progress": false, 131 | "watch": false 132 | } 133 | } 134 | }, 135 | "lint": { 136 | "builder": "@angular-eslint/builder:lint", 137 | "options": { 138 | "lintFilePatterns": [ 139 | "src/**/*.ts", 140 | "src/**/*.html" 141 | ] 142 | } 143 | }, 144 | "ionic-cordova-serve": { 145 | "builder": "@ionic/cordova-builders:cordova-serve", 146 | "options": { 147 | "cordovaBuildTarget": "app:ionic-cordova-build", 148 | "devServerTarget": "app:serve" 149 | }, 150 | "configurations": { 151 | "production": { 152 | "cordovaBuildTarget": "app:ionic-cordova-build:production", 153 | "devServerTarget": "app:serve:production" 154 | } 155 | } 156 | }, 157 | "ionic-cordova-build": { 158 | "builder": "@ionic/cordova-builders:cordova-build", 159 | "options": { 160 | "browserTarget": "app:build" 161 | }, 162 | "configurations": { 163 | "production": { 164 | "browserTarget": "app:build:production" 165 | } 166 | } 167 | } 168 | } 169 | } 170 | }, 171 | "cli": { 172 | "schematicCollections": [ 173 | "@ionic/angular-toolkit" 174 | ], 175 | "analytics": false 176 | }, 177 | "schematics": { 178 | "@ionic/angular-toolkit:component": { 179 | "styleext": "scss" 180 | }, 181 | "@ionic/angular-toolkit:page": { 182 | "styleext": "scss" 183 | }, 184 | "@angular-eslint/schematics:application": { 185 | "setParserOptionsProject": true 186 | }, 187 | "@angular-eslint/schematics:library": { 188 | "setParserOptionsProject": true 189 | } 190 | } 191 | } -------------------------------------------------------------------------------- /bin/actions.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const fs = require("fs"); 4 | const path = require('path'); 5 | const { spawn } = require("child_process"); 6 | 7 | const YELLOW = '\x1b[33m%s\x1b[0m'; 8 | const GREEN = '\x1b[32m'; 9 | const COLOR_RESET = "\x1b[0m"; 10 | 11 | const MODULE_NAME = "cordova-background-geolocation"; 12 | const NODE_MODULES = path.join('.', 'node_modules'); 13 | 14 | const PRIVATE_MODULE_PATH = path.join(NODE_MODULES, MODULE_NAME); 15 | const PUBLIC_MODULE_PATH = PRIVATE_MODULE_PATH + "-lt"; 16 | 17 | const COMMAND_LINK = 'link'; 18 | const COMMAND_REINSTALL = 'reinstall'; 19 | 20 | const MENU = {}; 21 | 22 | function registerCommand(name, description, handler) { 23 | MENU[name] = { 24 | description: description, 25 | handler: handler 26 | }; 27 | } 28 | 29 | /// ACTION: link 30 | registerCommand(COMMAND_LINK, 'Symlink TSLocationManager.xcframework, tslocationmanager.aar', function() { 31 | link(); 32 | }); 33 | 34 | /// ACTION: reinstall 35 | /// 36 | registerCommand(COMMAND_REINSTALL, 'Re-install the currently installed background-geolocation plugin', function() { 37 | reinstall(); 38 | }); 39 | 40 | /// Symlink the [iOS] TSLocationManager.framework [Android] tslocationmanager.aar 41 | /// 42 | async function link() { 43 | const fs = require("fs"); 44 | const path = require('path'); 45 | const rimraf = require("rimraf"); 46 | 47 | const SRC_ROOT = path.join('/Users/chris/workspace/background-geolocation/cordova'); 48 | const SRC_MODULE = path.join(SRC_ROOT, MODULE_NAME); 49 | 50 | const ANDROID_LIBS_DIR = path.join("libs", "com", "transistorsoft", "tslocationmanager"); 51 | const IOS_LIBS_DIR = "TSLocationManager.xcframework"; 52 | 53 | var iosLibsPath = ''; 54 | if (fs.existsSync(PUBLIC_MODULE_PATH)) { 55 | iosLibsPath = path.join("platforms", "ios", "BG\ Geo", "Plugins", MODULE_NAME + "-lt"); 56 | } else if (fs.existsSync(PRIVATE_MODULE_PATH)) { 57 | iosLibsPath = path.join("platforms", "ios", "BG\ Geo", "Plugins", MODULE_NAME); 58 | } else { 59 | console.error('ERROR: Failed to find ', MODULE_NAME); 60 | return -1; 61 | } 62 | iosLibsPath = path.join(iosLibsPath, IOS_LIBS_DIR); 63 | 64 | var androidLibsPath = path.join('platforms', 'android', 'app', ANDROID_LIBS_DIR); 65 | var androidLibsPathReverse = androidLibsPath + "-reverse"; 66 | 67 | // Destroy / unlink existing libs. 68 | [androidLibsPath, androidLibsPathReverse, iosLibsPath].forEach(function(libs) { 69 | console.log('[dir]', libs); 70 | if (fs.existsSync(libs)) { 71 | var stats = fs.lstatSync(libs); 72 | console.log('- symlink?', stats.isSymbolicLink(), 'dir?', stats.isDirectory()); 73 | if (stats.isSymbolicLink()) { 74 | fs.unlinkSync(libs); 75 | } else if (stats.isDirectory()) { 76 | rimraf.sync(libs); 77 | } 78 | } else { 79 | console.log('- Folder not found'); 80 | } 81 | }); 82 | 83 | 84 | // Symlink tslocationmanager.aar -> src project. 85 | var src = path.join(SRC_MODULE, "src", "android", ANDROID_LIBS_DIR); 86 | 87 | fs.symlinkSync(src, androidLibsPath); 88 | fs.symlinkSync(src + "-reverse", androidLibsPathReverse); 89 | 90 | // Symlink TSLocationManager.framework -> src project. 91 | src = path.join(SRC_MODULE, "src", "ios", IOS_LIBS_DIR); 92 | fs.symlinkSync(src, iosLibsPath); 93 | } 94 | 95 | /// Re-install the currently installed plugin 96 | /// 97 | async function reinstall() { 98 | var pluginName = null; 99 | if (fs.existsSync(PUBLIC_MODULE_PATH)) { 100 | pluginName += "-lt"; 101 | } else if (fs.existsSync(PRIVATE_MODULE_PATH)) { 102 | pluginName = MODULE_NAME; 103 | } 104 | if (pluginName) { 105 | try { 106 | await remove(pluginName); 107 | } catch (error) { 108 | console.error(YELLOW, error); 109 | } 110 | } else { 111 | pluginName = MODULE_NAME; 112 | } 113 | try { 114 | await add(pluginName); 115 | } catch(error) { 116 | console.error(YELLOW, error); 117 | } 118 | } 119 | 120 | /// Remove plugin 121 | /// 122 | function remove(pluginName) { 123 | return new Promise(function(resolve, reject) { 124 | console.log('- remove:', pluginName); 125 | 126 | const ls = spawn("cordova", ["plugin", "remove", pluginName]); 127 | 128 | ls.stdout.on("data", data => { 129 | console.log(GREEN, data.toString()); 130 | }); 131 | 132 | ls.stderr.on("data", data => { 133 | console.log(YELLOW, data.toString()); 134 | }); 135 | 136 | ls.on('error', (error) => { 137 | console.log(YELLOW, error.message); 138 | }); 139 | 140 | ls.on("close", code => { 141 | console.log(`child process exited with code ${code}`); 142 | if (code == 0) { 143 | resolve(code); 144 | } else { 145 | reject(code); 146 | } 147 | }); 148 | }); 149 | } 150 | 151 | /** 152 | * Add the plugins 153 | */ 154 | function add(pluginName) { 155 | return new Promise(function(resolve, reject) { 156 | console.log('- add:', pluginName); 157 | 158 | const ls = spawn("ionic", ["cordova", "plugin", "add", path.join('..', pluginName)]); 159 | 160 | ls.stdout.on("data", data => { 161 | console.log(GREEN, data.toString()); 162 | }); 163 | 164 | ls.stderr.on("data", data => { 165 | console.log(YELLOW, data.toString()); 166 | }); 167 | 168 | ls.on('error', (error) => { 169 | console.log(YELLOW, error.message); 170 | }); 171 | 172 | ls.on("close", code => { 173 | console.log(`child process exited with code ${code}`); 174 | if (code == 0) { 175 | resolve(code); 176 | } else { 177 | reject(code); 178 | } 179 | }); 180 | }) 181 | } 182 | 183 | module.exports = { 184 | actions: MENU 185 | }; 186 | 187 | -------------------------------------------------------------------------------- /bin/cli: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | 'use strict'; 4 | 5 | const {CLIError} = require('./lib'); 6 | 7 | const {actions} = require('./actions'); 8 | const chalk = require('chalk'); 9 | 10 | const COMMAND_HELP = 'help'; 11 | 12 | var args = process.argv.slice(2); 13 | var cmd = args.shift(); 14 | 15 | console.log(chalk.green("+-----------------------------------------")); 16 | console.log(chalk.green(`| [Transitorsoft Demo CLI] cmd: ${cmd}`)); 17 | console.log(chalk.green("+-----------------------------------------")); 18 | 19 | // Launch Command interpretor 20 | const CLI = (function() { 21 | return { 22 | init: function() { 23 | try { 24 | if (cmd === undefined) { 25 | cmd = COMMAND_HELP; 26 | } 27 | if (cmd === COMMAND_HELP) { 28 | printMenu(actions); 29 | return; 30 | } else if (actions[cmd] === undefined) { 31 | console.log(chalk.red("Unknown command:", cmd)); 32 | printMenu(actions); 33 | return; 34 | } 35 | 36 | actions[cmd].handler(args); 37 | 38 | } catch(error) { 39 | if (error instanceof CLIError) { 40 | console.log(chalk.red(`[error]: ${cmd}:`), error.message, '\n'); 41 | } else { 42 | throw error; 43 | } 44 | } 45 | } 46 | } 47 | })().init(); 48 | 49 | function printMenu(menu) { 50 | console.log('Available commands:'); 51 | var table = [{ 52 | command: COMMAND_HELP, 53 | description: 'Print this menu' 54 | }]; 55 | for (var action in menu) { 56 | //table[action] = ACTIONS[action].description; 57 | table.push({ 58 | command: action, 59 | description: menu[action].description 60 | }); 61 | } 62 | console.table(table, ['command', 'description']); 63 | } 64 | 65 | -------------------------------------------------------------------------------- /bin/lib.js: -------------------------------------------------------------------------------- 1 | const { exec, spawn} = require('child_process'); 2 | const chalk = require('chalk'); 3 | 4 | class CLIError extends Error {}; 5 | 6 | /** 7 | * Custom exec implemention with Promise 8 | * @return Promise 9 | */ 10 | function _exec(cmd, args) { 11 | 12 | } 13 | 14 | /** 15 | * Custom spawn implementation with Promise 16 | * @return Promise 17 | */ 18 | function _spawn(cmd, args=[]) { 19 | var message = cmd; 20 | args.forEach(function(arg) { message += ` ${arg}` }); 21 | 22 | console.log(chalk.yellow(`$ ${message}`)); 23 | 24 | return new Promise(function(resolve, reject) { 25 | 26 | const child = spawn(cmd, args, {shell: true, stdio: 'inherit'}); 27 | child.on('error', (chunk) => { 28 | console.log('error: ', chunk); 29 | }); 30 | 31 | child.on('close', (code) => { 32 | console.log(chalk.yellow(`child process exited with code ${code}`)); 33 | if (code == 0) { 34 | resolve(code); 35 | } else { 36 | reject(code); 37 | } 38 | }); 39 | }); 40 | } 41 | 42 | module.exports = { 43 | CLIError, 44 | exec: _exec, 45 | spawn: _spawn 46 | }; -------------------------------------------------------------------------------- /config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | BG Geo 4 | Cordova Background Geolocation Demo App. 5 | Ionic Framework Team 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | NSLocationTemporaryUsageDescriptionDictionary 61 | 62 | DemoPurpose 63 | CHANGEME: provide high accuracy location-tracking 64 | 65 | 66 | 67 | 68 | com.transistorsoft.customtask 69 | 70 | 71 | 72 | LOCATION_ALWAYS_AND_WHEN_IN_USE_USAGE_DESCRIPTION 73 | 74 | 75 | LOCATION_ALWAYS_USAGE_DESCRIPTION 76 | 77 | 78 | LOCATION_WHEN_IN_USE_USAGE_DESCRIPTION 79 | 80 | 81 | MOTION_USAGE_DESCRIPTION 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | -------------------------------------------------------------------------------- /ionic.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "BGGeo", 3 | "integrations": { 4 | "cordova": {} 5 | }, 6 | "type": "angular-standalone" 7 | } 8 | -------------------------------------------------------------------------------- /karma.conf.js: -------------------------------------------------------------------------------- 1 | // Karma configuration file, see link for more information 2 | // https://karma-runner.github.io/1.0/config/configuration-file.html 3 | 4 | module.exports = function (config) { 5 | config.set({ 6 | basePath: '', 7 | frameworks: ['jasmine', '@angular-devkit/build-angular'], 8 | plugins: [ 9 | require('karma-jasmine'), 10 | require('karma-chrome-launcher'), 11 | require('karma-jasmine-html-reporter'), 12 | require('karma-coverage'), 13 | require('@angular-devkit/build-angular/plugins/karma') 14 | ], 15 | client: { 16 | jasmine: { 17 | // you can add configuration options for Jasmine here 18 | // the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html 19 | // for example, you can disable the random execution with `random: false` 20 | // or set a specific seed with `seed: 4321` 21 | }, 22 | clearContext: false // leave Jasmine Spec Runner output visible in browser 23 | }, 24 | jasmineHtmlReporter: { 25 | suppressAll: true // removes the duplicated traces 26 | }, 27 | coverageReporter: { 28 | dir: require('path').join(__dirname, './coverage/app'), 29 | subdir: '.', 30 | reporters: [ 31 | { type: 'html' }, 32 | { type: 'text-summary' } 33 | ] 34 | }, 35 | reporters: ['progress', 'kjhtml'], 36 | port: 9876, 37 | colors: true, 38 | logLevel: config.LOG_INFO, 39 | autoWatch: true, 40 | browsers: ['Chrome'], 41 | singleRun: false, 42 | restartOnFileChange: true 43 | }); 44 | }; 45 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "cordova-background-geolocation-SampleApp", 3 | "description": "An Ionic project", 4 | "version": "3.9.2", 5 | "author": "Transistor Software", 6 | "homepage": "https://www.transistorsoft.com", 7 | "repository": { 8 | "type": "git", 9 | "url": "git+https://github.com/transistorsoft/cordova-background-geolocation-SampleApp.git" 10 | }, 11 | "license": "MIT", 12 | "readme": "https://github.com/transistorsoft/cordova-background-geolocation-SampleApp", 13 | "scripts": { 14 | "ng": "ng", 15 | "start": "ng serve", 16 | "build": "ng build", 17 | "watch": "ng build --watch --configuration development", 18 | "test": "ng test", 19 | "lint": "ng lint" 20 | }, 21 | "private": true, 22 | "dependencies": { 23 | "@angular/animations": "^16.0.0", 24 | "@angular/common": "^16.0.0", 25 | "@angular/compiler": "^16.0.0", 26 | "@angular/core": "^16.0.0", 27 | "@angular/forms": "^16.0.0", 28 | "@angular/platform-browser": "^16.0.0", 29 | "@angular/platform-browser-dynamic": "^16.0.0", 30 | "@angular/router": "^16.0.0", 31 | "@ionic/angular": "^7.0.0", 32 | "@ionic/cordova-builders": "^10.0.0", 33 | "ionicons": "^7.0.0", 34 | "rxjs": "~7.8.0", 35 | "tslib": "^2.3.0", 36 | "zone.js": "~0.13.0" 37 | }, 38 | "devDependencies": { 39 | "@angular-devkit/build-angular": "^16.0.0", 40 | "@angular-eslint/builder": "^16.0.0", 41 | "@angular-eslint/eslint-plugin": "^16.0.0", 42 | "@angular-eslint/eslint-plugin-template": "^16.0.0", 43 | "@angular-eslint/schematics": "^16.0.0", 44 | "@angular-eslint/template-parser": "^16.0.0", 45 | "@angular/cli": "^16.0.0", 46 | "@angular/compiler": "^16.0.0", 47 | "@angular/compiler-cli": "^16.0.0", 48 | "@angular/language-service": "^16.0.0", 49 | "@ionic/angular-toolkit": "^9.0.0", 50 | "@types/jasmine": "~4.3.0", 51 | "@types/node": "^12.11.1", 52 | "@typescript-eslint/eslint-plugin": "5.3.0", 53 | "@typescript-eslint/parser": "5.3.0", 54 | "cordova-android": "^12.0.1", 55 | "cordova-background-geolocation-lt": "^4.15.0", 56 | "cordova-ios": "^7.0.1", 57 | "cordova-plugin-background-fetch": "~7.2.1", 58 | "cordova-plugin-device": "2.0.2", 59 | "cordova-plugin-ionic-keyboard": "^2.0.5", 60 | "cordova-plugin-ionic-webview": "^5.0.0", 61 | "cordova-plugin-splashscreen": "5.0.2", 62 | "cordova-plugin-statusbar": "^2.4.2", 63 | "eslint": "^7.26.0", 64 | "eslint-plugin-import": "2.22.1", 65 | "eslint-plugin-jsdoc": "30.7.6", 66 | "eslint-plugin-prefer-arrow": "1.2.2", 67 | "jasmine-core": "~4.6.0", 68 | "jasmine-spec-reporter": "~5.0.0", 69 | "karma": "~6.4.0", 70 | "karma-chrome-launcher": "~3.2.0", 71 | "karma-coverage": "~2.2.0", 72 | "karma-coverage-istanbul-reporter": "~3.0.2", 73 | "karma-jasmine": "~5.1.0", 74 | "karma-jasmine-html-reporter": "~2.0.0", 75 | "ts-node": "^8.3.0", 76 | "typescript": "~5.0.2" 77 | }, 78 | "cordova": { 79 | "plugins": { 80 | "cordova-plugin-statusbar": {}, 81 | "cordova-plugin-device": {}, 82 | "cordova-plugin-splashscreen": {}, 83 | "cordova-plugin-ionic-webview": {}, 84 | "cordova-plugin-ionic-keyboard": {}, 85 | "cordova-background-geolocation-lt": { 86 | "GOOGLE_API_VERSION": "20.+", 87 | "HMS_LOCATION_VERSION": "6.9.0.300", 88 | "OKHTTP_VERSION": "3.12.+", 89 | "EVENTBUS_VERSION": "3.3.1", 90 | "BACKGROUND_MODE_LOCATION": "location" 91 | } 92 | }, 93 | "platforms": [ 94 | "android", 95 | "ios" 96 | ] 97 | } 98 | } -------------------------------------------------------------------------------- /resources/README.md: -------------------------------------------------------------------------------- 1 | These are Cordova resources. You can replace icon.png and splash.png and run 2 | `ionic cordova resources` to generate custom icons and splash screens for your 3 | app. See `ionic cordova resources --help` for details. 4 | 5 | Cordova reference documentation: 6 | 7 | - Icons: https://cordova.apache.org/docs/en/latest/config_ref/images.html 8 | - Splash Screens: https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-splashscreen/ 9 | -------------------------------------------------------------------------------- /resources/android/icon/drawable-hdpi-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/transistorsoft/cordova-background-geolocation-SampleApp/a5ac8fb82d3e35c7e10d20c448866bfe094df349/resources/android/icon/drawable-hdpi-icon.png -------------------------------------------------------------------------------- /resources/android/icon/drawable-ldpi-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/transistorsoft/cordova-background-geolocation-SampleApp/a5ac8fb82d3e35c7e10d20c448866bfe094df349/resources/android/icon/drawable-ldpi-icon.png -------------------------------------------------------------------------------- /resources/android/icon/drawable-mdpi-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/transistorsoft/cordova-background-geolocation-SampleApp/a5ac8fb82d3e35c7e10d20c448866bfe094df349/resources/android/icon/drawable-mdpi-icon.png -------------------------------------------------------------------------------- /resources/android/icon/drawable-xhdpi-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/transistorsoft/cordova-background-geolocation-SampleApp/a5ac8fb82d3e35c7e10d20c448866bfe094df349/resources/android/icon/drawable-xhdpi-icon.png -------------------------------------------------------------------------------- /resources/android/icon/drawable-xxhdpi-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/transistorsoft/cordova-background-geolocation-SampleApp/a5ac8fb82d3e35c7e10d20c448866bfe094df349/resources/android/icon/drawable-xxhdpi-icon.png -------------------------------------------------------------------------------- /resources/android/icon/drawable-xxxhdpi-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/transistorsoft/cordova-background-geolocation-SampleApp/a5ac8fb82d3e35c7e10d20c448866bfe094df349/resources/android/icon/drawable-xxxhdpi-icon.png -------------------------------------------------------------------------------- /resources/android/splash/drawable-land-hdpi-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/transistorsoft/cordova-background-geolocation-SampleApp/a5ac8fb82d3e35c7e10d20c448866bfe094df349/resources/android/splash/drawable-land-hdpi-screen.png -------------------------------------------------------------------------------- /resources/android/splash/drawable-land-ldpi-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/transistorsoft/cordova-background-geolocation-SampleApp/a5ac8fb82d3e35c7e10d20c448866bfe094df349/resources/android/splash/drawable-land-ldpi-screen.png -------------------------------------------------------------------------------- /resources/android/splash/drawable-land-mdpi-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/transistorsoft/cordova-background-geolocation-SampleApp/a5ac8fb82d3e35c7e10d20c448866bfe094df349/resources/android/splash/drawable-land-mdpi-screen.png -------------------------------------------------------------------------------- /resources/android/splash/drawable-land-xhdpi-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/transistorsoft/cordova-background-geolocation-SampleApp/a5ac8fb82d3e35c7e10d20c448866bfe094df349/resources/android/splash/drawable-land-xhdpi-screen.png -------------------------------------------------------------------------------- /resources/android/splash/drawable-land-xxhdpi-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/transistorsoft/cordova-background-geolocation-SampleApp/a5ac8fb82d3e35c7e10d20c448866bfe094df349/resources/android/splash/drawable-land-xxhdpi-screen.png -------------------------------------------------------------------------------- /resources/android/splash/drawable-land-xxxhdpi-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/transistorsoft/cordova-background-geolocation-SampleApp/a5ac8fb82d3e35c7e10d20c448866bfe094df349/resources/android/splash/drawable-land-xxxhdpi-screen.png -------------------------------------------------------------------------------- /resources/android/splash/drawable-port-hdpi-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/transistorsoft/cordova-background-geolocation-SampleApp/a5ac8fb82d3e35c7e10d20c448866bfe094df349/resources/android/splash/drawable-port-hdpi-screen.png -------------------------------------------------------------------------------- /resources/android/splash/drawable-port-ldpi-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/transistorsoft/cordova-background-geolocation-SampleApp/a5ac8fb82d3e35c7e10d20c448866bfe094df349/resources/android/splash/drawable-port-ldpi-screen.png -------------------------------------------------------------------------------- /resources/android/splash/drawable-port-mdpi-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/transistorsoft/cordova-background-geolocation-SampleApp/a5ac8fb82d3e35c7e10d20c448866bfe094df349/resources/android/splash/drawable-port-mdpi-screen.png -------------------------------------------------------------------------------- /resources/android/splash/drawable-port-xhdpi-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/transistorsoft/cordova-background-geolocation-SampleApp/a5ac8fb82d3e35c7e10d20c448866bfe094df349/resources/android/splash/drawable-port-xhdpi-screen.png -------------------------------------------------------------------------------- /resources/android/splash/drawable-port-xxhdpi-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/transistorsoft/cordova-background-geolocation-SampleApp/a5ac8fb82d3e35c7e10d20c448866bfe094df349/resources/android/splash/drawable-port-xxhdpi-screen.png -------------------------------------------------------------------------------- /resources/android/splash/drawable-port-xxxhdpi-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/transistorsoft/cordova-background-geolocation-SampleApp/a5ac8fb82d3e35c7e10d20c448866bfe094df349/resources/android/splash/drawable-port-xxxhdpi-screen.png -------------------------------------------------------------------------------- /resources/android/xml/network_security_config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | localhost 5 | 6 | 7 | tracker.transistorsoft.com 8 | 9 | 10 | -------------------------------------------------------------------------------- /resources/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/transistorsoft/cordova-background-geolocation-SampleApp/a5ac8fb82d3e35c7e10d20c448866bfe094df349/resources/icon.png -------------------------------------------------------------------------------- /resources/ios/icon/Icon-40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/transistorsoft/cordova-background-geolocation-SampleApp/a5ac8fb82d3e35c7e10d20c448866bfe094df349/resources/ios/icon/Icon-40@3x.png -------------------------------------------------------------------------------- /resources/ios/icon/icon-1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/transistorsoft/cordova-background-geolocation-SampleApp/a5ac8fb82d3e35c7e10d20c448866bfe094df349/resources/ios/icon/icon-1024.png -------------------------------------------------------------------------------- /resources/ios/icon/icon-108@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/transistorsoft/cordova-background-geolocation-SampleApp/a5ac8fb82d3e35c7e10d20c448866bfe094df349/resources/ios/icon/icon-108@2x.png -------------------------------------------------------------------------------- /resources/ios/icon/icon-20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/transistorsoft/cordova-background-geolocation-SampleApp/a5ac8fb82d3e35c7e10d20c448866bfe094df349/resources/ios/icon/icon-20.png -------------------------------------------------------------------------------- /resources/ios/icon/icon-20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/transistorsoft/cordova-background-geolocation-SampleApp/a5ac8fb82d3e35c7e10d20c448866bfe094df349/resources/ios/icon/icon-20@2x.png -------------------------------------------------------------------------------- /resources/ios/icon/icon-20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/transistorsoft/cordova-background-geolocation-SampleApp/a5ac8fb82d3e35c7e10d20c448866bfe094df349/resources/ios/icon/icon-20@3x.png -------------------------------------------------------------------------------- /resources/ios/icon/icon-24@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/transistorsoft/cordova-background-geolocation-SampleApp/a5ac8fb82d3e35c7e10d20c448866bfe094df349/resources/ios/icon/icon-24@2x.png -------------------------------------------------------------------------------- /resources/ios/icon/icon-27.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/transistorsoft/cordova-background-geolocation-SampleApp/a5ac8fb82d3e35c7e10d20c448866bfe094df349/resources/ios/icon/icon-27.5@2x.png -------------------------------------------------------------------------------- /resources/ios/icon/icon-29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/transistorsoft/cordova-background-geolocation-SampleApp/a5ac8fb82d3e35c7e10d20c448866bfe094df349/resources/ios/icon/icon-29.png -------------------------------------------------------------------------------- /resources/ios/icon/icon-29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/transistorsoft/cordova-background-geolocation-SampleApp/a5ac8fb82d3e35c7e10d20c448866bfe094df349/resources/ios/icon/icon-29@2x.png -------------------------------------------------------------------------------- /resources/ios/icon/icon-29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/transistorsoft/cordova-background-geolocation-SampleApp/a5ac8fb82d3e35c7e10d20c448866bfe094df349/resources/ios/icon/icon-29@3x.png -------------------------------------------------------------------------------- /resources/ios/icon/icon-40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/transistorsoft/cordova-background-geolocation-SampleApp/a5ac8fb82d3e35c7e10d20c448866bfe094df349/resources/ios/icon/icon-40.png -------------------------------------------------------------------------------- /resources/ios/icon/icon-40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/transistorsoft/cordova-background-geolocation-SampleApp/a5ac8fb82d3e35c7e10d20c448866bfe094df349/resources/ios/icon/icon-40@2x.png -------------------------------------------------------------------------------- /resources/ios/icon/icon-44@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/transistorsoft/cordova-background-geolocation-SampleApp/a5ac8fb82d3e35c7e10d20c448866bfe094df349/resources/ios/icon/icon-44@2x.png -------------------------------------------------------------------------------- /resources/ios/icon/icon-50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/transistorsoft/cordova-background-geolocation-SampleApp/a5ac8fb82d3e35c7e10d20c448866bfe094df349/resources/ios/icon/icon-50.png -------------------------------------------------------------------------------- /resources/ios/icon/icon-50@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/transistorsoft/cordova-background-geolocation-SampleApp/a5ac8fb82d3e35c7e10d20c448866bfe094df349/resources/ios/icon/icon-50@2x.png -------------------------------------------------------------------------------- /resources/ios/icon/icon-60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/transistorsoft/cordova-background-geolocation-SampleApp/a5ac8fb82d3e35c7e10d20c448866bfe094df349/resources/ios/icon/icon-60.png -------------------------------------------------------------------------------- /resources/ios/icon/icon-60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/transistorsoft/cordova-background-geolocation-SampleApp/a5ac8fb82d3e35c7e10d20c448866bfe094df349/resources/ios/icon/icon-60@2x.png -------------------------------------------------------------------------------- /resources/ios/icon/icon-60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/transistorsoft/cordova-background-geolocation-SampleApp/a5ac8fb82d3e35c7e10d20c448866bfe094df349/resources/ios/icon/icon-60@3x.png -------------------------------------------------------------------------------- /resources/ios/icon/icon-72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/transistorsoft/cordova-background-geolocation-SampleApp/a5ac8fb82d3e35c7e10d20c448866bfe094df349/resources/ios/icon/icon-72.png -------------------------------------------------------------------------------- /resources/ios/icon/icon-72@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/transistorsoft/cordova-background-geolocation-SampleApp/a5ac8fb82d3e35c7e10d20c448866bfe094df349/resources/ios/icon/icon-72@2x.png -------------------------------------------------------------------------------- /resources/ios/icon/icon-76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/transistorsoft/cordova-background-geolocation-SampleApp/a5ac8fb82d3e35c7e10d20c448866bfe094df349/resources/ios/icon/icon-76.png -------------------------------------------------------------------------------- /resources/ios/icon/icon-76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/transistorsoft/cordova-background-geolocation-SampleApp/a5ac8fb82d3e35c7e10d20c448866bfe094df349/resources/ios/icon/icon-76@2x.png -------------------------------------------------------------------------------- /resources/ios/icon/icon-83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/transistorsoft/cordova-background-geolocation-SampleApp/a5ac8fb82d3e35c7e10d20c448866bfe094df349/resources/ios/icon/icon-83.5@2x.png -------------------------------------------------------------------------------- /resources/ios/icon/icon-86@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/transistorsoft/cordova-background-geolocation-SampleApp/a5ac8fb82d3e35c7e10d20c448866bfe094df349/resources/ios/icon/icon-86@2x.png -------------------------------------------------------------------------------- /resources/ios/icon/icon-98@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/transistorsoft/cordova-background-geolocation-SampleApp/a5ac8fb82d3e35c7e10d20c448866bfe094df349/resources/ios/icon/icon-98@2x.png -------------------------------------------------------------------------------- /resources/ios/icon/icon-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/transistorsoft/cordova-background-geolocation-SampleApp/a5ac8fb82d3e35c7e10d20c448866bfe094df349/resources/ios/icon/icon-small.png -------------------------------------------------------------------------------- /resources/ios/icon/icon-small@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/transistorsoft/cordova-background-geolocation-SampleApp/a5ac8fb82d3e35c7e10d20c448866bfe094df349/resources/ios/icon/icon-small@2x.png -------------------------------------------------------------------------------- /resources/ios/icon/icon-small@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/transistorsoft/cordova-background-geolocation-SampleApp/a5ac8fb82d3e35c7e10d20c448866bfe094df349/resources/ios/icon/icon-small@3x.png -------------------------------------------------------------------------------- /resources/ios/icon/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/transistorsoft/cordova-background-geolocation-SampleApp/a5ac8fb82d3e35c7e10d20c448866bfe094df349/resources/ios/icon/icon.png -------------------------------------------------------------------------------- /resources/ios/icon/icon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/transistorsoft/cordova-background-geolocation-SampleApp/a5ac8fb82d3e35c7e10d20c448866bfe094df349/resources/ios/icon/icon@2x.png -------------------------------------------------------------------------------- /resources/ios/splash/Default-1792h~iphone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/transistorsoft/cordova-background-geolocation-SampleApp/a5ac8fb82d3e35c7e10d20c448866bfe094df349/resources/ios/splash/Default-1792h~iphone.png -------------------------------------------------------------------------------- /resources/ios/splash/Default-2436h.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/transistorsoft/cordova-background-geolocation-SampleApp/a5ac8fb82d3e35c7e10d20c448866bfe094df349/resources/ios/splash/Default-2436h.png -------------------------------------------------------------------------------- /resources/ios/splash/Default-2688h~iphone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/transistorsoft/cordova-background-geolocation-SampleApp/a5ac8fb82d3e35c7e10d20c448866bfe094df349/resources/ios/splash/Default-2688h~iphone.png -------------------------------------------------------------------------------- /resources/ios/splash/Default-568h@2x~iphone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/transistorsoft/cordova-background-geolocation-SampleApp/a5ac8fb82d3e35c7e10d20c448866bfe094df349/resources/ios/splash/Default-568h@2x~iphone.png -------------------------------------------------------------------------------- /resources/ios/splash/Default-667h.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/transistorsoft/cordova-background-geolocation-SampleApp/a5ac8fb82d3e35c7e10d20c448866bfe094df349/resources/ios/splash/Default-667h.png -------------------------------------------------------------------------------- /resources/ios/splash/Default-736h.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/transistorsoft/cordova-background-geolocation-SampleApp/a5ac8fb82d3e35c7e10d20c448866bfe094df349/resources/ios/splash/Default-736h.png -------------------------------------------------------------------------------- /resources/ios/splash/Default-Landscape-1792h~iphone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/transistorsoft/cordova-background-geolocation-SampleApp/a5ac8fb82d3e35c7e10d20c448866bfe094df349/resources/ios/splash/Default-Landscape-1792h~iphone.png -------------------------------------------------------------------------------- /resources/ios/splash/Default-Landscape-2436h.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/transistorsoft/cordova-background-geolocation-SampleApp/a5ac8fb82d3e35c7e10d20c448866bfe094df349/resources/ios/splash/Default-Landscape-2436h.png -------------------------------------------------------------------------------- /resources/ios/splash/Default-Landscape-2688h~iphone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/transistorsoft/cordova-background-geolocation-SampleApp/a5ac8fb82d3e35c7e10d20c448866bfe094df349/resources/ios/splash/Default-Landscape-2688h~iphone.png -------------------------------------------------------------------------------- /resources/ios/splash/Default-Landscape-736h.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/transistorsoft/cordova-background-geolocation-SampleApp/a5ac8fb82d3e35c7e10d20c448866bfe094df349/resources/ios/splash/Default-Landscape-736h.png -------------------------------------------------------------------------------- /resources/ios/splash/Default-Landscape@2x~ipad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/transistorsoft/cordova-background-geolocation-SampleApp/a5ac8fb82d3e35c7e10d20c448866bfe094df349/resources/ios/splash/Default-Landscape@2x~ipad.png -------------------------------------------------------------------------------- /resources/ios/splash/Default-Landscape@~ipadpro.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/transistorsoft/cordova-background-geolocation-SampleApp/a5ac8fb82d3e35c7e10d20c448866bfe094df349/resources/ios/splash/Default-Landscape@~ipadpro.png -------------------------------------------------------------------------------- /resources/ios/splash/Default-Landscape~ipad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/transistorsoft/cordova-background-geolocation-SampleApp/a5ac8fb82d3e35c7e10d20c448866bfe094df349/resources/ios/splash/Default-Landscape~ipad.png -------------------------------------------------------------------------------- /resources/ios/splash/Default-Portrait@2x~ipad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/transistorsoft/cordova-background-geolocation-SampleApp/a5ac8fb82d3e35c7e10d20c448866bfe094df349/resources/ios/splash/Default-Portrait@2x~ipad.png -------------------------------------------------------------------------------- /resources/ios/splash/Default-Portrait@~ipadpro.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/transistorsoft/cordova-background-geolocation-SampleApp/a5ac8fb82d3e35c7e10d20c448866bfe094df349/resources/ios/splash/Default-Portrait@~ipadpro.png -------------------------------------------------------------------------------- /resources/ios/splash/Default-Portrait~ipad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/transistorsoft/cordova-background-geolocation-SampleApp/a5ac8fb82d3e35c7e10d20c448866bfe094df349/resources/ios/splash/Default-Portrait~ipad.png -------------------------------------------------------------------------------- /resources/ios/splash/Default@2x~iphone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/transistorsoft/cordova-background-geolocation-SampleApp/a5ac8fb82d3e35c7e10d20c448866bfe094df349/resources/ios/splash/Default@2x~iphone.png -------------------------------------------------------------------------------- /resources/ios/splash/Default@2x~universal~anyany.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/transistorsoft/cordova-background-geolocation-SampleApp/a5ac8fb82d3e35c7e10d20c448866bfe094df349/resources/ios/splash/Default@2x~universal~anyany.png -------------------------------------------------------------------------------- /resources/ios/splash/Default~iphone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/transistorsoft/cordova-background-geolocation-SampleApp/a5ac8fb82d3e35c7e10d20c448866bfe094df349/resources/ios/splash/Default~iphone.png -------------------------------------------------------------------------------- /resources/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/transistorsoft/cordova-background-geolocation-SampleApp/a5ac8fb82d3e35c7e10d20c448866bfe094df349/resources/splash.png -------------------------------------------------------------------------------- /scripts/adb-install.sh: -------------------------------------------------------------------------------- 1 | #/bin/sh 2 | 3 | adb install -r platforms/android/app/build/outputs/apk/debug/app-debug.apk 4 | -------------------------------------------------------------------------------- /scripts/android-release.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | ionic cordova build android --release 3 | jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore ~/Dropbox/TransistorSoftware/Apps/com.transistorsoft.backgroundgeolocation.ionic2/release-key.keystore platforms/android/app/build/outputs/apk/release/app-release-unsigned.apk com.transistorsoft.backgroundgeolocation.ionic2 4 | ~/Library/Android/sdk/build-tools/29.0.2/zipalign -v 4 platforms/android/app/build/outputs/apk/release/app-release-unsigned.apk ./cordova-background-geolocation.apk 5 | -------------------------------------------------------------------------------- /scripts/build-ios: -------------------------------------------------------------------------------- 1 | ionic cordova build ios -- --buildFlag="-UseModernBuildSystem=0" 2 | -------------------------------------------------------------------------------- /scripts/cycle-plugin.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | PLUGIN="cordova-background-geolocation" 4 | 5 | if [[ -n $1 ]]; then 6 | WHICH="cordova-background-geolocation-lt" 7 | fi 8 | 9 | cordova plugin remove $PLUGIN --nosave 10 | ionic cordova plugin add ../$PLUGIN 11 | #install-local ../$PLUGIN 12 | 13 | -------------------------------------------------------------------------------- /scripts/link-framework.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | ## 3 | # Transistorsoft dev script. This won't concern you. 4 | # 5 | # Links the installed plugin's tslocationmanager.aar / TSLocationManager.framework to the local build 6 | # so we don't have to yarn add react-native-background-geolocation to test the libs. 7 | # 8 | PWD=$(pwd) 9 | SRC_ROOT="/Volumes/Glyph2TB/Users/chris/workspace/cordova/background-geolocation" 10 | MODULE_NAME="cordova-background-geolocation" 11 | PUBLIC_MODULE_PATH="./node_modules/$MODULE_NAME-lt" 12 | PRIVATE_MODULE_PATH="./node_modules/$MODULE_NAME" 13 | ANDROID_LIBS_DIR="libs/com/transistorsoft/tslocationmanager" 14 | IOS_LIBS_DIR="" 15 | MODULE_PATH="" 16 | 17 | if [ -d $PRIVATE_MODULE_PATH ]; then 18 | MODULE_PATH=$PRIVATE_MODULE_PATH 19 | IOS_LIBS_DIR="platforms/ios/BG\ Geo/Plugins/${MODULE_NAME}/TSLocationManager.xcframework" 20 | 21 | else 22 | if [ -d $PUBLIC_MODULE_PATH ]; then 23 | MODULE_PATH=$PUBLIC_MODULE_PATH 24 | IOS_LIBS_DIR="platforms/ios/BG Geo/Plugins/${MODULE_NAME}-lt/TSLocationManager.xcframework" 25 | fi 26 | fi 27 | 28 | if [ -n "$MODULE_PATH" ]; then 29 | echo "- Found module: $MODULE_PATH" 30 | 31 | # destroy /android/libs 32 | rm -rf "platforms/android/app/${ANDROID_LIBS_DIR}" 33 | rm -rf "platforms/android/app/${ANDROID_LIBS_DIR}-reverse" 34 | 35 | # link it -> local repo. 36 | CMD="$SRC_ROOT/$MODULE_NAME/src/android/$ANDROID_LIBS_DIR platforms/android/app/$ANDROID_LIBS_DIR" 37 | ln -s $CMD 38 | echo "- [link android] ln -s $CMD" 39 | 40 | CMD="$SRC_ROOT/$MODULE_NAME/src/android/$ANDROID_LIBS_DIR-reverse platforms/android/app/$ANDROID_LIBS_DIR-reverse" 41 | ln -s $CMD 42 | echo "- [link android] ln -s $CMD" 43 | 44 | # destroy /ios/RNBackgroundGeolocation/TSLocationManager.framework 45 | rm -rf "$IOS_LIBS_DIR" 46 | CMD="$SRC_ROOT/$MODULE_NAME/src/ios/TSLocationManager.framework $IOS_LIBS_DIR" 47 | # link it -> local repo. 48 | eval ln -s $CMD 49 | echo "- [link ios] ln -s $CMD" 50 | else 51 | echo "- ERROR could not find $PUBLIC_MODULE_PATH or $PRIVATE_MODULE_PATH" 52 | fi 53 | -------------------------------------------------------------------------------- /scripts/logcat: -------------------------------------------------------------------------------- 1 | adb logcat *:S TSLocationManager:V TSBackgroundFetch:V chromium:V 2 | -------------------------------------------------------------------------------- /scripts/pull-logback: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | adb shell "run-as com.transistorsoft.backgroundgeolocation.ionic2 cat /data/user/0/com.transistorsoft.backgroundgeolocation.ionic2/databases/transistor_logback.db" > transistor_logback.db 4 | 5 | -------------------------------------------------------------------------------- /scripts/simulate-fetch.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | adb shell cmd jobscheduler run -f com.transistorsoft.backgroundgeolocation.ionic2 999 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/android/BackgroundFetchHeadlessTask.java: -------------------------------------------------------------------------------- 1 | package com.transistorsoft.cordova.backgroundfetch; 2 | 3 | import android.content.Context; 4 | import android.util.Log; 5 | 6 | import com.transistorsoft.tsbackgroundfetch.BackgroundFetch; 7 | import com.transistorsoft.tsbackgroundfetch.BGTask; 8 | 9 | /** 10 | * Created by chris on 2018-01-22. 11 | */ 12 | 13 | public class BackgroundFetchHeadlessTask implements HeadlessTask { 14 | @Override 15 | public void onFetch(Context context, BGTask task) { 16 | String taskId = task.getTaskId(); 17 | boolean isTimeout = task.getTimedOut(); 18 | if (isTimeout) { 19 | BackgroundFetch.getInstance(context).finish(taskId); 20 | return; 21 | } 22 | Log.d(BackgroundFetch.TAG, "BackgroundFetchHeadlessTask onFetch -- CUSTOM IMPLEMENTATION"); 23 | BackgroundFetch.getInstance(context).finish(taskId); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/android/BackgroundGeolocationHeadlessTask.java: -------------------------------------------------------------------------------- 1 | package com.transistorsoft.cordova.bggeo; 2 | 3 | import org.greenrobot.eventbus.Subscribe; 4 | import org.json.JSONObject; 5 | 6 | import com.transistorsoft.locationmanager.adapter.BackgroundGeolocation; 7 | import com.transistorsoft.locationmanager.event.ActivityChangeEvent; 8 | import com.transistorsoft.locationmanager.event.GeofenceEvent; 9 | import com.transistorsoft.locationmanager.event.GeofencesChangeEvent; 10 | import com.transistorsoft.locationmanager.event.ConnectivityChangeEvent; 11 | import com.transistorsoft.locationmanager.event.HeadlessEvent; 12 | import com.transistorsoft.locationmanager.event.HeartbeatEvent; 13 | import com.transistorsoft.locationmanager.event.MotionChangeEvent; 14 | import com.transistorsoft.locationmanager.event.LocationProviderChangeEvent; 15 | import com.transistorsoft.locationmanager.http.HttpResponse; 16 | import com.transistorsoft.locationmanager.location.TSLocation; 17 | import com.transistorsoft.locationmanager.logger.TSLog; 18 | 19 | 20 | /** 21 | * BackgroundGeolocationHeadlessTask 22 | * This component allows you to receive events from the BackgroundGeolocation plugin in the native Android environment while your app has been *terminated*, 23 | * where the plugin is configured for stopOnTerminate: false. In this context, only the plugin's service is running. This component will receive all the same 24 | * events you'd listen to in the Javascript API. 25 | * 26 | * You might use this component to: 27 | * - fetch / post information to your server (eg: request new API key) 28 | * - execute BackgroundGeolocation API methods (eg: #getCurrentPosition, #setConfig, #addGeofence, #stop, etc -- you can execute ANY method of the Javascript API) 29 | */ 30 | 31 | public class BackgroundGeolocationHeadlessTask { 32 | 33 | @Subscribe 34 | public void onHeadlessTask(HeadlessEvent event) { 35 | String name = event.getName(); 36 | TSLog.logger.debug("\uD83D\uDC80 event (CUSTOM IMPLEMENTATION): " + event.getName()); 37 | TSLog.logger.debug("- event: " + event.getEvent()); 38 | 39 | if (name.equals(BackgroundGeolocation.EVENT_TERMINATE)) { 40 | JSONObject state = event.getTerminateEvent(); 41 | } else if (name.equals(BackgroundGeolocation.EVENT_LOCATION)) { 42 | TSLocation location = event.getLocationEvent(); 43 | } else if (name.equals(BackgroundGeolocation.EVENT_MOTIONCHANGE)) { 44 | MotionChangeEvent motionChangeEvent = event.getMotionChangeEvent(); 45 | TSLocation location = motionChangeEvent.getLocation(); 46 | } else if (name.equals(BackgroundGeolocation.EVENT_HTTP)) { 47 | HttpResponse response = event.getHttpEvent(); 48 | } else if (name.equals(BackgroundGeolocation.EVENT_PROVIDERCHANGE)) { 49 | LocationProviderChangeEvent providerChange = event.getProviderChangeEvent(); 50 | } else if (name.equals(BackgroundGeolocation.EVENT_PROVIDERCHANGE)) { 51 | LocationProviderChangeEvent providerChange = event.getProviderChangeEvent(); 52 | } else if (name.equals(BackgroundGeolocation.EVENT_ACTIVITYCHANGE)) { 53 | ActivityChangeEvent activityChange = event.getActivityChangeEvent(); 54 | } else if (name.equals(BackgroundGeolocation.EVENT_SCHEDULE)) { 55 | JSONObject state = event.getScheduleEvent(); 56 | } else if (name.equals(BackgroundGeolocation.EVENT_BOOT)) { 57 | JSONObject state = event.getBootEvent(); 58 | } else if (name.equals(BackgroundGeolocation.EVENT_GEOFENCE)) { 59 | GeofenceEvent geofenceEvent = event.getGeofenceEvent(); 60 | } else if (name.equals(BackgroundGeolocation.EVENT_GEOFENCESCHANGE)) { 61 | GeofencesChangeEvent geofencesChangeEvent = event.getGeofencesChangeEvent(); 62 | } else if (name.equals(BackgroundGeolocation.EVENT_HEARTBEAT)) { 63 | HeartbeatEvent heartbeatEvent = event.getHeartbeatEvent(); 64 | } else if (name.equals(BackgroundGeolocation.EVENT_NOTIFICATIONACTION)) { 65 | String buttonId = event.getNotificationEvent(); 66 | } else if (name.equals(BackgroundGeolocation.EVENT_CONNECTIVITYCHANGE)) { 67 | ConnectivityChangeEvent connectivityChangeEvent = event.getConnectivityChangeEvent(); 68 | } else if (name.equals(BackgroundGeolocation.EVENT_ENABLEDCHANGE)) { 69 | boolean enabled = event.getEnabledChangeEvent(); 70 | } else { 71 | TSLog.logger.warn(TSLog.warn("Unknown Headless Event: " + name)); 72 | } 73 | } 74 | } -------------------------------------------------------------------------------- /src/android/build-extras.gradle: -------------------------------------------------------------------------------- 1 | def SIGNING_PROPERTIES = "../../../keystore/signing.properties" 2 | 3 | ext.removeBackgroundGeolocationDebugSoundsInRelease = false 4 | if (file(SIGNING_PROPERTIES).exists()) { 5 | println("[SampleApp] Found signing properties file: ${SIGNING_PROPERTIES}") 6 | ext.cdvReleaseSigningPropertiesFile = SIGNING_PROPERTIES 7 | } 8 | 9 | ext.cdvSdkVersion="33" 10 | ext.cdvCompileSdkVersion="33" 11 | 12 | ext.cdvAndroidXAppCompatVersion="1.4.2" 13 | 14 | -------------------------------------------------------------------------------- /src/android/notification_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 17 | 18 | 24 | 25 | 34 | 35 | 36 | 43 | 44 | 51 | 52 | 59 | 60 | 66 | 67 |