android - Ionic vibration not working -
that question old i've found no working answer in of similar questions.
basically, have code in app.js:
angular.module('starter', ['ionic', 'ngcordova']) .run(function($ionicplatform) { $ionicplatform.ready(function() { if(window.cordova && window.cordova.plugins.keyboard) { cordova.plugins.keyboard.hidekeyboardaccessorybar(true); cordova.plugins.keyboard.disablescroll(true); } if(window.statusbar) { statusbar.styledefault(); } }); }) .controller('testctrl', function($scope, $cordovavibration){ $scope.test = function(){ $cordovavibration.vibrate(1000); }; });
i'm trying make phone vibrate pressing button using function test on controller. function being called correctly, phone doesn't vibrate.
the project builds without errors, , apparently cordova plugin fine. phone not muted. idea of doing wrong?
Comments
Post a Comment