wilsonvargas/ScreenshotPlugin

Save screenshot to default device screenshot directory instead of gallery

Opened this issue · 0 comments

Describe the solution you'd like
The file location on Android is hard-coded to be set to "/Camera" in CaptureAndSaveAsync() method, which isn't always the most suitable place for screenshots to be in. It would be nicer if default screenshot folder could be detected and set automatically or at least the function could allow us to specify the path ourselves in an argument.

An solution here could potentially be generic enough.

Additionally I have found that on newer Android SDKs (probably, I'm just stating what my IntelliSense is proposing to me, can't really tell where does that come from excately) Android.OS.Environment contains DirectoryScreenshots property that would be fitting perfectly. Although I suspect compatibility issues. Is is not listed yet on Microsoft Docs, however is listed in Android developer docs.

Pull Request
I could implement this and send a PR, although I am not experienced and may stumble upon some issues on my way there (possibly problems with maintaining compatibility, haven't worked with those issues yet, and to be fair I'm entirely new to Xamarin too), whereas I suspect for someone with more experience that could be quite a quick fix. I could try though.