react-native-background-geolocation
react-native-background-geolocation copied to clipboard
Allow to customise android-permissions background notification
Hi,
Thank you for your work. Here is a small feature request related to Android permission notification in background.
On Android, if :
- app goes in foreground
- you allow all needed permissions
- app run startTracking()
- app goes in background
- you disallow location permission in app settings
- geolocation is triggered in background
A default permission notification is displayed by android-permissions
, the library you used to manage permissions. It was not possible to customise it before (as you said in this issue), but since android-permissions 2.1.6 it is.
So could you support this notification customisation ?
Thank you.
Your Environment
- Plugin version: 4.13.3
- Platform: Android (LineageOS)
- OS version: 13
- Device manufacturer / model: Pixel 6a
- React Native version (
react-native -v
): 0.66 - Plugin config
{
desiredAccuracy: BackgroundGeolocation.DESIRED_ACCURACY_HIGH,
showsBackgroundLocationIndicator: false,
distanceFilter: 20,
elasticityMultiplier: 2,
locationUpdateInterval: 10000,
stationaryRadius: 50,
stopTimeout: 10,
debug: false,
logLevel: BackgroundGeolocation.LOG_LEVEL_DEBUG,
startOnBoot: true,
batchSync: false,
autoSync: false,
stopOnTerminate: false,
enableHeadless: true,
foregroundService: true,
backgroundPermissionRationale: {
message: t(
'services.geolocationTracking.androidBackgroundPermissionMessage'
)
},
notification: {
title: t('services.geolocationTracking.androidNotificationTitle'),
text: t('services.geolocationTracking.androidNotificationDescription'),
smallIcon: 'mipmap/ic_stat_ic_notification'
}
}
Expected Behavior
A custom icon + title + message for the background permission notification like https://transistorsoft.github.io/react-native-background-geolocation/interfaces/config.html#notification
Actual Behavior
Steps to Reproduce
- app goes in foreground
- you allow all needed permissions
- app run startTracking()
- app goes in background
- you disallow location permission in app settings
- geolocation is triggered in background
Context
/
Debug logs
In emulator i can see the notification but in real device (android version:13) i can't see the notification
Hi @christocracy, did you get a chance to look at my issue?
That is something that would be very nice to have, if you think this is possible @christocracy :pray:
This issue is stale because it has been open for 30 days with no activity.
This issue was closed because it has been inactive for 14 days since being marked as stale.