Camera API not working in EB 1.7 for MC92N0 Android

// Expert user has replied.
M Matthew Rush 3 years 4 months ago
28 2 0

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/CameraCommo…
 
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

Please Register or Login to post a reply

2 Replies

J Joydeep Chakraborty

Hi Mathew,
MC92N0 does not have Color Camera.
That is why Camera API is not supported on that device. Please test with some other device.

If you want to take photo with Blockbuster imager(which is used to scan the barcode) then use legacy Imager APIs.
http://techdocs.zebra.com/enterprise-browser/1-7/api/re2x/imager/

Regards,
Joydeep

M Matthew Rush

To clarify, yes I'm testing the SE4750SR imager on the demo unit to use as a camera.

As I said, the camera API sample app *does* work for our MC92N0 that runs Windows CE with the SE4600 Long Range Imager. The sample successfully captures a black and white image from the SE4600 imager on that unit.

I've now tried the RhoElements Camera 2.2 API sample app on the Android unit:
http://techdocs.zebra.com/enterprise-browser/samples/camera/Camera2.2AP…

This also doesn't appear to work.

And I've also tried the EB feature demo on the Android unit:
http://techdocs.zebra.com/enterprise-browser/1-7/guide/featuredemo/

Nothing happens when I press "Show Camera" (and other demos work ok).

It doesn't appear that using the legacy Imager API makes any difference on the Android unit, and I'm wondering if using the imager as a camera (whether via the Camera or Imager API) is supported at all on Android?

CONTACT
Can’t find what you’re looking for?