赞
踩
打开系统相机方法:
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);
还有使用以下两种的
Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
startActivityForResult(intent, null);
Intent i = new Intent(Intent.ACTION_CAMERA_BUTTON, null);
this.sendBroadcast(i);
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。