Leandro Andrade
Leandro Andrade

Reputation: 71

How to hide screen informations off Android app when it goes to the background

Using FLAG_SECURE, when app goes to background screen info are invisible, however, with this option users cannot take a screenshot anymore.

it's there any way to remove FLAG_SECURE when app back to FOREGROUND ?

Or any other solution for this problem ?!

Upvotes: 7

Views: 1596

Answers (1)

Gibran Lyra
Gibran Lyra

Reputation: 21

You can put a black or white background in onPause and hide it in onResume if you dont need the FLAG_SECURE always active. This could prevent the window manager to exposes the screenshot in the window manager screen.

Upvotes: 2

Related Questions