0

Hi
i am new to android
my problem is i want to build a camera app for that i just follow the instructions on Android Developers(so i am not putting the code here).I take most of the code in the website why because first of all i want to test it then i want to build my app.But it gives error in log cat as below

W/System.err(13409): java.lang.RuntimeException: Fail to connect to camera service
W/System.err(13409): at android.hardware.Camera.native_setup(Native Method)
W/System.err(13409): at android.hardware.Camera.<init>(Camera.java:300)
W/System.err(13409): at android.hardware.Camera.open(Camera.java:259)
W/System.err(13409): at com.example.testcamera.CameraActivity.getCameraInstance(CameraActivity.java:52)

I am testing on HTC and Samsung Mobiles which contains Android-2.3.5 and Android-2.3.6 respectively.

So anybody please help me

Thanks in advance

rolfl
  • 17,539
  • 7
  • 42
  • 76
PrasadGeek
  • 21
  • 4

1 Answers1

0

Did you add this to your Android Manifest?

<uses-permission android:name="android.permission.CAMERA" />
 <uses-feature android:name="android.hardware.camera" />
Judit
  • 57
  • 1
  • 6