Intent i = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); //限制只调用系统相机 final Intent intent_camera = ((Activity)getContext()).getPackageManager() .getLaunchIntentForPackage("com.android.camera"); if (intent_camera != null) { i.setPackage("com.android.camera"); } i.putExtra(MediaStore.Images.Media.
Android 限制只调用系统相机 不弹出应用选择器
最新推荐文章于 2022-04-28 14:01:05 发布
这篇博客介绍了一个在Android应用中限制调用相机的方法,确保只会启动系统默认的相机应用,而不会显示应用选择器。通过获取系统相机包名并设置到Intent中,可以避免用户在拍照时看到其他相机应用的选项。
摘要由CSDN通过智能技术生成