Pin Dialog
PhoneGap numeric password dialog plugin for Android and iOS.
Requires Cordova plugin: cordova-plugin-pin-dialog. For more info, please see the Pin Dialog plugin docs.
Repo: https://github.com/Paldom/PinDialog
Installation
- Install the Cordova and Ionic Native plugins:
$ ionic cordova plugin add cordova-plugin-pin-dialog $ npm install --save @ionic-native/pin-dialog@4 - Add this plugin to your app's module
 
Supported platforms
- Android
 - iOS
 
Usage
import { PinDialog } from '@ionic-native/pin-dialog';
constructor(private pinDialog: PinDialog) { }
...
this.pinDialog.prompt('Enter your PIN', 'Verify PIN', ['OK', 'Cancel'])
  .then(
    (result: any) => {
      if (result.buttonIndex == 1) console.log('User clicked OK, value is: ', result.input1);
      else if(result.buttonIndex == 2) console.log('User cancelled');
    }
  );
Instance Members
prompt(message, title, buttons)
Show pin dialog
| Param | Type | Details | 
|---|---|---|
| message | 
      string
     | 
    
       Message to show the user  | 
  
| title | 
      string
     | 
    
       Title of the dialog  | 
  
| buttons | 
      string[]
     | 
    
       Buttons to show  | 
  
  Returns: Promise<{ buttonIndex: number, input1: string }>