3

I've developed an app which has got a service taking snapshots in the background. Whilst this app runs okay in all the devices I've tried so far (not Motorola ones), I found that running it on a Bionic Droid, crashes.

Basically, what I'm doing is:

  • camera = Camera.open();
  • camera.setParameters(parameters);
  • camera.setPreviewDisplay(null);
  • camera.startPreview();
  • camera.takePicture(null,null,callback);

This sequence works with no issues on different HTC and Samsung devices running from Android 2.2 to Android 2.3.4

The Bionic is running 2.3.4 and the takePicture method throws a RuntimeException at android.hardware.Camera.native_takePicture(Native Method)

Also, I've tried removing the call to setPreviewDisplay(null) but it still crashes. Is there any restriction on the Bionic which makes not possible to take a snapshot without a surface?

I've followed all the steps described here: http://developer.android.com/reference/android/hardware/Camera.html

I think that it is an specific bug on motorola devices but, probably, someone can shed some light on this in case it is a more general problem.

Many thanks in advance!

mindless
  • 51
  • 1
  • 3

0 Answers0