我正在使用MediaStore.ACTION_IMAGE_CAPTURE意图启动摄像机视图,我能够成功捕获图像并且一切正常。
下面写的示例代码,
Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
fileUri = getOutputMediaFileUri(MEDIA_TYPE_IMAGE);
intent.putExtra(MediaStore.EXTRA_OUTPUT, fileUri);
// start the image capture Intent
startActivityForResult(intent, CAMERA_CAPTURE_IMAGE_REQUEST_CODE);
我担心的是当相机启动时,还有其他图标,如模式,相机的设置,我可以以某种方式隐藏它。 当你使用thha-dparty应用程序/聊天应用程序(如whatsapp或Viber或Hike)时,我已经看到了这种情况,只有简单的按钮来捕获图像。
如何禁用通过我的应用程序启动的相机的照片/图像捕获屏幕上显示的其他内容,或者有任何方法可以实现此目的吗?
答案 0 :(得分:1)
这些应用程序没有使用安装的凸轮应用程序来捕获它们使用凸轮流创建自己的视图。
Here is sample app with cam streaming library included.
非常容易整合
注意: 1.4.1好不能编译然后尝试使用1.2.3
compile 'jp.co.cyberagent.android.gpuimage:gpuimage-library:1.4.1'
@Override
public void onCreate(final Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity);
Uri imageUri = ...;
mGPUImage = new GPUImage(this);
mGPUImage.setGLSurfaceView((GLSurfaceView) findViewById(R.id.surfaceView));
mGPUImage.setImage(imageUri); // this loads image on the current thread, should be run in a thread
mGPUImage.setFilter(new GPUImageSepiaFilter());
// Later when image should be saved saved:
mGPUImage.saveToPictures("GPUImage", "ImageWithFilter.jpg", null);
}
答案 1 :(得分:1)
我关心的是相机启动时还有其他图标,比如模式,相机的设置可以以某种方式隐藏它
没有
当您使用thha-dparty应用程序/聊天应用程序(如whatsapp或Viber或Hike)时,我已经看到了这种情况,只有简单的按钮来捕获图像。
他们直接使用相机API,而不是启动一些外部应用程序来拍照。