# Barcode scanner plugin is not working in android Marshmallow ionic

**URL:** <https://forum.ionicframework.com/t/barcode-scanner-plugin-is-not-working-in-android-marshmallow-ionic/68103>\
**Category:** ionic-v1\
**Created:** [October 25, 2016, 5:08am UTC](https://forum.ionicframework.com/t/barcode-scanner-plugin-is-not-working-in-android-marshmallow-ionic/68103 "2016-10-25T05:08:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mohanapriya](https://avatars.discourse-cdn.com/v4/letter/m/3ec8ea/32.png) [@mohanapriya](https://forum.ionicframework.com/u/mohanapriya)\
**Post date:** [October 25, 2016, 5:08am UTC](https://forum.ionicframework.com/t/barcode-scanner-plugin-is-not-working-in-android-marshmallow-ionic/68103/1 "2016-10-25T05:08:31Z")

</div>

I am developing my ionic app using ngCordova. I have installed camera plugin by using,

`cordova plugin add org.apache.cordova.camera`

Then, I have installed barcode scanner plugin by using,

`cordova plugin add https://github.com/phonegap/phonegap-plugin-barcodescanner.git`

While running my ionic app it’s asking for camera permission. I have allowed the permission also.  
so, I can able to capture the image.

But, by opening the barcode scanner,

```
    $cordovaBarcodeScanner.scan().then(function(imageData) {
        alert(imageData.text);
        alert("Barcode Format -> " + imageData.format);
        alert("Cancelled -> " + imageData.cancelled);
    }, function(error) {
        alert("An error happened -> " + error);
    });

```

I can able to opening scanner. I am not able to get the result. scanner is not scanning the barcode…

I tried to degrade the android sdk version as 22 also,

`<uses-sdk android:minSdkVersion="16" android:targetSdkVersion="22" />`

not working for me !!!

**The same plugin is working for me for android 5+ versions.**

**Anyone help will be Appreciated!!!**

---

<div class="post-metadata">

**Author:** ![alibahjat](https://avatars.discourse-cdn.com/v4/letter/a/7ba0ec/32.png) [@alibahjat](https://forum.ionicframework.com/u/alibahjat)\
**Post date:** [August 23, 2017, 8:06pm UTC](https://forum.ionicframework.com/t/barcode-scanner-plugin-is-not-working-in-android-marshmallow-ionic/68103/2 "2017-08-23T20:06:07Z")

</div>

hello do you find solution for this problem ?
