With the addition of HarmonyOS, the map that is from google is not available for Huawei devices. If I add the map that Huawei created for its devices, it will not be compatible with Android. Any ideas?
Asked
Active
Viewed 680 times
1
-
You could use a package like like react-native-device-info to detect a Huawei device and show the appropriate map. – Abe Dec 29 '21 at 21:29
1 Answers
1
You can use this plug-in to determine whether your phone is a Huawei devices. The method returns a status code which indicates the HMS Core status on device.
HMSAvailability.isHuaweiMobileServicesAvailable()
.then((res) => { console.log(JSON.stringify(res)) })
.catch((err) => { console.log(JSON.stringify(err)) });

zhangxaochen
- 32,744
- 15
- 77
- 108