java - Android 2.2 front camera -


android 2.2 want open front camera , take picture. use code:

private camera getfrontcamera() {     camera camera = camera.open();     if (camera == null) {         return null;     }     packagemanager pm = context.getpackagemanager();     if (pm.hassystemfeature("android.hardware.camera.front")) {         parameters params = camera.getparameters();         params.set("camera-id", 2);         camera.setparameters(params);     }     return camera; } 

but since have not worked. how enable front camera on android 2.2?

there no android 2.2 phones shipped front facing camera - first android phones did have front facing camera started android 2.3 - gingerbread per new features of android 2.3.


Comments

Popular posts from this blog

python - mat is not a numerical tuple : openCV error -

c# - MSAA finds controls UI Automation doesn't -

wordpress - .htaccess: RewriteRule: bad flag delimiters -