boren-cordova-plugin-toast
v0.2.0
Published
Cordova Toast Plugin
Downloads
2
Maintainers
Readme
boren-cordova-plugin-toast
This plugin provides access to some native toast UI elements
via a global navigator.toast
object.
Although the object is attached to the global scoped navigator
, it is not available until after the deviceready
event.
document.addEventListener("deviceready", onDeviceReady, false);
function onDeviceReady() {
console.log(navigator.toast);
}
Installation
cordova plugin add boren-cordova-plugin-tost
Methods
navigator.toast.toast
navigator.toast.toastShort
navigator.toast.toastLong
Example
function alertDismissed() {
// do something
}
navigator.toast.toast(toastMessageStr, function succes(data){
// TODO
}, function(err){
// TODO
});