4

In Cordova, how do I detect if a device has the Huawei App Gallery?

peterdest
  • 285
  • 3
  • 11

1 Answers1

3

You are advised to add cordova-plugin-appavailability in cordova plugin, and then check whether the AppGallery package exists.

appAvailability.check("com.huawei.appmarket",function () {
alert('Huawei App market exist');
},function () {
alert('There is no Huawei App market');
});
zhangxaochen
  • 32,744
  • 15
  • 77
  • 108