Android examples for android.hardware:Open Camera
open Camera via Intent
import android.content.Context; import android.content.Intent; import android.content.pm.PackageManager; public class Main{ public static void openCamera(Context context) { Intent intent = new Intent(); intent.setAction("android.media.action.STILL_IMAGE_CAMERA"); intent.setFlags(0x34c40000);//from ww w . j av a2 s . c o m context.startActivity(intent); } }