Open yaodaibao opened 4 years ago
there is no description ....
@acarkaan @yaodaibao any information on this? is there any other library that we can use or any native implementation?
ı 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.
@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?
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
can you share the complete react-native code implementation??
Can't find a way to create foreground service, i just created a notification,is someone now how to create it