4 Replies Latest reply on Sep 7, 2017 1:22 PM by Matthew Rush

    Camera API not working in EB 1.7 for MC92N0 Android

    Matthew Rush

      I'm testing a demo MC92N0 unit we've received from Zebra for the purpose of taking photos in Enterprise Browser using the camera API. The demo unit runs Android 4.4.4 with the SE4750SR Imager and has 1GB RAM (the configuration is MC92N0-GL0SYEAA6WR).

       

      However, I'm not able to get the Camera API sample to work:

      http://techdocs.zebra.com/enterprise-browser/samples/camera/CameraCommonAPI.html

       

      I've installed Enterprise Browser 1.7 onto the unit and copied the Camera API sample onto the device (into Android/data/com.symbol.enterprisebrowser). The page displays, but nothing happens when I press "Enumerate Camera". Further investigation shows that "EB.Camera" is defined but the call to "EB.Camera.enumerate()" is returning null.

       

      I've enabled all logging in Config.xml and I can see a log entry that says "CameraSingletonObject| Number of cameras: 0", which seems to indicate that no cameras are being found.

       

      If I modify the sample and try to call "EB.Camera.getAllProperties()" to see more information, I find the following exception is logged:

      java.lang.NullPointerException

        at com.rho.camera.CameraBase$getAllPropertiesTask.run(CameraBase.java:1161)

        at com.rhomobile.rhodes.api.MethodExecutor.run(MethodExecutor.java:11)

        at com.rhomobile.rhodes.extmanager.RhoExtManagerImpl.nativeJSCallEntryPoint(Native Method)

        at com.rhomobile.rhodes.extmanager.RhoJSApi.apiCall(RhoJSApi.java:13)

        at com.android.org.chromium.base.SystemMessageHandler.nativeDoRunLoopOnce(Native Method)

        at com.android.org.chromium.base.SystemMessageHandler.handleMessage(SystemMessageHandler.java:28)

        at android.os.Handler.dispatchMessage(Handler.java:102)

        at android.os.Looper.loop(Looper.java:136)

        at android.os.HandlerThread.run(HandlerThread.java:61)

       

      By comparison, I have another MC92N0 unit running Windows CE with the SE4600 Long Range Imager (the configuration is MC92N0-G90SYEYA6WR) and it successfully runs the sample webpage and I can capture a photo with it.

       

      I see there is a post (https://developer.zebra.com/message/90795) that says "the EMDK does not allow image capture via the Imager" with regards to Android, so I'm wondering if this is simply not possible with this Android MC92N0 unit using Enterprise Browser (but would be with Windows CE)? Otherwise, I don't understand why this isn't working, and any help would be appreciated.

       

      Thanks,

      Matthew