-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
plugin lines 5 and 25 :
var pm = com.tns.NativeScriptApplication.getInstance().getPackageManager();
are failing with
TypeError: Cannot read property 'getPackageManager' of null
I worked around it by only using the plugin for ios und using adapting the code for android to the following:
try {
const pm: android.content.pm.PackageManager = (app.android.context as android.content.Context).getPackageManager();
pm.getPackageInfo(appName, 0); // will fail, if appName is not installed as package
isAppAvailable = true;
} catch (error) {
isAppAvailable = false;
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels