Check if permission has been granted, if so, activate the camera
This commit is contained in:
parent
170a7f9c6e
commit
a0b0f1a30b
1 changed files with 8 additions and 2 deletions
|
|
@ -60,8 +60,14 @@ angular.module('copayApp.controllers').controller('tabScanController', function(
|
||||||
});
|
});
|
||||||
|
|
||||||
$scope.$on("$ionicView.afterEnter", function() {
|
$scope.$on("$ionicView.afterEnter", function() {
|
||||||
// try initializing and refreshing status any time the view is entered
|
var capabilities = scannerService.getCapabilities();
|
||||||
scannerService.gentleInitialize();
|
if (capabilities.hasPermission) {
|
||||||
|
// try initializing and refreshing status any time the view is entered
|
||||||
|
if(!scannerService.isInitialized()) {
|
||||||
|
scannerService.gentleInitialize();
|
||||||
|
}
|
||||||
|
activate();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
function activate(){
|
function activate(){
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue