开发者

Can I take a picture using the front camera on Samsung Galaxy Tab (Android 2.2) ?

Can I take a picture from the front camera?

My application has an input form for inventory. If an user sends a data,

the user's face pic is also sent to the server for authorization / validation.

I will put the app on Samsung Galaxy Tab (Android 2.2).

Is there any way to take a picture from the front camera开发者_StackOverflow社区?


For 2.2

    Camera cam = Camera.open();
    cam.setDisplayOrientation(90);
    cam.setPreviewDisplay(holder);

    Camera.Parameters para = cam.getParameters();
    para.set("camera-id", 2);
    cam.setParameters(p);


To solve the error:

"The method open() is undefined for the type Camera"

import android.hardware.Camera 

This is instead of

import android.graphics.Camera

Both are given as options from eclipse only hardware one has open.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜