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

javascript - How to synchronize the Three.js and HTML/SVG coordinate systems (especially w.r.t. the y-axis)? -

javascript - How do I find how many occurences are there of a highlighted string, and which occurence is it? -

java - Reading data from multiple zip files and combining them to one -