Questions tagged [flag-secure]

14 questions
3
votes
0 answers

How to programmatically detect if Accessibility event comes from FLAG_SECURE Android app?

Google has issued this requirement for Android apps, effective November 1, 2022: "For security and privacy purposes, all apps distributed on Google Play are required to respect the FLAG_SECURE declaration of other apps. Meaning, apps must not…
gcdev
  • 1,406
  • 3
  • 17
  • 30
3
votes
1 answer

Setting FLAG_SECURE does not work when added to onPause in Android 11

So I have been trying to hide content in my react native application when my app is visible on the app switcher when i go to recent apps.Initially I set FLAG_SECURE on onCreate but the issue there was i wasn't able to use BrowserStack usage,…
Suhail Rifky
  • 74
  • 1
  • 7
2
votes
0 answers

Setting FLAG_SECURE does not work when added to onPause in Android

I want to Add secure Flag when app goes into background and i want to clear secure flag when app comes to foreground but onPause is running bit late and content is not hiding in Task Switcher @Override protected void onPause() { super.onPause(); …
Manikanta
  • 325
  • 6
  • 20
2
votes
0 answers

Prevent screenshot in background and allow in Foreground Cordova

I have situation where I need to prevent screenshots when app moves to background or in recent list and also when app goes to foreground I need to allow user to take screenshots. Solutions I have tried in MainActivity.java. By using FLAG_SECURE in…
2
votes
0 answers

Android : Hide specific views in the screenshot

I saw that we can disable screenshot of a window using the flag WindowManager.LayoutParams#FLAG_SECURE. I see that we can set secure flag for SurfaceViews. Is it possible to hide a specific view like TextView from appearing in the s screenshot
png
  • 4,368
  • 7
  • 69
  • 118
1
vote
1 answer

FLAG SECURE not working with Jetpack Lifecycle events

As per the requirement, we have to hide the App's last stored state/snap when viewed from app carousel in minimized state. Now in the app, I'm using JetPack's lifecycle events - ON_START and ON_STOP in order to detect the state if the app going in…
1
vote
2 answers

How to use setScreenCaptureDisabled xamarin

Please don't mark question as duplicate.cuz FLAG_SECURE don't works for me. As here someone had recommended to use setScreenCaptureDisabled, But he didn't added any example and also I use xamarin. So how do I use setScreenCaptureDisabled for…
Sorry IwontTell
  • 466
  • 10
  • 29
0
votes
0 answers

Android App test automation using appium, selenium and UIAutomatorviewer

I am facing a problem on android application test automation using appium, selenium and uiautomatorviewer. I would like to ask what are other ways/alternatives to automate the app when the app has screenshot restrictions are in place and screenshot…
0
votes
0 answers

Is there a way to prevent apps from running on Xposed Framework?

I'm still a begginer but your answers in this community helped me alot , I'm currently working on a project of eductaional app of my own, it requires high level of content protection, Considering screen capture issue many articles here reccomended…
0
votes
0 answers

Unexpected FLAG_SECURE behaviour while extending UnityPlayerActivity

I wanted to restrict screenshots and screen recording in my Unity game. So, I Googled and found that I need to extend UnityPlayerActivity and add a FLAG_SECURE in it's OnCreate method. So, I did it: public class KTExtendedActivity extends…
0
votes
0 answers

GetCallback as soon as user presses recent app button for Android 12 & above

I want to get callback as soon as moves away from the app. This should include 2 cases. When user presses home button & the app is minimised. When user presses recent app button, where app is visible but has lost focus. Before Android 12, I was…
0
votes
2 answers

Can we restrict screen capture using secure flag for chrome custom tab in android?

I am using chrome custom tab to display data in one screen. But data is sensitive and need to protect it by disabling screen capture functionality of devices. It would be great help if any one could explain me how can I achieve this requirement for…
0
votes
1 answer

Android 13: FLAG_SECURE toast message is not showing

Our app does not allow screen capture, so below code is used: if(android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.HONEYCOMB) { window.setFlags(WindowManager.LayoutParams.FLAG_SECURE,…
JustinB
  • 45
  • 7
0
votes
0 answers

Prevent Screen Capture on Zoom Android SDK

I have integrated Zoom SDK into android application where teacher can take live classes and student would access it. The problem is I need to prevent taking screenshots or screen-record while live meeting is going on. MeetingActivity is getting…
Abhishek TS
  • 1
  • 1
  • 4