2

I have developed an application, that captures image by its front camera, using a surface view. It is working fine on other phones except Sony phones.
The log cat for Sony phone says

Permission failure:com.sonyericsson.permission.CAMERA_EXTENDED

I have included this permission also, but its not working.

Thanks in advance.

AnujMathur_07
  • 2,586
  • 2
  • 18
  • 25

2 Answers2

1

This permission failure is only a warning; it may prevent using higher resolutions, though. Try 320x240 to begin with, and post more information if this attempt fails.

Alex Cohn
  • 56,089
  • 9
  • 113
  • 307
  • Thanks for the answer, but I'm getting this Permission failure as soon as I call Camera.open(); and also when I call Camera.Parameters parameter = camera.getParameters(); Where camera is an object of Camera. – AnujMathur_07 Nov 17 '12 at 06:54
  • But I will try what you have told and tell you what was the result. – AnujMathur_07 Nov 17 '12 at 06:56
  • Still not able to capture image from sony phone. Still getting the same Permission failure. – AnujMathur_07 Nov 19 '12 at 10:52
  • Are you trying to capture through ACTION_IMAGE_CAPTURE intent? See http://stackoverflow.com/questions/13448731/does-samsung-galaxy-siii-have-a-bug-in-its-camera for a similar problem! – Alex Cohn Nov 19 '12 at 12:52
  • No I'm using the `SurfaceView`. Before starting the preview, I try to initialize my object of Camera class and while trying to do this I get that Permission failure. – AnujMathur_07 Nov 20 '12 at 05:26
0

For those who are working with the new camera HAL introduced in API 21:

I had the same issue for my Sony Xperia Z4 Tablet. The Problem for me was, that i was configuring the flash (to light the scene) with

CaptureRequest.Builder.set(CaptureRequest.CONTROL_AE_MODE, CaptureRequest.CONTROL_AE_MODE_ON_AUTO_FLASH);

This device has no builtin flash, so after removing this it worked fine. I got the same logcat output as you had.