Closed rokkoo closed 9 months ago
hi @rokkoo
I want to add for addScreenshotListener
, addScreenRecordListener
for android.
But, There's a reason i want to create it, but can't.
First, I know that Android doesn't provide events like iOS for this part.
This is related to not being able to resolve the issue #9 .
If you know of any, please let me know and I will add them as soon as possible
Hi @0xlethe thanks for the response!
Im checking other libraries like expo screenshot and they use content observables
approach, I don't know if this can be a solution for us.
This solution need of READ_EXTERNAL_STORAGE
permission on android and its always listening to changes on MediaStore.Images.Media.EXTERNAL_CONTENT_URI
.
Let me know what do you think about this, this is by far the unique approach that I saw to detect changes on android
:(
@rokkoo Thanks to response!
Personally, it's a good idea However, I wouldn't implement it in this library for the following reasons.
Hi @0xlethe !
I think this approach is not perfect, because the user can change the name of the screenshot or add another prefix to it, so we lose the precision for some cases, but I don't figure another way to control screenshot event on android.
@rokkoo After thinking about it for a few days, this seems to be the best way to go at this point. I plan to release a new version with this approach in the near future.
Thanks!
Hi @0xlethe! That's awesome mate! If you need some help, or I can help you testing let me know!
hi @rokkoo, happy new year!!
i update v1.9.2 for android can detect screenshot file. so can you test it?
Hey! happy new year @0xlethe !! This is nice mate! thanks! Im gonna test it, by te way, the pipeline of the PR is not passing, can you check it?
Thanks, nice job!
@rokkoo hi, pr pipeline is broken for yarn version. You can ignore it and just do it
@rokkoo hi, pr pipeline is broken for yarn version. You can ignore it and just do it
Nice, I will let you know my feedback soon!
Hi @0xlethe sorry for the delay on this.. I was be able to test it on android, and work like a charm 🎉
GREAT job @0xlethe !!
I have a few notes to share with you, I can propose some PR to improve it.
addScreenshotListener
and removeScreenshotListener
are marked as deprecated
method, I think this is wrong as the changes that you did is on those methods.Android v1.9.2⬆️
react-native version
, right now it says that the library only works on version 0.73
but as I tested and on the given example the minimum RN version is 0.70.6
@rokkoo Thanks for testing and sharing your findings.
For RN 0.73, I meant to say that it also supports version 0.73, but I think I wrote it wrong and will fix it.
The addScreenshotListener
and removeScreenshotListener
will be released in 1.9.3, along with the wiki fixes
@0xlethe That's amazing! Thanks you! Ping me if you need anything for me, I will glad to help :)
this issue is release for >= 1.9.2, so closed this issue
Hi there!
Firstly, kudos on maintaining such an awesome library!
I'm reaching out with a feature request that I believe could enhance the functionality of your library on Android. I'm wondering if there are any plans to introduce the addScreenshotListener and addScreenRecordListener methods for Android. This addition would be incredibly valuable for controlling on the app this flow.
Alternatively, if you've encountered any challenges or obstacles while considering or implementing these features, I'd love to understand more about them.
Thanks for the help :)