Shows an Android Toast Notification
- toast.showShort(message);
- toast.showLong(message);
Cancel an Android Toast Notification
- toast.cancel();
- Android
- Apache Ant should be installed an on your path
- The Android SDK must be installed installed.
Ant needs to know the location of the Android SDK. The android tool will create a local.properties file.
$ android update project -p .
$ ant debug install
On the phone or simulator run Toastify
$ ant dist
These instructions assume your project is using PhoneGap-1.9
$ cp dist/phonegap-toast.js into $YOUR_PROJECT/assets/www/
$ cp dist/phonegap-toast.jar into $YOUR_PROJECT/lib
Add the following line to $YOUR_PROJECT/res/xml/plugins.xml
<plugin name="Toasty" value="com.chariotsolutions.toast.plugin.ToastPlugin"/>
Include the JavaScript file in your HTML page
<script type="text/javascript" charset="utf-8" src="phonegap-toast.js"></script>
Require the module in your code
var toast = cordova.require('toast');