In my Android app I need to use the SECURE_FLAG
to say to Android: "hey you don't take a screenshoot of my app in background!". Ok it works simply using the following lines of code in my activities:
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_SECURE, WindowManager.LayoutParams.FLAG_SECURE);
...
}
What I obtained is explained in the following screenshot:
Now, How can I:
- Change the icon on the top of the activity preview?
- Change the preview of the activity, with another colour or an image?
I look for a solution, but I didn't find anything.. except that it is impossible to do it (if true I think is a pity, for Android).