react-native-background-geolocation: not working on android without GMS (google mobile service )

a lot of our client use this plugin and can’t work on huawei device bcz its HMS Base we need to make a integration with Huawei mobile service we have the same functionality of google and the same method and event name but we need to change the importing of google can any one help us on this issue i think its a easy thing but we don’t have access to the core code please advice

Your Environment

  • Plugin version:latest
  • Platform: Android
  • OS version:androdi 10,9
  • Device manufacturer / model:huawei mate 30 hms (not gms)

Expected Behavior

should works in both HMS and GMS

Actual Behavior

not working in HMS Devices

Steps to Reproduce

1.just run the it on HMS Device you will see the error at the log

Context

About this issue

  • Original URL
  • State: open
  • Created 4 years ago
  • Comments: 15 (8 by maintainers)

Most upvoted comments

Who wants to be the first to test Huawei HMS support? Install the plugin from this repo (branch #hms)

$ yarn add https://github.com/transistorsoft/react-native-background-geolocation.git#hms

Unfortunately, I discovered after purchase that my $650 Nova 9 SE does not have a Gyroscope and HMS ActivityRecognition API doesn’t work when Gyroscope is missing. Google Play Services’ ActivityRecognition API will still work with at least an accelerometer.

TSLocationManager: ╔═════════════════════════════════════════════
TSLocationManager: ║ DEVICE SENSORS
TSLocationManager: ╠═════════════════════════════════════════════
TSLocationManager: ╟─ ✅  ACCELEROMETER: {Sensor name="acc_s004_002 Accelerometer Non-wakeup", vendor="Kionix", version=132096, type=1, maxRange=78.45318, resolution=0.0023928226, power=0.145, minDelay=2500}
TSLocationManager: ╟─ ⚠️  GYROSCOPE:  none.  Motion-detection system performance will be degraded
TSLocationManager: ╟─ ✅  MAGNETOMETER: {Sensor name="mag_s004_001 Magnetometer Non-wakeup", vendor="QST", version=258, type=2, maxRange=4912.0, resolution=0.1, power=1.1, minDelay=10000}
TSLocationManager: ╟─ ✅  SIGNIFICANT_MOTION: {Sensor name="sns_smd  Wakeup", vendor="qualcomm", version=1, type=17, maxRange=1.0, resolution=1.0, power=0.025, minDelay=-1}
TSLocationManager: ╚═════════════════════════════════════════════

I’ve been playing with the Huawei Convertor: Huawei support is coming soon.