0.2.0 • Published 10 years ago

boren-cordova-plugin-toast v0.2.0

Weekly downloads
-
License
Apache 2.0
Repository
-
Last release
10 years ago

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
});
The others methods' useage is the same as toast method.