react-native-background-geolocation icon indicating copy to clipboard operation
react-native-background-geolocation copied to clipboard

not working on android without GMS (google mobile service )

Open omernaser opened this issue 5 years ago • 15 comments

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

omernaser avatar May 26 '20 16:05 omernaser

This plugin has no support for Huawei's HMS.

christocracy avatar May 26 '20 16:05 christocracy

please refer to the following image for more info image this is the file of is exist on TSLocationManager

image

and we have the sample importing on huawei as this

import com.huawei.hms.location.LocationServices; import com.huawei.hms.location.FusedLocationProviderClient; import com.huawei.hms.location.LocationRequest; import com.huawei.hms.location.LocationResult; import com.huawei.hmf.tasks.Tasks;

omernaser avatar May 26 '20 16:05 omernaser

I won't be supporting HMS any time soon.

christocracy avatar May 26 '20 16:05 christocracy

can you advice if can i make it in workaround way

omernaser avatar May 26 '20 16:05 omernaser

can you advice if can i make it in workaround way

I have no advice.

christocracy avatar May 26 '20 16:05 christocracy

Do you know of any react-native plugin supporting HMS currently?

christocracy avatar May 26 '20 16:05 christocracy

no , but i am on huawei team if we can help in any thing to make it faster please let me know

omernaser avatar May 26 '20 16:05 omernaser

I HATE Huawei devices. They're the absolute worst devices on earth for background-services. Have you seen http://dontkillmyapp.com?

christocracy avatar May 26 '20 17:05 christocracy

i got it i will contact with my team if they can help on this issue

omernaser avatar May 26 '20 17:05 omernaser

Let me know when Huawei allows foreground-services to run as documented in Android API without app developers being forced to instruct their users to modify a long list of various settings to allow background-location tracking to work.

Then I might be interested in supporting HMS. Until then, the fewer people using Huawei devices, the better.

christocracy avatar May 26 '20 17:05 christocracy

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. You may also mark this issue as a "discussion" and I will leave this open.

stale[bot] avatar Jul 26 '20 14:07 stale[bot]

Closing this issue after a prolonged period of inactivity. Fell free to reopen this issue, if this still affecting you.

stale[bot] avatar Aug 02 '20 16:08 stale[bot]

Hi. I have a similar issue with a few of my paid users that are using Huawei phone. In my apps, I am using this library to acquire their location.

I found this https://developer.huawei.com/consumer/en/doc/development/HMS-Guides/location-description-rn-v4

Would it be something possible for the library to use it to support for HMS phone?

"instruct their users to modify a long list of various settings" would still be acceptable for me as it's their choice to use this phone model and I think it's fine considering they already doing some extra steps to download apps not in Huawei App Gallery.

But it would be best if we can at least get the location for them from my apps, even though they have to do some prior settings themselves.

deveasywork avatar Sep 24 '20 01:09 deveasywork

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

christocracy avatar Feb 03 '23 17:02 christocracy

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: ╚═════════════════════════════════════════════

christocracy avatar Feb 18 '23 14:02 christocracy

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] avatar Jun 14 '24 01:06 github-actions[bot]

This issue was closed because it has been inactive for 14 days since being marked as stale.

github-actions[bot] avatar Jun 28 '24 01:06 github-actions[bot]