I am bit new to cordova & ionic and I am building a simple fingerprint authentication app.
I am using the plugin from ionic native on ionic 1. It will just have a button which will open the fingerprint authentication dialog. but on no matter what device I run it is going to error call back function and giving error message missing required parameters
my index.html:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
<title></title>
<link rel="manifest" href="manifest.json">
<link href="lib/ionic/css/ionic.css" rel="stylesheet">
<link href="css/style.css" rel="stylesheet">
<script src="lib/ionic/js/ionic.bundle.js"></script>
<script src="www/lib/ngCordova/dist/ng-cordova.js"></script>
<script src="lib/ionic-native/ionic.native.js"></script>
<script src="cordova.js"></script>
<script src="js/app.js"></script>
</head>
<body ng-app="starter">
<ion-pane>
<ion-header-bar class="bar-stable">
<h1 class="title">Ionic Blank Starter</h1>
</ion-header-bar>
<ion-content ng-controller="ExampleController">
<button class="button" ng-click="authenticate()">Authenticate</button>
</ion-content>
</ion-pane>
</body>
</html>
My app.js:
angular.module('starter', ['ionic', 'ionic.native'])
.controller("ExampleController", function($scope, $cordovaAndroidFingerprintAuth ) {
$scope.authenticate = function(){
$cordovaAndroidFingerprintAuth.isAvailable(function(result) {
alert('finger print scanner is available');
},
function(message) {
alert("Cannot detect fingerprint device : "+ message);
})
}
});
Thanks in advance.
The clientId property is missing, as it is required to be set according to this native code before a PluginResult Object is returned:
// some code
I got the source from here.
Hope it helps and merry christmas!