Closed francelaquino closed 5 years ago
Chinese device manufacturers, such as Huawei are horrible when it comes to foreground-services. Their flavour of Android is far too aggressive killing foreground-services. Yes, the plugin's foreground-service is subscribed to the MotionActivity API (which consumes little power) in order to determine when the device is moving so it can know when to run on location-services and begin tracking (and importantly so it can know when the device is no longer moving, so it can turn off location-services).
Try this:
The music should continue playing.
Yes, the music still playing. May I know your point? (sorry)
Is my config needs adjustment to fix the issue?
Yes, the music still playing. May I know your point? (sorry)
Because the plugin runs a foreground-service just as a music player does. Some Chinese devices actually stop playing music when the player app is terminated, OnePlus, I think.
Keep your music player playing and see if the OS eventually terminates it.
Quite often, the solution to prevent the plugin's tracking service stopping is the same for people searching for "Why is my music player stopping?"
Our app is working fine, except huawei, do you have idea or workaround that we can do to solve the issue.
I have a Huawei P20 arriving today.
See this comment
Your Environment
react-native -v
): ^0.55.4Plugin config BackgroundGeolocation.ready({
Expected Behavior
The app should run continuously in foreground or background
Actual Behavior
The mobile is stopping the app even though there is enough battery. It also show a message app is frequently positioning
Context
I also download the sample application from play store and let it run, its show a message BG Geolocation is consuming power in the background, then after a while the app stops working.
So far all this happens using Huawei