Need Help! Knox Enrollment Service Preventing Camera Access

Hello Fellow developers!
I was creating an app in which i was trying to use barcode scanner. unfortunately the app is not opening camera i keep getting error in most cell phones!(does work in hardly 1-2 devices tried only on samsung devices).
Below is small program i made to test,

Below is error i keep getting

I tried giving the permission to open camera drom apps settings but still dont work. Any help is deeply appreciated.


This looks like a corporate / admin thing to manage and control employee's devices (much the same as you can do in G Suite)

You may need to talk to you IT tech's about this, if the camera is locked down in some way....

Change QR Code reader use for example Barcode scanner ZXing Team

gives the same problem.
Did anyone found a solution?

Did you try any of the suggested fixes ?

Hi, I tried the fixes but it did not help.
What to do is this.
The set barcodeScanner1 MUST be set to false.
(If set to true it does not find my external scanner. No Idea for what this is usefull :thinking: )

1 Like

from the documentation

Set whether or not you wish to use an External Scanning program such as Bar Code Scanner. If false a version of ZXing integrated into App Inventor will be used.

which external scanner are you trying to use?
which device and Android version are you using for your tests?
according to the documentatin, you have to set UseExternalScanner to true if you like to use an external scanner


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by icon24 Taifun.

Thanks Taifun. I got to work the internal scanner. Thats why my answer is late.

I read this and after all I understand the meaning of this. :roll_eyes: But I prefer explications one can understand before being familiar with it.
in fact, all the reference is very short. Much I cannot use for learning, only for remembering.

I guess, the MIT App Inventor team is very much open to improvements...
so what is your suggestion to make the documentation clearer?


MUST be set! Set TRUE to choose an External Scanning program such as Bar Code Scanner or FALSE to choose the internal Scanner.

By the way: I work with the internal scanner. The problem with KNOX I couldn't resolve. :frowning_face:
By not getting a reponse from Knox and having a solution I will do it later if necessary. :smirk:

well, the default value is TRUE... so no need to set it...
I will assign this thread to @ewpatton and probably this will be updated in the documentation to make it clearer... thank you for your feedback!


Are you still working on the Knox capture?
The engine is very powerful and very fast.

Regards benoit

MUITO OBRIGADA <3 isso salvou meu trabalho
THANK YOU SO MUCH <3 this saved my work