开发者

Accessing the front-facing camera (FFC) on Samsung Galaxy Tab (Android 2.2)

开发者 https://www.devze.com 2023-03-01 03:40 出处:网络
I\'m working on an Android application that need access to the front-facing camera on Samsung Galaxy Tab, with Android 2.2 (Froyo). As I\'ve read from some forums, there is official support for the fr

I'm working on an Android application that need access to the front-facing camera on Samsung Galaxy Tab, with Android 2.2 (Froyo). As I've read from some forums, there is official support for the front camera, but only for the 2.3 version. I've read also that Samsung developed an API that makes use of the front camera, but I couldn't find anything about it.

I'd like to know if there is any way of accessing the front camera in the 2.2 version in the Samsung Galaxy Tab.

开发者_开发百科

Thanks in advance,

Hugo


Edit - Oops this is for API level 9, so it won't work on Android 2.2

You can check for the number of cameras supported by using this API -

public static int getNumberOfCameras ()

Using the id retuned by the above api open that particular camera using the API -

public static Camera open (int cameraId) 

More info here


The answer at Can I take a picture using the front camera on Samsung Galaxy Tab (Android 2.2) ? worked for me. I check Build.VERSION.SDK_INT to see which set of calls I need to make.

0

精彩评论

暂无评论...
验证码 换一张
取 消