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

Is it possible to start the service without displaying a notification? #16

Closed
gabriel1lima opened this issue Mar 5, 2020 · 1 comment
Labels
good first issue Good for newcomers question Question about any part of the module

Comments

@gabriel1lima
Copy link

No description provided.

@Rapsssito Rapsssito added good first issue Good for newcomers question Question about any part of the module labels Mar 5, 2020
@Rapsssito
Copy link
Owner

Rapsssito commented Mar 5, 2020

@gabriel1lima, sadly it is not possible to start the service without having the notification on Android. Taken from the Android Developer Docs:

A foreground service is a service that the user is actively aware of and isn't a candidate for the system to kill when low on memory. A foreground service must provide a notification for the status bar, which is placed under the Ongoing heading. This means that the notification cannot be dismissed unless the service is either stopped or removed from the foreground.

Since RN Headless JS extends the Android native Service class and react-native-background-actions allows your background action to run also on the foreground, any action you create will be considered a foreground service.

@Rapsssito Rapsssito pinned this issue Mar 5, 2020
@Rapsssito Rapsssito changed the title Is it possible to start the service without having to show the notification? Is it possible to start the service without a notification? Mar 5, 2020
@Rapsssito Rapsssito changed the title Is it possible to start the service without a notification? Is it possible to start the service without displaying notification? Mar 5, 2020
@Rapsssito Rapsssito changed the title Is it possible to start the service without displaying notification? Is it possible to start the service without displaying a notification? Mar 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers question Question about any part of the module
Projects
None yet
Development

No branches or pull requests

2 participants