Skip to content

Greeting a user with "CustomToast" is something that could be done in JavaScript. This plugin provides a simple example demonstrating how Cordova plugins work.

Notifications You must be signed in to change notification settings

praveen2gemini/cordova-plugin-mytoast

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Cordova CustomToast Plugin

Simple plugin that returns your string in Android native Toast message.

Greeting a user with "CustomToast" is something that could be done in JavaScript. This plugin provides a simple example demonstrating how Cordova plugins work.

Using

Clone the plugin

$ git clone https://github.com/praveen2gemini/cordova-plugin-mytoast.git

Create a new Cordova Project

$ cordova create CustomToast com.custom.CustomToast MyToast

Install the plugin

$ cd CustomToast
$ cordova plugin install ../cordova-plugin-mytoast

Edit www/js/index.js and add the following code inside onDeviceReady

    var success = function(message) {
        alert(message);
    }

    var failure = function() {
        alert("Error calling in MyToast Plugin");
    }

    mytoast.my_toast("This is my first toast message!", success, failure);

Install on Android platform

  cordova platform add android

Run the code

cordova run 

More Info

For more information on setting up Cordova see the documentation

For more info on plugins see the Plugin Development Guide

About

Greeting a user with "CustomToast" is something that could be done in JavaScript. This plugin provides a simple example demonstrating how Cordova plugins work.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published