Book Image

JavaScript Mobile Application Development

By : Saleh
Book Image

JavaScript Mobile Application Development

By: Saleh

Overview of this book

If you are a native mobile developer, with some familiarity with the common web technologies of JavaScript, CSS, and HTML, or if you are a web developer, then this learning guide will add great value and impact to your work. Learning how to develop mobile applications using Apache Cordova is of particular importance if you are looking to develop applications on a variety of different platforms efficiently.
Table of Contents (10 chapters)
9
Index

Notification

The notification plugin provides the ability to create visual, audible, and tactile device notifications. In order to use the notification plugin in our Apache Cordova project, we need to use the following cordova plugin add command:

> cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-vibration.git
> cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs.git

Demo

In order to access the notification demo, you can click on the Notification list item. You will be introduced to the Notification page. You can click on one of the available buttons to see, hear, and feel the different available notifications. The following screenshot shows the result of clicking on the Show Prompt button, which shows a prompt dialog to have the user input:

Demo

The notification prompt

You also have the option to show an alert message and confirmation dialog. You can vibrate the device by clicking on the Vibrate button, and finally, you can make the device...