Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-12925] Android: Support FLAG_SECURE window flag

GitHub Issuen/a
TypeNew Feature
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2014-03-04T23:22:54.000+0000
Affected Version/sRelease 3.0.0, Release 3.0.2
Fix Version/s2014 Sprint 05, 2014 Sprint 05 API, Release 3.3.0
ComponentsAndroid
LabelsSupportTeam, module_window, qe-closed-3.3.0, qe-testadded
ReporterDaniel Sefton
AssigneeBiju pm
Created2013-03-01T20:40:28.000+0000
Updated2017-12-20T17:13:53.000+0000

Description

Currently Titanium doesn't support the following: *Native example*
getWindow().setFlags(LayoutParams.FLAG_SECURE, LayoutParams.FLAG_SECURE);
From: http://developer.android.com/reference/android/view/WindowManager.LayoutParams.html {quote}Treat the content of the window as secure, preventing it from appearing in screenshots or from being viewed on non-secure displays.{quote}

Comments

  1. Biju pm 2014-02-19

    PR: https://github.com/appcelerator/titanium_mobile/pull/5360
  2. Biju pm 2014-02-21

    Test case
       var window = Titanium.UI.createWindow({
          backgroundColor:'red' ,
          flagSecure : true
       });
       window.open({fullscreen:true});
       
    1. Run code 2. Attempt to take a SS on the red window. You shouldn't be able to.
  3. Priya Agarwal 2014-04-24

    Verified the issue with environment: Appc-Studio:3.3.0.201404211130 sdk:3.3.0.v20140423155715 acs:1.0.14 alloy:1.4.0-dev npm:1.3.2 titanium:3.3.0-dev titanium-code-processor:1.1.1-beta1 xCODE:5.1.1 Device:Iphone5(7.1),Nexus7(v4.4.2) Window flagSecure property working fine. Was not able to take screen Shot when window assigned with flagSecure property. Hence closing the issue.
  4. Clément Blanco 2017-12-20

    AMAZING. This should be documented a bit better on the official documentation on how to do it for either iOS or Android. I was trying to fiddle with activity events pause/resume but this is much better. Any equivalent for iOS or Ti.App events are still the best?

JSON Source