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

Does not work for some Android Phones #2

Open
mariomurrent-softwaresolutions opened this issue Feb 14, 2021 · 11 comments
Open

Does not work for some Android Phones #2

mariomurrent-softwaresolutions opened this issue Feb 14, 2021 · 11 comments

Comments

@mariomurrent-softwaresolutions

I'm using this library in my Expo App, but somehow it does not trigger the visibility change event on some Android devices.

Could this be a potential bug or am I misusing this library?

@SvanBoxel
Copy link
Owner

Oh no! Could you share a minimal, reproducible example?

@mariomurrent-softwaresolutions
Copy link
Author

<VisibilitySensor style={styles.visibilitySensor} onChange={this.handleVisibilityChange}> <CodeField ref={(element) => this.codeField = element} .... /> </VisibilitySensor>

This is the example - How should I add an example which should be reproducible? It is just not working on some Android devices. So the handleVisibilityChange is not triggered.

@SvanBoxel
Copy link
Owner

Because it works on my Android device, I'd like to know what causes the issue for you. You could create an Expo Snack with your code that runs in an Android emulator to reproduce and share the issue you encounter.

on some Android devices.

Could you share on which Android devices it does work and on which devices it doesnt?

@mariomurrent-softwaresolutions
Copy link
Author

Here is the Snack: https://snack.expo.io/KxAKNsGaD

I'm using it as you describe it, just that the onChange is not triggered on the following phones:

Motorola G2 LTE mit Android 7.1 and an old Samsung SJ with Android 5.1.1

I haven't tried it on any other phones.

@SvanBoxel
Copy link
Owner

I tried to reproduce it with your snack but it all seems to work fine:
Recording:

Screen.Recording.2021-02-21.at.14.14.06.mov

Snack: https://snack.expo.io/ge_PzuYPR

@mariomurrent-softwaresolutions
Copy link
Author

mariomurrent-softwaresolutions commented Feb 21, 2021

Sure on a Snack it does work, but have you tried it on the device? I mean a real device - there it does not work. As I said, not on all Android Devices, but on some.

@SvanBoxel
Copy link
Owner

Same result on a non-emulated hardware device. (Oneplus 7)

@mariomurrent-softwaresolutions
Copy link
Author

Sure: As I already mentioned:

Motorola G2 LTE mit Android 7.1 and an old Samsung SJ with Android 5.1.1

These two device for example are not working :)

@SvanBoxel
Copy link
Owner

Thanks for providing that information and the Snack earlier this week. Being the only maintainer, I hope you understand I can't test this library on every device. Feel free to debug it a bit further yourself and let me know if you find something.

@mariomurrent-softwaresolutions
Copy link
Author

Sure, I'm already on it

@kotsh23
Copy link

kotsh23 commented Apr 18, 2022

i think its not working good on android Platform.Version > 30
maybe it because the problem with statues bar height

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

3 participants