Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Save screenshot to default device screenshot directory instead of gallery #19

Open
mMosiur opened this issue Jan 14, 2021 · 0 comments
Open

Comments

@mMosiur
Copy link

mMosiur commented Jan 14, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant