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

Android - App screens are always visible no matter of screen is locked or unlocked #420

Open
ilkinabdullayev opened this issue Sep 3, 2024 · 4 comments
Assignees

Comments

@ilkinabdullayev
Copy link

ilkinabdullayev commented Sep 3, 2024

Issue

Hello,

This screenshots are from twilio reference app. So basically what annoys me screen is visible even if app is locked. I understand why it happens.

https://github.com/twilio/twilio-voice-react-native/blob/main/android/src/main/java/com/twiliovoicereactnative/VoiceActivityProxy.java

 // These flags ensure that the activity can be launched when the screen is locked.
    Window window = context.getWindow();
    window.addFlags(WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED
      | WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON
      | WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);

It is kind of annoying because screen can have sensitive data to make it easily accessible can be problem.

Is this intentional behaviour or question is if i can prevent this problem?

image

@ilkinabdullayev ilkinabdullayev changed the title App screens are always visible no matter of screen is locked or unlocked Android - App screens are always visible no matter of screen is locked or unlocked Sep 4, 2024
@mhuynh5757
Copy link
Collaborator

Hi @ilkinabdullayev thanks for bringing this to our attention. I'll let the team know your concern.

@ilkinabdullayev
Copy link
Author

Thank you for your attention. (For now, i am gonna use rn-call-keep)

@sshodges
Copy link

sshodges commented Oct 3, 2024

I am having the same issue. You have to close the app then lock the phone for it to hide, otherwise its always visible when phone is locked. Has anyone figured out a work around?

@sshodges
Copy link

@mhuynh5757 is there a fix for this yet?

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

4 participants