Dynamically link packages based on product flavor to support GMS & HMS with one code base

First of all, Huawei does support react-native-maps. Please check here: https://developer.huawei.com/consumer/en/doc/development/HMS-Plugin-Guides-V1/integrating-sdk-0000001050034173-V1

When HMS+GMS is the preferred solution, in the code the APP needs to decide whether to use HMS or GMS based on the availability of HMS and GMS services on the device.

. How to decide whether to use HMS or GMS : enter image description here

  • Check that GMS is available enter image description here

There are also some links for your reference:

React Native Application Detect device support GMS or HMS: https://forums.developer.huawei.com/forumPortal/en/topic/0201200045194610058?fid=0101187876626530001

Choice SDK - an open-source GMS-HMS wrapper: https://forums.developer.huawei.com/forumPortal/en/topic/0201555879126330259?fid=0101187876626530001


You may refer to this.

It's configured in here:

enter image description here

And run the following command:

enter image description here