避免Xamarin Camera的OK Retry按钮 [英] Avoid OK Retry button for Xamarin Camera

查看:66
本文介绍了避免Xamarin Camera的OK Retry按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用来自的相机代码库 https://github.com/rasmuschristensen/XamarinFormsImageGallery 打开相机,拍照并在画廊中展示.在droid项目中,拍照后,对话框要求保留照片或使用确定"和重试"按钮将其丢弃.无论如何,我可以避免此步骤,然后继续下一步.

I am using the Camera code base from https://github.com/rasmuschristensen/XamarinFormsImageGallery to open camera, take picture and show in the gallery. In the droid project, after taking the picture, the dialog asks either to keep the photo or discard it using OK and Retry button. Is there anyway, I can avoid this step and go to next step.

致谢

推荐答案

使用Media插件将无法执行此操作.此插件使用依赖设备实际相机应用程序的Android中捕获照片的标准方式.保存/重试功能是Camera App的一部分,我们无权使用它,因为Android提供商"(三星,LG,索尼等)之间会有所不同

Using the Media plugin you won't be able to do it. This plugin use the standard way of capturing photos in Android which rely on the device actual camera app. The save/retry functionality is part of the Camera App and we don't have access to it as this will be different between Android "providers" (Samsung, LG, Sony, etc)

避免这种情况的一种方法是使用SurfaceView而不是使用相机应用程序在自己的应用程序中捕获照片.我发现了这个示例,但不幸的是用Java编写,但是我认为翻译成Xamarin/C#并不难.

One way to avoid this is capturing the photo within your own app using the SurfaceView and not using the camera app. I found this example but unfortunately is written in Java but I think it's not too hard to translate into Xamarin/C#.

这篇关于避免Xamarin Camera的OK Retry按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆