Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable Notification Sound and Vibration in Android #260

Closed
mrtalley opened this issue Aug 7, 2018 · 1 comment · Fixed by mauron85/background-geolocation-android#9
Closed

Comments

@mrtalley
Copy link

mrtalley commented Aug 7, 2018

Your Environment

  • Plugin version: 0.5.0-alpha.35
  • Platform: Android
  • React Native version: 0.55.4
  • Plugin configuration options:
{
    notificationTitle: "some-title",
    notificationText: "Posting your location",
    startForeground: false,
    debug: false,
}

Context

When I begin tracking location, I receive a push notification on Android with a sound and vibration. The notification is desired, but I wish to disable the sound and vibration. From everything I can find, this is not possible as of the current version.

Expected Behavior

I enable location tracking and silently receive a persistent notification in the Android status bar.

Actual Behavior

I enable location tracking and receive a sound and vibration as well as a persistent notification in the Android status bar.

Possible Fix

Add a configuration option to either turn off notifications from this library entirely, or to turn off sound and vibration.

If going the route of muting sound, it looks like you set notification priority to IMPORTANCE_DEFAULT. Changing it to IMPORTANCE_LOW should solve the issue.

Context

I am trying to silently put a persistent notification in the Android status bar that tells the user their location is being tracked in the background. I want the option to either disable sound and vibration or to disable the notification entirely.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants