在android开发中,怎样能够调用系统自带相机,而禁止出现选择第三方相机的选项?

如题所述

打开系统相机方法: 1、 使用打开系统相机package,但有的手机相机名称不是这个默认名称 Intent intent = getPackageManager().getLaunchIntentForPackage(“com.android.camera”); startActivity(intent); 2、 使用相机ACTION,打开相机应用 Intent intentCamera = new Intent(); intentCamera.setAction("android.media.action.STILL_IMAGE_CAMERA"); startActivity(intentCamera);
温馨提示:内容为网友见解,仅供参考
第1个回答  2012-11-29
Intent i = new Intent(Intent.ACTION_CAMERA_BUTTON, null);
this.sendBroadcast(i);
第2个回答  2012-12-03
Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
startActivityForResult(intent, null);
相似回答