i want to make a password prompt in phonegap. any plugins or html/js snippet
i have tried
function onPrompt(results) {
alert("You selected button number " + results.buttonIndex + " and entered " + results.input1);
}
// Show a custom prompt dialog
//
function showPrompt() {
navigator.notification.prompt(
'Please enter your name', // message
onPrompt, // callback to invoke
'Registration', // title
['Ok','Exit'] // buttonLabels
);
}
but it doesnt have any option for password
You just need to add one line in
App Name\platforms\android\src\org\apache\cordova\dialogs\Notification.java
You need to look at the native code to display password promt. As I never need a "normal prompt", I have changed the code in the phonegap plugins for iOS and android but I am sure there is a better way to do it.
for iOS in Plugins/CDVNotification.m
and for android in src/org/apache/cordova/dialogs/notification.java