After adding a Cordova plugin using meteor add cordova:org.apache.cordova.dialogs@0.2.10
, I see this plugin installed using meteor list
.
However on the desktop browser console, I can't seem to find any methods exposed by cordova:org.apache.cordova.dialogs
, such as navigator.notification.alert
. How do we do something like
navigator.notification.confirm(
'Hello there',
onConfirm,
'Welcome',
['Hey']
)
Also tried cordova:org.apache.cordova.device@0.2.12
and the device
object the plugin is supposed to expose globally cannot be found.
Meteor.startup(function() {
console.log(device.cordova) // Uncaught ReferenceError: device is not defined
})
The whole point of Cordova plugins is to give your JavaScript code access to some device-specific native features on mobile.
The features from Cordova plugins are not available on browsers.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.