
I just installed the Barcode Scanner Plugin following exactly the steps at http://ngcordova.com/docs/. So I run ‘ionic run android’ and when I test on my device the scan seems to be ok, but after the scanning the app closes by itself.
Here is my controller code:
.controller('PontuarCtrl', function($scope, $cordovaBarcodeScanner) {
$scope.scanBarcode = function() {
$cordovaBarcodeScanner.scan().then(function(imageData) {
alert('SUCESS: '+imageData);
}, function(err) {
alert('ERROR: '+err);
});
};
})
I’ve searched the web and i found out that its because the scanner changes the orientation of the app when its called. Then I changed the activity orientation in the AndroidManifest.xml but doesnt work 
Someone have dealt with it or have any idea what is happening?
(*Sorry for my english ;x, i’m brazilian…).
