android intent开启前置摄像头
android 掉用系统相机
·
网上大部分的文章是这样写的:
Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
intent.putExtra("camerasensortype", 2); // 调用前置摄像头
测试后发现不正确,并不能直接打开前置摄像头,打开的还是后置。正确方法是
Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
intent.putExtra("android.intent.extras.CAMERA_FACING", 1);//前置摄像头
更多推荐
所有评论(0)