Theme: _Default Browser_
User Story
I disocvered content of a page that I want to revisit later (save to my device)
Feature
Allow users to screenshot. (Turn off/on via settings? We know a lot of people screenshot content)
Tasks:
I wonder if we could introduce a nicer way to screenshot a (complete) website without introducing a complicated setting with side effects (app content shows up in app switcher)
@antlam If we just introduce a setting... I wonder what copy we'd use. From the Android docs: "treat the content of the window as secure, preventing it from appearing in screenshots or from being viewed on non-secure displays." - So in our case this means you can't take a screenshot of Focus, it won't show up in "recent apps" and you can't cast it to other screens.
I wonder if we could do the following instead of introducing a setting:
I wonder if we could do the following instead of introducing a setting:
- Manually hide/show the content when the activity is resumed/paused - With that the content should not show up in "recent apps"
- Remove the secure flag. With that users can screenshot and cast the app (It's there choice after all) and we wouldn't need to introduce a potentially confusing setting
I just tried that. What happens is:
It looks like Android is taking a snapshot of the activity before onPause() is getting called. So this workaround doesn't work unfortunately.
I tried adding/removing the SECURE flag dynamically in onResume(): Removing the flag works and the app content shows up in "recent apps" again. However adding the flag doesn't work without restarting the activity. :(

I wonder if it would be more straight forward to offer a screenshot action and then open the screenshot in the default app for viewing images (or sending a share intent). This allows us to do more things in the future (some kind of local library, adding additional data to the screenshots, ..)
@antlam Do you think it's worthwhile to add our own (potentially better) screenshot implementation or do you think we should go with the setting [This might require restarting the app, needs some more investigation]?
@pocmo sorry for the delay!
I like the idea of implementing our own. But I also know that users are accustomed to taking screenshots the same way they've always been doing it. So my worry here is that we would be forcing them to learn a new habit.
@antlam Copy for the settings
If we assume that most users will take screenshots by holding down the sleep/wake and volume-down buttons, but Focus doesnât enable âsecure modeâ by default, then what would happen if I perform that gesture?
If we do nothing, it wouldnât be ideal, but perhaps thatâs all weâre allowed to do.
But if we can pop open a permission dialogue that say âEnable secure modeâ, then it would be ideal. Furthermore, in this dialogue, we can then explain what enabling it will mean (âweâll allow screenshot, but your appâs thumbnail will also appear on the switcherâ).
I think the system shows a notification. But I'm not sure what else we can do. @pocmo ?
I found out that we canât show a custom message on this permission dialogue, but we can say something beforehand.
But a gesture inherently doesnât have a label. So what can we do?
if Deny, then show snackbar âTo take screenshots, allow Focus to access your photosâif Allow, then show dialog âCopy, Save or Shareâ. This dialogue contains a message telling the user to be careful
This solution has two flaws:

(The Settings UI is clearly not final. Weâll most certainly have to redesign it. But I hope my intent came through).
I think showing the dialog can be confusing since it's an Android convention to use a dialog after a user long-presses, rather than when they hold down the hardware buttons for a screenshot.
But I like the feedback of the snack bar, with the short-cut to Settings! More messaging/copy that we'll need to lock down.
Sounds good. Letâs agree on shipping the snack bar when you perform a screenshot gesture without enabling Secure Mode.
There are two elements that will require messaging/copy
Secure Mode section under settings
The snack bar copy will say:
To take screenshots, go to Settings and turn off Secure Mode. [Settings]
When the user tap *Settings(, open Firefox Focus settings on the section labelled _Secure Mode_.
Secure Mode [on/off toggle]
Firefox Focus cares for your privacy, so Secure Mode is turned on by default.
Turn off Secure Mode to:
⢠Take screenshots
â˘Â Make the page you view in Firefox Focus appear on your list of recently used appsTo check, tap the â button on the bottom of your screen and look for Firefox Focus there.
@mheubusch, my copy can probably use some trimming, but the idea is to make users realise the compromise thatâs involved when turning off Secure Mode. What do you think?
Sorry for the delay. I am at I/O this week.
Screenshots are handled by the system exclusively. We can't intercept and/or get notified when the user takes a screenshot. Therefore we unfortunately can't show any helpful UI to assist the user. In the case where screenshots are disallowed the Android system will show a notification (instead of the notification containing the screenshot) - unfortunately it doesn't mentions that the app prevents screenshots (because there could be other reasons like device policies).
Thanks @pocmo for the clarification. After looking into this issue further, youâre right that we canât have our own dialogue shown.
Instead, the Android system will show a notification that a screenshot couldnât be captured:

Let me look at some examples of apps that have âBoss Modeâ (Orbot, Courier, CameraV, SuperSU) to see if we can learn something from how they hide in plain sight.
Having looked at all the app examples above, I had to revert to a very simple solution: make Secure Mode a part of onboarding along with a few tweaks.

Visually, my mockup doesnât look the best. Weâll have to think of a good layout for it.
Thoughts, @antlam and @pocmo?
Secure Mode [on/off toggle] Firefox Focus cares for your privacy, so Secure Mode is turned on by default. Turn off Secure Mode to: ⢠Take screenshots ⢠Make the page you view in Firefox Focus appear on your list of recently used apps To check, tap the â button on the bottom of your screen and look for Firefox Focus there.
I like that this setting will explain the trade-off. However I can't really imagine how this will look like in the settings UI - can you show me a mock? For "Send anonymous usage data" we offer a "Learn more" link and explain more on SUMO - Is this something we should do here too? Maybe we end up with a more brief description inside the app?

Two variations of Secure Mode explanation.
The first one is a long one that clearly explains the tradeoff, but has no âLearn moreâ link.
The second one is a shorter one that modifies the current text and adds a âLearn moreâ link:
Despite wanting to explain everything, I lean more towards the second, shorter option. What do you think, @pocmo?
In triage we decided to move the first run card to a new issue (and address it after v1) and use this bug just for the setting.
@mheubusch do you have time to look at this too? :)
I think we need to explain which state of Stealth (on or off) does what a bit more clearly. I think something like this is a bit more clear:
Stealth
Turn off stealth mode to take screenshots and see Firefox Focus in your Recent Apps list. [Learn more]
Thanks for the suggestion, @mheubusch.
This is the revised mocks with your string:

(Learn more is optional â I think the string is clear enough without having to explain it further).
Now itâs just a question of whether we can get this new copy past string freeze?
Now itâs just a question of whether we can get this new copy past string freeze?
Yeah, I'll land the strings today!
Thank you @pocmo for landing that string!
Future design idea:

Letâs keep this in mind when we decide that we need long explanatory copy.
Android has a pattern where you say:
Settings title
On
And when you tap on that block, it goes to a sub-page with an on/off switch and a lot of areas below it for explanatory text. We can even include an extra help icon on the upper-right hand side if we want it to lead to SUMO.
The point is, by giving the on/off switch its own sub-page, we get a lot of rooms to write about a setting that might take a while to explain (Tracking Protection comes to mind).
In triage we decided to use the short version in v1 and I'm going to use the string from #643 in the final export today.
I'm closing this bug which was implementing this feature (for v1). We can file a new bug to explore other options of displaying the setting in later versions. The sub-page is definitely an interesting concept too.
Most helpful comment
I think we need to explain which state of Stealth (on or off) does what a bit more clearly. I think something like this is a bit more clear:
Stealth
Turn off stealth mode to take screenshots and see Firefox Focus in your Recent Apps list. [Learn more]