Avoid OK Retry button for Xamarin Camera - c#

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.
Regards

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)
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#.

Related

How to record video with VLC in my C# app

I am making a streaming app in c# and I have embedded the vlc player using vlc.dotnet.
How can I add the feature to allow the user to record the livestreaming with a press of a button for example.
And how can I view the seek bar as the livestreaming goes on?
Thank you!
Vlc.DotNet is archived, and you're expected to use LibVLCSharp instead.
Recording "on-the-fly" is not yet possible with libvlc (and thus not with LibVLCSharp nor Vlc.DotNet). It is a feature that is only possible with VLC, but you can start a second stream and pass it the same recording options as the CLI.
Have a look at the "How do I?" section
To view the "seek bar", you have to implement it yourself, you have properties that give you the time, duration and position plus events that lets you know when Time/Position changed.

Xamarin C# Take picture without open Camera

I have a QrCodeCode with used the libary "Zxing". Now i want to Take a picture of the complete screen inside the QrCodeScanner. The Problem is i dont want to open the Camera. I want to create a Button that just takes a picture.
I Tried to use the Media.Plugin but this one leav's my App and that is not my goal.
EDIT
as best zxing just should capture my actual screen.

How to take a photo without preview. Android. Xamarin. C#

I have a sample code from xamarin.com:
How to click the Button and take a photo without preview?
Maybe you have an articles, or videos. I'm new at Xamarin, so it will be awesome, if i'll get as more details as possible.
This article will get you started with a stream of the camera to a surface in your app. It shows you how to get to the Camera class, which in turn has a TakePicture method that you could use for your problem.
Please also take a look at this answer on SO on a similar question (native Android, but the same concepts apply), which suggest showing the preview on a 1x1 surface because you can't really prevent the preview on Android as far as I know.
PS: don't forget to add the correct permissions in your manifest for Camera access.

Screen touch simulation on Android

I'd like to create a simple application for Android that would automate some processes that happen in different applications that I don't have under my control at all. Is there any way to get pixel color and simulate screen touch while my application runs in background?
Let's say I want to wait for a certain pixel to turn red (#FF0000), can I use GetPixel(x,y) to get the color and then simulate a screen touch event such as a swipe across the screen?
I tried to Google this but I've got nothing useful at all and now I'm quite desperate about this.
I had to search a bit for this. I was also looking for this solution.
NO ROOTING REQUIRED FOR THIS:
If you want to repeat a sequence of steps like fill a form, repeat game steps because redoing is boring, You can try : FREP Android App from Play Store(Link).
If you want to add conditional scenarios like, when you play Clash of Clans with home Wifi, turn data automatically and disable wifi ( Because Airtel Wifi in India is unpredictable and can make you loose the clan war!!) use, Macro Droid from Play Store.
You can try these as well:
Mahiro
Many apps are available based on Tasker like, Auto Input. You can maybe code/write macro to make personal solution with this Tasker App.

Can I trigger the various camera options in a CameraCaptureUI dialog in my Windows Store App?

I am using the CameraCaptureUI dialog to capture images and video from the camera in my Windows Store App. I am using an alternative input device, so I want to trigger the various operations in the CameraCaptureUI dialog from my own C# code, instead of having the user click the mouse or use touch to trigger them. Right now the CameraCaptureUI dialog appears to be a "black box" and I can't see any entry or intercept points. Is there a way to trigger the various CameraCaptureUI dialog operations (take picture, start video record, stop video record, etc.) from my C# code?
If not, is there a more direct WinRT interface to the camera I can use to to do this myself and if so, what is it called so I can research it?
CameraCaptureUI IS a simplified black box dialog that isn't really part of your app, so you can configure how it gets initialized, but not interact with it with code once it starts.
You can use the CaptureElement + MediaCapture approach to host a camera preview in your app, but it's quite a bit more work. You can look at my CameraCaptureControl to find inspiration or simply use it in your app.

Categories