Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Detect if a device has access to Huawei App Gallery with Cordova

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

like image 475
peterdest Avatar asked Dec 19 '20 13:12

peterdest


1 Answers

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');
});
like image 87
shirley Avatar answered Oct 20 '22 06:10

shirley