react-native-background-geolocation icon indicating copy to clipboard operation
react-native-background-geolocation copied to clipboard

[CHANGEME] this app collects location data for FEATURE X and FEATURE Y

Open brandtiwari007 opened this issue 2 years ago • 12 comments

How can I change this message, and from where this message is triggering automatically in android

brandtiwari007 avatar Mar 16 '22 12:03 brandtiwari007

See Config.backgroundPermissionRationale

christocracy avatar Mar 16 '22 12:03 christocracy

I've tried this and the message remains. Do I need to do anything else?

grubstarstar avatar Mar 19 '22 08:03 grubstarstar

Likely because you sent reset: false to .ready, causing your Config changes to be ignored.

christocracy avatar Mar 19 '22 09:03 christocracy

Doesn't seem to be that, this is my config.

await BackgroundGeolocation.ready({
	locationAuthorizationRequest: 'WhenInUse',
	backgroundPermissionRationale: {
		title: "Allow {applicationName} to access to this device's location when closed or not in use?",
		message:
			"If you would like to receive a notification when you are at an {applicationName} compatible venue then you'll need to enable {backgroundPermissionOptionLabel} location permission",
		positiveAction: 'Change to {backgroundPermissionOptionLabel}',
		negativeAction: 'Cancel',
	},
	disableLocationAuthorizationAlert: true,
	geofenceModeHighAccuracy: true,
	desiredAccuracy: BackgroundGeolocation.DESIRED_ACCURACY_NAVIGATION,
	distanceFilter: 5,
	stopTimeout: 5,
	foregroundService: true,
	debug: config.DEBUG_LOCATION_SOUNDS === 'true',
	logLevel: __DEV__ ? BackgroundGeolocation.LOG_LEVEL_VERBOSE : BackgroundGeolocation.LOG_LEVEL_OFF,
	stopOnTerminate: false,
	startOnBoot: true,
	geofenceInitialTriggerEntry: false,
	isMoving: true,
	transistorAuthorizationToken,
})

grubstarstar avatar Mar 19 '22 09:03 grubstarstar

I'm also trying to find the text "CHANGEME" or "FEATURE" in either the react-native-background-geolocation-android, or react-native-background-fetch modules but can't find it. Is this a dialog triggered by Android itself or the RNBGL module?

grubstarstar avatar Mar 19 '22 09:03 grubstarstar

Should I create a new issue for this?

grubstarstar avatar Mar 19 '22 09:03 grubstarstar

Then you are calling getCurrentPosition() before .ready() resolves.

christocracy avatar Mar 19 '22 11:03 christocracy

ah okay, that could very well be it. I will take a look. Thanks.

grubstarstar avatar Mar 19 '22 11:03 grubstarstar

You aren’t supposed to call .start() until .ready() resolves.

the plugin is not ready until .ready() resolves. It is called ready on purpose.

christocracy avatar Mar 19 '22 13:03 christocracy

Could this result from calling getProviderState before .ready() resolves? Is it safe to say that no methods from the plugin should be used until after .ready() resolves?

papa-jake avatar Mar 31 '22 14:03 papa-jake

Could this result from calling getProviderState before

No.

Is it safe to say that

No. Only methods which request location. .start(), .getCurrentPosition(). Those methods will request location permission.

Your Config provided to .ready() is not consumed until .ready() resolves.

If you cause the plugin to request permission before your Config is applied, then the plugin will use its current default values.

christocracy avatar Mar 31 '22 14:03 christocracy

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. You may also mark this issue as a "discussion" and I will leave this open.

stale[bot] avatar Jun 12 '22 19:06 stale[bot]

Closing this issue after a prolonged period of inactivity. Fell free to reopen this issue, if this still affecting you.

stale[bot] avatar Sep 21 '22 04:09 stale[bot]