Skip to content
New issue

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

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

Already on GitHub? # to your account

Refactor Android implementation to use ContentObserver #43

Closed
wants to merge 1 commit into from

Conversation

foxanna
Copy link

@foxanna foxanna commented May 4, 2021

Fix for #29

Inspired by ScreenshotDetector by @nikit19.

@Ascenio
Copy link

Ascenio commented May 6, 2021

Isn't it a bad practice to use multiple languages in the same project? I mean, it works but the devs have to know both Java and Kotlin. Also I've noticed that you renamed private variables to use the _foo notation, that works but it's not so idiomatic of Java, it's more a darty thing.

@foxanna
Copy link
Author

foxanna commented May 7, 2021

Hi @Ascenio,
Thanks for the comments! I myself would be more than happy to see how the ideal implementation should look like.
I had a need to detect screenshots in the Flutter app and had fixed this plugin with the solution I could find. It's far from perfect but it works, so I thought I'd share it for anyone in need of an Android fix.
If you or anyone is interested in improving the solution, feel free to use this as a starting point. Best of luck!

beygee added a commit that referenced this pull request Jun 7, 2022
@beygee
Copy link
Member

beygee commented Jun 7, 2022

It has been modified to reflect your request.
I apologize for not being able to merge directly due to a conflict.
Thank you for your hard work!
https://pub.dev/packages/screenshot_callback/changelog

@beygee beygee closed this Jun 7, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants