Created
July 4, 2013 10:03
-
-
Save jbaginski/5926481 to your computer and use it in GitHub Desktop.
this secures against manual and automatic screenshots http://stackoverflow.com/a/9822607
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class FlagSecureTestActivity extends Activity { | |
@Override | |
public void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
/** | |
* secure this activity | |
* {@link http://stackoverflow.com/a/9822607} | |
*/ | |
getWindow().setFlags(WindowManager.LayoutParams.FLAG_SECURE, | |
WindowManager.LayoutParams.FLAG_SECURE); | |
setContentView(R.layout.main); | |
// ... | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment