react-native-background-geolocation 4.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/stale.yml +41 -0
- package/CHANGELOG.md +1131 -0
- package/LICENSE +22 -0
- package/README.md +292 -0
- package/RNBackgroundGeolocation.podspec +27 -0
- package/android/.idea/compiler.xml +22 -0
- package/android/.idea/copyright/profiles_settings.xml +3 -0
- package/android/.idea/encodings.xml +6 -0
- package/android/.idea/gradle.xml +12 -0
- package/android/.idea/misc.xml +4 -0
- package/android/.idea/modules.xml +8 -0
- package/android/.idea/runConfigurations.xml +12 -0
- package/android/RNBackgroundGeolocation.iml +119 -0
- package/android/android.iml +20 -0
- package/android/app.gradle +22 -0
- package/android/build.gradle +62 -0
- package/android/libs/com/transistorsoft/tslocationmanager/3.1.33/tslocationmanager-3.1.33.aar +0 -0
- package/android/libs/com/transistorsoft/tslocationmanager/3.1.33/tslocationmanager-3.1.33.aar.md5 +1 -0
- package/android/libs/com/transistorsoft/tslocationmanager/3.1.33/tslocationmanager-3.1.33.aar.sha1 +1 -0
- package/android/libs/com/transistorsoft/tslocationmanager/3.1.33/tslocationmanager-3.1.33.aar.sha256 +1 -0
- package/android/libs/com/transistorsoft/tslocationmanager/3.1.33/tslocationmanager-3.1.33.aar.sha512 +1 -0
- package/android/libs/com/transistorsoft/tslocationmanager/3.1.33/tslocationmanager-3.1.33.pom +9 -0
- package/android/libs/com/transistorsoft/tslocationmanager/3.1.33/tslocationmanager-3.1.33.pom.md5 +1 -0
- package/android/libs/com/transistorsoft/tslocationmanager/3.1.33/tslocationmanager-3.1.33.pom.sha1 +1 -0
- package/android/libs/com/transistorsoft/tslocationmanager/3.1.33/tslocationmanager-3.1.33.pom.sha256 +1 -0
- package/android/libs/com/transistorsoft/tslocationmanager/3.1.33/tslocationmanager-3.1.33.pom.sha512 +1 -0
- package/android/libs/com/transistorsoft/tslocationmanager/maven-metadata.xml +14 -0
- package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.1.33/tslocationmanager-reverse-3.1.33.aar +0 -0
- package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.1.33/tslocationmanager-reverse-3.1.33.aar.md5 +1 -0
- package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.1.33/tslocationmanager-reverse-3.1.33.aar.sha1 +1 -0
- package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.1.33/tslocationmanager-reverse-3.1.33.aar.sha256 +1 -0
- package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.1.33/tslocationmanager-reverse-3.1.33.aar.sha512 +1 -0
- package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.1.33/tslocationmanager-reverse-3.1.33.pom +9 -0
- package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.1.33/tslocationmanager-reverse-3.1.33.pom.md5 +1 -0
- package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.1.33/tslocationmanager-reverse-3.1.33.pom.sha1 +1 -0
- package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.1.33/tslocationmanager-reverse-3.1.33.pom.sha256 +1 -0
- package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.1.33/tslocationmanager-reverse-3.1.33.pom.sha512 +1 -0
- package/android/libs/com/transistorsoft/tslocationmanager-reverse/maven-metadata.xml +14 -0
- package/android/proguard-rules.pro +30 -0
- package/android/react-native-background-geolocation-android.iml +229 -0
- package/android/src/main/AndroidManifest.xml +6 -0
- package/android/src/main/java/com/transistorsoft/rnbackgroundgeolocation/HeadlessTask.java +171 -0
- package/android/src/main/java/com/transistorsoft/rnbackgroundgeolocation/RNBackgroundGeolocation.java +33 -0
- package/android/src/main/java/com/transistorsoft/rnbackgroundgeolocation/RNBackgroundGeolocationModule.java +1261 -0
- package/android/src/main/res/values/strings.xml +3 -0
- package/ios/RNBackgroundGeolocation/RNBackgroundGeolocation.h +22 -0
- package/ios/RNBackgroundGeolocation/RNBackgroundGeolocation.m +754 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/Info.plist +57 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_armv7/TSLocationManager.framework/Headers/AtomicBoolean.h +18 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_armv7/TSLocationManager.framework/Headers/ConfigModule.h +21 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_armv7/TSLocationManager.framework/Headers/HttpRequest.h +21 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_armv7/TSLocationManager.framework/Headers/HttpResponse.h +29 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_armv7/TSLocationManager.framework/Headers/LocationManager.h +55 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_armv7/TSLocationManager.framework/Headers/LogQuery.h +13 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_armv7/TSLocationManager.framework/Headers/SOMotionDetector.h +140 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_armv7/TSLocationManager.framework/Headers/SQLQuery.h +34 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_armv7/TSLocationManager.framework/Headers/TSActivityChangeEvent.h +16 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_armv7/TSLocationManager.framework/Headers/TSAuthorization.h +37 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_armv7/TSLocationManager.framework/Headers/TSAuthorizationEvent.h +17 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_armv7/TSLocationManager.framework/Headers/TSCallback.h +18 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_armv7/TSLocationManager.framework/Headers/TSConfig.h +304 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_armv7/TSLocationManager.framework/Headers/TSConnectivityChangeEvent.h +17 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_armv7/TSLocationManager.framework/Headers/TSCurrentPositionRequest.h +43 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_armv7/TSLocationManager.framework/Headers/TSDeviceInfo.h +24 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_armv7/TSLocationManager.framework/Headers/TSEnabledChangeEvent.h +15 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_armv7/TSLocationManager.framework/Headers/TSGeofence.h +50 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_armv7/TSLocationManager.framework/Headers/TSGeofenceEvent.h +60 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_armv7/TSLocationManager.framework/Headers/TSGeofenceManager.h +50 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_armv7/TSLocationManager.framework/Headers/TSGeofencesChangeEvent.h +17 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_armv7/TSLocationManager.framework/Headers/TSHeartbeatEvent.h +18 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_armv7/TSLocationManager.framework/Headers/TSHttpEvent.h +19 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_armv7/TSLocationManager.framework/Headers/TSHttpService.h +58 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_armv7/TSLocationManager.framework/Headers/TSLocation.h +101 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_armv7/TSLocationManager.framework/Headers/TSLocationManager.h +312 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_armv7/TSLocationManager.framework/Headers/TSPowerSaveChangeEvent.h +14 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_armv7/TSLocationManager.framework/Headers/TSProviderChangeEvent.h +20 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_armv7/TSLocationManager.framework/Headers/TSReachability.h +106 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_armv7/TSLocationManager.framework/Headers/TSSchedule.h +40 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_armv7/TSLocationManager.framework/Headers/TSScheduleEvent.h +18 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_armv7/TSLocationManager.framework/Headers/TSWatchPositionRequest.h +41 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_armv7/TSLocationManager.framework/Headers/TransistorAuthorizationToken.h +31 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_armv7/TSLocationManager.framework/Info.plist +0 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_armv7/TSLocationManager.framework/Modules/module.modulemap +6 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_armv7/TSLocationManager.framework/TSLocationManager +0 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_i386_x86_64-simulator/TSLocationManager.framework/Headers/AtomicBoolean.h +18 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_i386_x86_64-simulator/TSLocationManager.framework/Headers/ConfigModule.h +21 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_i386_x86_64-simulator/TSLocationManager.framework/Headers/HttpRequest.h +21 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_i386_x86_64-simulator/TSLocationManager.framework/Headers/HttpResponse.h +29 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_i386_x86_64-simulator/TSLocationManager.framework/Headers/LocationManager.h +55 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_i386_x86_64-simulator/TSLocationManager.framework/Headers/LogQuery.h +13 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_i386_x86_64-simulator/TSLocationManager.framework/Headers/SOMotionDetector.h +140 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_i386_x86_64-simulator/TSLocationManager.framework/Headers/SQLQuery.h +34 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_i386_x86_64-simulator/TSLocationManager.framework/Headers/TSActivityChangeEvent.h +16 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_i386_x86_64-simulator/TSLocationManager.framework/Headers/TSAuthorization.h +37 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_i386_x86_64-simulator/TSLocationManager.framework/Headers/TSAuthorizationEvent.h +17 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_i386_x86_64-simulator/TSLocationManager.framework/Headers/TSCallback.h +18 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_i386_x86_64-simulator/TSLocationManager.framework/Headers/TSConfig.h +304 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_i386_x86_64-simulator/TSLocationManager.framework/Headers/TSConnectivityChangeEvent.h +17 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_i386_x86_64-simulator/TSLocationManager.framework/Headers/TSCurrentPositionRequest.h +43 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_i386_x86_64-simulator/TSLocationManager.framework/Headers/TSDeviceInfo.h +24 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_i386_x86_64-simulator/TSLocationManager.framework/Headers/TSEnabledChangeEvent.h +15 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_i386_x86_64-simulator/TSLocationManager.framework/Headers/TSGeofence.h +50 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_i386_x86_64-simulator/TSLocationManager.framework/Headers/TSGeofenceEvent.h +60 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_i386_x86_64-simulator/TSLocationManager.framework/Headers/TSGeofenceManager.h +50 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_i386_x86_64-simulator/TSLocationManager.framework/Headers/TSGeofencesChangeEvent.h +17 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_i386_x86_64-simulator/TSLocationManager.framework/Headers/TSHeartbeatEvent.h +18 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_i386_x86_64-simulator/TSLocationManager.framework/Headers/TSHttpEvent.h +19 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_i386_x86_64-simulator/TSLocationManager.framework/Headers/TSHttpService.h +58 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_i386_x86_64-simulator/TSLocationManager.framework/Headers/TSLocation.h +101 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_i386_x86_64-simulator/TSLocationManager.framework/Headers/TSLocationManager.h +312 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_i386_x86_64-simulator/TSLocationManager.framework/Headers/TSPowerSaveChangeEvent.h +14 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_i386_x86_64-simulator/TSLocationManager.framework/Headers/TSProviderChangeEvent.h +20 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_i386_x86_64-simulator/TSLocationManager.framework/Headers/TSReachability.h +106 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_i386_x86_64-simulator/TSLocationManager.framework/Headers/TSSchedule.h +40 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_i386_x86_64-simulator/TSLocationManager.framework/Headers/TSScheduleEvent.h +18 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_i386_x86_64-simulator/TSLocationManager.framework/Headers/TSWatchPositionRequest.h +41 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_i386_x86_64-simulator/TSLocationManager.framework/Headers/TransistorAuthorizationToken.h +31 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_i386_x86_64-simulator/TSLocationManager.framework/Info.plist +0 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_i386_x86_64-simulator/TSLocationManager.framework/Modules/module.modulemap +6 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_i386_x86_64-simulator/TSLocationManager.framework/TSLocationManager +0 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_i386_x86_64-simulator/TSLocationManager.framework/_CodeSignature/CodeDirectory +0 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_i386_x86_64-simulator/TSLocationManager.framework/_CodeSignature/CodeRequirements +0 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_i386_x86_64-simulator/TSLocationManager.framework/_CodeSignature/CodeRequirements-1 +0 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_i386_x86_64-simulator/TSLocationManager.framework/_CodeSignature/CodeResources +612 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_i386_x86_64-simulator/TSLocationManager.framework/_CodeSignature/CodeSignature +0 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Headers/AtomicBoolean.h +18 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Headers/ConfigModule.h +21 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Headers/HttpRequest.h +21 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Headers/HttpResponse.h +29 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Headers/LocationManager.h +55 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Headers/LogQuery.h +13 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Headers/SOMotionDetector.h +140 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Headers/SQLQuery.h +34 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Headers/TSActivityChangeEvent.h +16 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Headers/TSAuthorization.h +37 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Headers/TSAuthorizationEvent.h +17 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Headers/TSCallback.h +18 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Headers/TSConfig.h +304 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Headers/TSConnectivityChangeEvent.h +17 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Headers/TSCurrentPositionRequest.h +43 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Headers/TSDeviceInfo.h +24 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Headers/TSEnabledChangeEvent.h +15 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Headers/TSGeofence.h +50 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Headers/TSGeofenceEvent.h +60 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Headers/TSGeofenceManager.h +50 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Headers/TSGeofencesChangeEvent.h +17 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Headers/TSHeartbeatEvent.h +18 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Headers/TSHttpEvent.h +19 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Headers/TSHttpService.h +58 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Headers/TSLocation.h +101 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Headers/TSLocationManager.h +312 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Headers/TSPowerSaveChangeEvent.h +14 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Headers/TSProviderChangeEvent.h +20 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Headers/TSReachability.h +106 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Headers/TSSchedule.h +40 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Headers/TSScheduleEvent.h +18 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Headers/TSWatchPositionRequest.h +41 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Headers/TransistorAuthorizationToken.h +31 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Modules/module.modulemap +6 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Resources/Info.plist +50 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/TSLocationManager +0 -0
- package/ios/RNBackgroundGeolocation.xcodeproj/project.pbxproj +341 -0
- package/ios/RNBackgroundGeolocation.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
- package/ios/RNBackgroundGeolocation.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- package/ios/RNBackgroundGeolocation.xcodeproj/project.xcworkspace/xcshareddata/RNBackgroundGeolocation.xccheckout +41 -0
- package/ios/RNBackgroundGeolocation.xcodeproj/project.xcworkspace/xcuserdata/chris.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- package/ios/RNBackgroundGeolocation.xcodeproj/xcuserdata/chris.xcuserdatad/xcschemes/Build.xcscheme +80 -0
- package/ios/RNBackgroundGeolocation.xcodeproj/xcuserdata/chris.xcuserdatad/xcschemes/RNBackgroundGeolocation.xcscheme +113 -0
- package/ios/RNBackgroundGeolocation.xcodeproj/xcuserdata/chris.xcuserdatad/xcschemes/xcschememanagement.plist +37 -0
- package/ios/RNBackgroundGeolocationTests/Info.plist +24 -0
- package/package.json +54 -0
- package/react-native.config.js +20 -0
- package/scripts/cp-declarations +53 -0
- package/scripts/declare-module +3 -0
- package/scripts/docs-index.html +4 -0
- package/scripts/generate-docs +23 -0
- package/scripts/postlink.js +146 -0
- package/scripts/postunlink.js +128 -0
- package/scripts/tsconfig.json +21 -0
- package/scripts/xcode-helpers.js +171 -0
- package/src/DeviceSettings.js +52 -0
- package/src/Events.js +17 -0
- package/src/Logger.js +90 -0
- package/src/NativeModule.js +528 -0
- package/src/TransistorAuthorizationToken.js +73 -0
- package/src/declarations/BackgroundGeolocation.d.ts +1601 -0
- package/src/declarations/interfaces/Authorization.d.ts +156 -0
- package/src/declarations/interfaces/AuthorizationEvent.d.ts +30 -0
- package/src/declarations/interfaces/Config.d.ts +2437 -0
- package/src/declarations/interfaces/ConnectivityChangeEvent.d.ts +18 -0
- package/src/declarations/interfaces/CurrentPositionRequest.d.ts +45 -0
- package/src/declarations/interfaces/DeviceInfo.d.ts +33 -0
- package/src/declarations/interfaces/DeviceSettings.d.ts +223 -0
- package/src/declarations/interfaces/Geofence.d.ts +255 -0
- package/src/declarations/interfaces/GeofenceEvent.d.ts +30 -0
- package/src/declarations/interfaces/GeofencesChangeEvent.d.ts +22 -0
- package/src/declarations/interfaces/HeartbeatEvent.d.ts +20 -0
- package/src/declarations/interfaces/HttpEvent.d.ts +313 -0
- package/src/declarations/interfaces/Location.d.ts +216 -0
- package/src/declarations/interfaces/LocationAuthorizationAlert.d.ts +41 -0
- package/src/declarations/interfaces/Logger.d.ts +359 -0
- package/src/declarations/interfaces/MotionActivityEvent.d.ts +31 -0
- package/src/declarations/interfaces/MotionChangeEvent.d.ts +15 -0
- package/src/declarations/interfaces/Notification.d.ts +484 -0
- package/src/declarations/interfaces/PermissionRationale.d.ts +31 -0
- package/src/declarations/interfaces/ProviderChangeEvent.d.ts +74 -0
- package/src/declarations/interfaces/SQLQuery.d.ts +60 -0
- package/src/declarations/interfaces/Sensors.d.ts +31 -0
- package/src/declarations/interfaces/State.d.ts +51 -0
- package/src/declarations/interfaces/TransistorAuthorizationToken.d.ts +63 -0
- package/src/declarations/interfaces/WatchPositionRequest.d.ts +45 -0
- package/src/declarations/types.d.ts +170 -0
- package/src/index.d.ts +1 -0
- package/src/index.js +822 -0
|
@@ -0,0 +1,484 @@
|
|
|
1
|
+
/// <reference path="../types.d.ts" />
|
|
2
|
+
///
|
|
3
|
+
declare module "react-native-background-geolocation" {
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* __[Android only]__ The Android operating system requires a persistent notification when running a foreground service.
|
|
7
|
+
*
|
|
8
|
+
* 
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```typescript
|
|
12
|
+
* BackgroundGeolocation.ready({
|
|
13
|
+
* notification: {
|
|
14
|
+
* title: "The Title",
|
|
15
|
+
* text: "The Text"
|
|
16
|
+
* }
|
|
17
|
+
* })
|
|
18
|
+
* .
|
|
19
|
+
* .
|
|
20
|
+
* .
|
|
21
|
+
* // To update the notification in real-time, use #setConfig
|
|
22
|
+
* // You need only provide *changed* parameters -- initially configured
|
|
23
|
+
* // parameters will remain unchanged.
|
|
24
|
+
* BackgroundGeolocation.setConfig({
|
|
25
|
+
* notification: {
|
|
26
|
+
* title: "The New Title"
|
|
27
|
+
* }
|
|
28
|
+
* })
|
|
29
|
+
* ```
|
|
30
|
+
*
|
|
31
|
+
* ## Custom Notification Layouts
|
|
32
|
+
*
|
|
33
|
+
* Use the [[layout]] option to provide the name of your own Android Layout XML File. See [Android Custom Notification Layout](github:wiki/Android-Custom-Notification-Layout) for setup instructions.
|
|
34
|
+
*/
|
|
35
|
+
interface Notification {
|
|
36
|
+
/**
|
|
37
|
+
* When running the service with [[foregroundService]]: true, Android requires a persistent notification in the Notification Bar. This will control the **priority** of that notification as well as the position of the notificaiton-bar icon.
|
|
38
|
+
*
|
|
39
|
+
* The following `notificationPriority` values defined as static constants upon the [[BackgroundGeolocation]] object:
|
|
40
|
+
*
|
|
41
|
+
* | Value | Description |
|
|
42
|
+
* |---------------------------------------------------------|---------------------------------------------------------------------------------------------------------|
|
|
43
|
+
* | [[BackgroundGeolocation.NOTIFICATION_PRIORITY_DEFAULT]] | Notification weighted to top of list; notification-bar icon weighted left |
|
|
44
|
+
* | [[BackgroundGeolocation.NOTIFICATION_PRIORITY_HIGH]] | Notification **strongly** weighted to top of list; notification-bar icon **strongly** weighted to left |
|
|
45
|
+
* | [[BackgroundGeolocation.NOTIFICATION_PRIORITY_LOW]] | Notification weighted to bottom of list; notification-bar icon weighted right |
|
|
46
|
+
* | [[BackgroundGeolocation.NOTIFICATION_PRIORITY_MAX]] | Same as `NOTIFICATION_PRIORITY_HIGH` |
|
|
47
|
+
* | [[BackgroundGeolocation.NOTIFICATION_PRIORITY_MIN]] | Notification **strongly** weighted to bottom of list; notification-bar icon **hidden** |
|
|
48
|
+
*
|
|
49
|
+
* @example
|
|
50
|
+
* ```typescript
|
|
51
|
+
* BackgroundGeolocation.ready({
|
|
52
|
+
* foregroundService: true,
|
|
53
|
+
* notification: {
|
|
54
|
+
* priority: BackgroundGeolocation.NOTIFICATION_PRIORITY_MIN
|
|
55
|
+
* });
|
|
56
|
+
* ```
|
|
57
|
+
*/
|
|
58
|
+
priority?: NotificationPriority;
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Configure the Android Foreground Service icon and notification to be displayed __always__. Defaults to `false`.
|
|
62
|
+
*
|
|
63
|
+
* The default behaviour is for the notification to be shown only while the SDK detects the device to be *moving*. Some developers desire to provide full-disclosure to their users when the SDK has been enabled.
|
|
64
|
+
*/
|
|
65
|
+
sticky?: boolean;
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Configure the *title* of the persistent notification in the Notification Bar when running with [[Config.foregroundService]] __`true`__
|
|
69
|
+
* @break
|
|
70
|
+
*
|
|
71
|
+
* Defaults to the application name from `AndroidManifest`. When running the service with [[foregroundService]]: true, Android requires a persistent notification. This will configure the **title** of that notification.
|
|
72
|
+
*/
|
|
73
|
+
title?: string;
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Configure the *text* of the persistent notification in the Notification Bar when running with [[Config.foregroundService]] __`true`__
|
|
77
|
+
* @break
|
|
78
|
+
*
|
|
79
|
+
* Defaults to *"Location service activated"*. When running the service with [[Config.foregroundService]]: true, Android requires a persistent notification. This will configure the **text** of that notification.
|
|
80
|
+
*/
|
|
81
|
+
text?: string;
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Configure the *color* of the persistent notification icon in the Notification Bar when running with [[Config.foregroundService]] __`true`__
|
|
85
|
+
* @break
|
|
86
|
+
*
|
|
87
|
+
* Defaults to `null`. When running the service with [[Config.foregroundService]]: true, Android requires a persistent notification. This will configure the **color** of the notification **icon** (API >= 21).
|
|
88
|
+
*
|
|
89
|
+
* Supported formats are:
|
|
90
|
+
* - `#RRGGBB`
|
|
91
|
+
* - `#AARRGGBB`
|
|
92
|
+
*/
|
|
93
|
+
color?: string;
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Configure the *small icon* of the persistent notification in the Notification Bar when running with [[Config.foregroundService]] __`true`__
|
|
97
|
+
* @break
|
|
98
|
+
*
|
|
99
|
+
* When running the service with [[Config.foregroundService]]: true, Android requires a persistent notification in the Notification Bar. This allows you customize that icon. Defaults to your application icon.
|
|
100
|
+
*
|
|
101
|
+
* ### ⚠️ Warning:
|
|
102
|
+
* - You must specify the **`type`** (`drawable|mipmap`) of resource you wish to use in the following format: `{type}/icon_name`
|
|
103
|
+
* - Do not append the file-extension (eg: `.png`)
|
|
104
|
+
*
|
|
105
|
+
* @example
|
|
106
|
+
* ```typescript
|
|
107
|
+
* // 1. drawable
|
|
108
|
+
* BackgroundGeolocation.ready({
|
|
109
|
+
* notification: {
|
|
110
|
+
* smallIcon: "drawable/my_custom_notification_small_icon"
|
|
111
|
+
* }
|
|
112
|
+
* });
|
|
113
|
+
*
|
|
114
|
+
* // 2. mipmap
|
|
115
|
+
* BackgroundGeolocation.ready({
|
|
116
|
+
* notification: {
|
|
117
|
+
* smallIcon: "mipmap/my_custom_notification_small_icon"
|
|
118
|
+
* }
|
|
119
|
+
* });
|
|
120
|
+
* ```
|
|
121
|
+
*
|
|
122
|
+
* ### ℹ️ See also:
|
|
123
|
+
* - [[largeIcon]]
|
|
124
|
+
*/
|
|
125
|
+
smallIcon?: string;
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Configure the *large icon* of the persistent notification in the Notification Bar when running with [[Config.foregroundService]] __`true`__
|
|
129
|
+
* @break
|
|
130
|
+
*
|
|
131
|
+
* When running the service with [[Config.foregroundService]]: true, Android requires a persistent notification in the Notification Bar. This allows you customize that icon. Defaults to your application icon.
|
|
132
|
+
*
|
|
133
|
+
* ### ⚠️ Warning:
|
|
134
|
+
* - You must specify the **`type`** (`drawable|mipmap`) of resource you wish to use in the following format: `{type}/icon_name`
|
|
135
|
+
* - Do not append the file-extension (eg: `.png`)
|
|
136
|
+
*
|
|
137
|
+
* @example
|
|
138
|
+
* ```typescript
|
|
139
|
+
* // 1. drawable
|
|
140
|
+
* BackgroundGeolocation.ready({
|
|
141
|
+
* notification: {
|
|
142
|
+
* smallIcon: "drawable/my_custom_notification_small_icon"
|
|
143
|
+
* });
|
|
144
|
+
*
|
|
145
|
+
* // 2. mipmap
|
|
146
|
+
* BackgroundGeolocation.ready({
|
|
147
|
+
* notification: {
|
|
148
|
+
* smallIcon: "mipmap/my_custom_notification_small_icon"
|
|
149
|
+
* }
|
|
150
|
+
* });
|
|
151
|
+
* ```
|
|
152
|
+
*
|
|
153
|
+
* ### ℹ️ See also:
|
|
154
|
+
* - [[smallIcon]]
|
|
155
|
+
*/
|
|
156
|
+
largeIcon?: string;
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* Specifies the name of your custom Android Layout XML file.
|
|
160
|
+
*
|
|
161
|
+
ℹ️ See [Android Custom Notification Layout](github:wiki/Android-Custom-Notification-Layout) for setup instructions.
|
|
162
|
+
|
|
163
|
+

|
|
164
|
+
|
|
165
|
+
Even if you have no experience with Android Layouts, it doesn't take much to figure out the basics. You'll mostly be adding `<TextView />`, `<ImageView />` and `<Button />` elements. The key thing to be aware of is the `android:id` of these elements and how these are referenced from `BackgroundGeolocation.notification` configuration: your `android:id` **must** be prefixed with the word `notification` (eg: `notificationText`). There is one exception: `applicationName`, which the plugin will automatically render your Android application name.
|
|
166
|
+
|
|
167
|
+
### Layout Special Elements
|
|
168
|
+
|
|
169
|
+
When BackgroundGeolocation renders your custom notification layout, it will be querying for the following elements addressed by their `android:id`. When found, their content will be updated from the corresponding "Data-source":
|
|
170
|
+
|
|
171
|
+
| Layout element `android:id` | Data-source |
|
|
172
|
+
|-------------------------------|-------------------------------------------|
|
|
173
|
+
| `applicationName` | *Application name* from `AndroidManifest` |
|
|
174
|
+
| `notificationTitle` | [[title]] |
|
|
175
|
+
| `notificationText` | [[text]] |
|
|
176
|
+
| `notificationSmallIcon` | [[smallIcon]] |
|
|
177
|
+
| `notificationLargeIcon` | [[largeIcon]] |
|
|
178
|
+
|
|
179
|
+
@example
|
|
180
|
+
* ```typescript
|
|
181
|
+
* BackgroundGeolocation.ready({
|
|
182
|
+
* notification: {
|
|
183
|
+
* layout: "my_notification_layout", // <-- custom layout xml file
|
|
184
|
+
* title: "The Notification Title",
|
|
185
|
+
* text: "The Notification Text",
|
|
186
|
+
* smallIcon: "mipmap/my_small_icon", // <-- defaults to app icon
|
|
187
|
+
* largeIcon: "mipmap/my_large_icon"
|
|
188
|
+
* }
|
|
189
|
+
* });
|
|
190
|
+
* ```
|
|
191
|
+
|
|
192
|
+
### Custom `<TextView />` Elements
|
|
193
|
+
|
|
194
|
+
You can declare your own custom `<TextView />` elements and render data into them using the [[strings]] parameter.
|
|
195
|
+
|
|
196
|
+
@example
|
|
197
|
+
* ```xml
|
|
198
|
+
* <TextView
|
|
199
|
+
* android:id="@+id/myCustomElement" // <-- myCustomElement
|
|
200
|
+
* android:layout_width="match_parent"
|
|
201
|
+
* android:layout_height="wrap_content"
|
|
202
|
+
* android:text="notificationTitle" />
|
|
203
|
+
* ```
|
|
204
|
+
|
|
205
|
+
You can provide data to your custom elements using the [[strings]] configuration parameter:
|
|
206
|
+
|
|
207
|
+
@example
|
|
208
|
+
* ```typescript
|
|
209
|
+
* BackgroundGeolocation.ready({
|
|
210
|
+
* notification: {
|
|
211
|
+
* strings: {
|
|
212
|
+
* myCustomElement: "My Custom Element Text"
|
|
213
|
+
* }
|
|
214
|
+
* }
|
|
215
|
+
* });
|
|
216
|
+
* ```
|
|
217
|
+
|
|
218
|
+
### Custom `<Button />` Elements:
|
|
219
|
+
|
|
220
|
+
You can declare your own custom `<Button />` elements and register click-listeners upon them using the [[actions]] parameter:
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
@example
|
|
224
|
+
* ```xml
|
|
225
|
+
* <Button
|
|
226
|
+
* android:id="@+id/notificationButtonFoo" // <-- notificationButtonFoo
|
|
227
|
+
* style="@style/Widget.AppCompat.Button.Small"
|
|
228
|
+
* android:layout_width="60dp"
|
|
229
|
+
* android:layout_height="40dp"
|
|
230
|
+
* android:text="Foo" />
|
|
231
|
+
* ```
|
|
232
|
+
|
|
233
|
+
Register listeners for your button using the [[actions]] parameter:
|
|
234
|
+
|
|
235
|
+
@example
|
|
236
|
+
* ```typescript
|
|
237
|
+
* BackgroundGeolocation.ready({
|
|
238
|
+
* notification: {
|
|
239
|
+
* actions: [ // <-- register button listeners
|
|
240
|
+
* "notificationButtonFoo",
|
|
241
|
+
* "notificationButtonBar"
|
|
242
|
+
* ]
|
|
243
|
+
* }
|
|
244
|
+
* });
|
|
245
|
+
*
|
|
246
|
+
* // Listen to custom button clicks:
|
|
247
|
+
* BackgroundGeolocation.onNotificationAction((buttonId) => {
|
|
248
|
+
* console.log("[onNotificationAction] - ", buttonId);
|
|
249
|
+
* switch(buttonId) {
|
|
250
|
+
* case "notificationButtonFoo":
|
|
251
|
+
* break;
|
|
252
|
+
* case "notificationButtonBar':
|
|
253
|
+
* break;
|
|
254
|
+
* }
|
|
255
|
+
* });
|
|
256
|
+
* ```
|
|
257
|
+
|
|
258
|
+
### Sample Layout
|
|
259
|
+
|
|
260
|
+
As a starting-point for your custom layout, copy the following content into your new file:
|
|
261
|
+
|
|
262
|
+
@example
|
|
263
|
+
* ```xml
|
|
264
|
+
* <?xml version="1.0" encoding="utf-8"?>
|
|
265
|
+
* <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
266
|
+
* xmlns:tools="http://schemas.android.com/tools"
|
|
267
|
+
* android:layout_width="match_parent"
|
|
268
|
+
* android:layout_height="135dp"
|
|
269
|
+
* android:gravity="start"
|
|
270
|
+
* android:adjustViewBounds="true"
|
|
271
|
+
* android:orientation="vertical"
|
|
272
|
+
* android:padding="15dp">
|
|
273
|
+
*
|
|
274
|
+
* <LinearLayout
|
|
275
|
+
* android:layout_width="match_parent"
|
|
276
|
+
* android:layout_height="wrap_content"
|
|
277
|
+
* android:layout_marginBottom="15dp"
|
|
278
|
+
* android:gravity="center"
|
|
279
|
+
* android:orientation="horizontal">
|
|
280
|
+
*
|
|
281
|
+
* <ImageView
|
|
282
|
+
* android:id="@+id/notificationSmallIcon"
|
|
283
|
+
* android:layout_width="16dp"
|
|
284
|
+
* android:layout_height="16dp"
|
|
285
|
+
* android:tint="@android:color/background_dark"
|
|
286
|
+
* tools:srcCompat="@tools:sample/avatars" />
|
|
287
|
+
*
|
|
288
|
+
* <TextView
|
|
289
|
+
* android:id="@+id/applicationName"
|
|
290
|
+
* android:layout_width="match_parent"
|
|
291
|
+
* android:layout_height="match_parent"
|
|
292
|
+
* android:paddingLeft="10dp"
|
|
293
|
+
* android:text="applicationName"
|
|
294
|
+
* android:textAppearance="@style/TextAppearance.Compat.Notification.Title"
|
|
295
|
+
* android:textColor="#888888"
|
|
296
|
+
* android:textSize="12sp" />
|
|
297
|
+
* </LinearLayout>
|
|
298
|
+
*
|
|
299
|
+
* <TextView
|
|
300
|
+
* android:id="@+id/notificationTitle"
|
|
301
|
+
* style="@style/TextAppearance.Compat.Notification.Title"
|
|
302
|
+
* android:layout_width="match_parent"
|
|
303
|
+
* android:layout_height="wrap_content"
|
|
304
|
+
* android:text="notificationTitle"
|
|
305
|
+
* android:textSize="14sp" />
|
|
306
|
+
*
|
|
307
|
+
* <TextView
|
|
308
|
+
* android:id="@+id/notificationText"
|
|
309
|
+
* style="@style/TextAppearance.Compat.Notification.Line2"
|
|
310
|
+
* android:layout_width="match_parent"
|
|
311
|
+
* android:layout_height="wrap_content"
|
|
312
|
+
* android:text="notificationText"
|
|
313
|
+
* android:textSize="14sp" />
|
|
314
|
+
*
|
|
315
|
+
* <LinearLayout
|
|
316
|
+
* android:layout_width="match_parent"
|
|
317
|
+
* android:layout_height="wrap_content"
|
|
318
|
+
* android:layout_weight="1"
|
|
319
|
+
* android:gravity="right"
|
|
320
|
+
* android:orientation="horizontal">
|
|
321
|
+
*
|
|
322
|
+
* <Button
|
|
323
|
+
* android:id="@+id/notificationButtonFoo"
|
|
324
|
+
* style="@style/Widget.AppCompat.Button.Small"
|
|
325
|
+
* android:layout_width="60dp"
|
|
326
|
+
* android:layout_height="40dp"
|
|
327
|
+
* android:text="FooA" />
|
|
328
|
+
*
|
|
329
|
+
* <Button
|
|
330
|
+
* android:id="@+id/notificationButtonBar"
|
|
331
|
+
* style="@style/Widget.AppCompat.Button.Small"
|
|
332
|
+
* android:layout_width="60dp"
|
|
333
|
+
* android:layout_height="40dp"
|
|
334
|
+
* android:text="Bar" />
|
|
335
|
+
* </LinearLayout>
|
|
336
|
+
* </LinearLayout>
|
|
337
|
+
* ```
|
|
338
|
+
|
|
339
|
+

|
|
340
|
+
|
|
341
|
+
### Using your custom layout:
|
|
342
|
+
|
|
343
|
+
@example
|
|
344
|
+
* ```typescript
|
|
345
|
+
* BackgroundGeolocation.ready({
|
|
346
|
+
* notification: {
|
|
347
|
+
* title: "The title",
|
|
348
|
+
* text: "The text",
|
|
349
|
+
* layout: "notification_layout",
|
|
350
|
+
* actions: [
|
|
351
|
+
* "notificationButtonFoo", // <-- register button click-listeners
|
|
352
|
+
* "notificationButtonBar"
|
|
353
|
+
* ],
|
|
354
|
+
* strings: {
|
|
355
|
+
* "myCustomTextBox1": "custom TextBox element"
|
|
356
|
+
* }
|
|
357
|
+
* }
|
|
358
|
+
* });
|
|
359
|
+
*
|
|
360
|
+
* // Listen to custom notification button clicks (notification.actions)
|
|
361
|
+
* BackgroundGeolocation.onNotificationAction((buttonId) => {
|
|
362
|
+
* console.log("[onNotificationAction] - ", buttonId);
|
|
363
|
+
* switch(buttonId) {
|
|
364
|
+
* case "notificationButtonFoo":
|
|
365
|
+
* // Handle button click on [Foo]
|
|
366
|
+
* break;
|
|
367
|
+
* case "notificationButtonBar":
|
|
368
|
+
* // Handle button click on [Bar]
|
|
369
|
+
* break;
|
|
370
|
+
* }
|
|
371
|
+
* });
|
|
372
|
+
* ```
|
|
373
|
+
*/
|
|
374
|
+
layout?: string;
|
|
375
|
+
|
|
376
|
+
/**
|
|
377
|
+
* Custom strings to render into `<TextView />` elements of a custom notification [[layout]].
|
|
378
|
+
|
|
379
|
+
ℹ️ See [Android Custom Notification Layout](github:wiki/Android-Custom-Notification-Layout) for setup instructions.
|
|
380
|
+
|
|
381
|
+
You can declare your own custom `<TextView />` elements and render data into them using the `notification.strings` parameter.
|
|
382
|
+
|
|
383
|
+
@example
|
|
384
|
+
* ```xml
|
|
385
|
+
* <TextView
|
|
386
|
+
* android:id="@+id/myCustomElement" // <-- myCustomElement
|
|
387
|
+
* android:layout_width="match_parent"
|
|
388
|
+
* android:layout_height="wrap_content"
|
|
389
|
+
* android:text="notificationTitle" />
|
|
390
|
+
* ```
|
|
391
|
+
|
|
392
|
+
You can provide data to your custom elements using the [[strings]] configuration parameter:
|
|
393
|
+
|
|
394
|
+
@example
|
|
395
|
+
* ```typescript
|
|
396
|
+
* BackgroundGeolocation.ready({
|
|
397
|
+
* notification: {
|
|
398
|
+
* strings: {
|
|
399
|
+
* myCustomElement: "My Custom Element Text"
|
|
400
|
+
* }
|
|
401
|
+
* }
|
|
402
|
+
* });
|
|
403
|
+
* ```
|
|
404
|
+
*/
|
|
405
|
+
strings?: Object;
|
|
406
|
+
/**
|
|
407
|
+
* Declare click listeners for `<Button />` elements of a custom notification [[layout]].
|
|
408
|
+
|
|
409
|
+

|
|
410
|
+
|
|
411
|
+
ℹ️ See [Android Custom Notification Layout](github:wiki/Android-Custom-Notification-Layout) for setup instructions.
|
|
412
|
+
|
|
413
|
+
You can declare your own custom `<Button />` elements and register click-listeners upon them using the [[actions]] parameter:
|
|
414
|
+
|
|
415
|
+
@example
|
|
416
|
+
* ```xml
|
|
417
|
+
* <Button
|
|
418
|
+
* android:id="@+id/notificationButtonPause" // <-- notificationButtonPause
|
|
419
|
+
* style="@style/Widget.AppCompat.Button.Small"
|
|
420
|
+
* android:layout_width="60dp"
|
|
421
|
+
* android:layout_height="40dp"
|
|
422
|
+
* android:text="Foo" />
|
|
423
|
+
* ```
|
|
424
|
+
|
|
425
|
+
Register listeners for your button using `notification.actions`:
|
|
426
|
+
|
|
427
|
+
@example
|
|
428
|
+
* ```typescript
|
|
429
|
+
* BackgroundGeolocation.ready({
|
|
430
|
+
* notification: {
|
|
431
|
+
* actions: [ // <-- register button listeners
|
|
432
|
+
* "notificationButtonPause"
|
|
433
|
+
* ]
|
|
434
|
+
* }
|
|
435
|
+
* });
|
|
436
|
+
*
|
|
437
|
+
* // Listen to custom button clicks:
|
|
438
|
+
* BackgroundGeolocation.onNotificationAction((buttonId) => {
|
|
439
|
+
* console.log("[onNotificationAction] - ", buttonId);
|
|
440
|
+
* switch(buttonId) {
|
|
441
|
+
* case "notificationButtonPause":
|
|
442
|
+
* BackgroundGeolocation.changePace(false);
|
|
443
|
+
* break;
|
|
444
|
+
* .
|
|
445
|
+
* .
|
|
446
|
+
* .
|
|
447
|
+
* }
|
|
448
|
+
* });
|
|
449
|
+
* ```
|
|
450
|
+
*/
|
|
451
|
+
actions?: Object;
|
|
452
|
+
|
|
453
|
+
/**
|
|
454
|
+
* Configure the name of the plugin's notification-channel used to display the [[Config.foregroundService]] notification.
|
|
455
|
+
* @break
|
|
456
|
+
*
|
|
457
|
+
* On Android O+, the plugin's foreground-service needs to create a "Notification Channel". The name of this channel can be seen in:
|
|
458
|
+
* > `Settings->App & Notifications->Your App.`
|
|
459
|
+
*
|
|
460
|
+
* Defaults to your application's name from `AndroidManifest`.
|
|
461
|
+
*
|
|
462
|
+
* \
|
|
463
|
+
*
|
|
464
|
+
*
|
|
465
|
+
* @example
|
|
466
|
+
* ```typescript
|
|
467
|
+
* BackgroundGeolocation.ready({
|
|
468
|
+
* notification: {
|
|
469
|
+
* channelName: "Location Tracker"
|
|
470
|
+
* }
|
|
471
|
+
* });
|
|
472
|
+
*
|
|
473
|
+
* // or with #setConfig
|
|
474
|
+
* BackgroundGeolocation.setConfig({
|
|
475
|
+
* notification: {
|
|
476
|
+
* channelName: "My new channel name"
|
|
477
|
+
* }
|
|
478
|
+
* });
|
|
479
|
+
* ```
|
|
480
|
+
*/
|
|
481
|
+
channelName?: string;
|
|
482
|
+
|
|
483
|
+
}
|
|
484
|
+
}
|