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

how to run the actual code in the foreground service? #31

Open
yaodaibao opened this issue Oct 23, 2020 · 7 comments
Open

how to run the actual code in the foreground service? #31

yaodaibao opened this issue Oct 23, 2020 · 7 comments

Comments

@yaodaibao
Copy link

No description provided.

@yaodaibao
Copy link
Author

Can't find a way to create foreground service, i just created a notification,is someone now how to create it

@acarkaan
Copy link

there is no description ....

@prayaslashkari
Copy link

@acarkaan @yaodaibao any information on this? is there any other library that we can use or any native implementation?

@acarkaan
Copy link

ı think that when u use foreground fore-service on an app ur tasks will complate on background mode too. so u can add your code to the app normally and everything is ok.

@prayaslashkari
Copy link

@acarkaan I tried that but isn't working.

I mean I started the foreground service and executed my code right after that. It wasnt working.
Any workaround?

@AxelHgt
Copy link

AxelHgt commented May 29, 2021

Hi, to make it work you need to add the proper config in the AndroidManifest file:
ex:
<service android:name="com.voximplant.foregroundservice.VIForegroundService" android:foregroundServiceType="location" android:exported="false"> </service>
Once i added the "foregroundServiceType" key i was able to run the code in background. (In my case it's location update)

However i haven't tested it over a long period of time

@shuklaharshit
Copy link

can you share the complete react-native code implementation??

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

No branches or pull requests

5 participants