[enhancement] Should be possible to take a screen shot on the phone from the phone itself

Bug #1369644 reported by Rick Spencer
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Mir
Opinion
Undecided
Unassigned
Ubuntu UX
Fix Released
High
Vesa Rautiainen
mir (Ubuntu)
Opinion
Undecided
Unassigned
qtmir (Ubuntu)
Invalid
Undecided
Unassigned
unity8 (Ubuntu)
Fix Released
Undecided
Alberto Aguirre
unity8 (Ubuntu RTM)
Fix Released
Undecided
Michał Sawicz

Bug Description

Currently, the only way to take a screenshot is to attach the phone to a computer via USB and use phablet-screenshot.

There should be a way to take a screenshot from the phone. Otherwise, it will be hard for people to share how great their phone is on social media, as well as other functions.

--------------------------------------------
Proposed design:
- For triggering: Volume Up + Volume Down
- For indicating the user: White layer opacity animation shown in attached video + shutter sound

Related branches

Revision history for this message
Cemil Azizoglu (cemil-azizoglu) wrote :

Adding unity8 where this can be implemented.

Screenshot plumbing already exists in Mir.

Changed in mir:
status: New → Invalid
Changed in mir (Ubuntu):
status: New → Triaged
Changed in mir:
status: Invalid → Triaged
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

We could do it in the outer server too (unity-system-compositor). Although there's the problem of where to store the image file. It makes more sense to to it in the inner server (unity8) so we have a user account and directories to write the screenshot to.

summary: - Should be possible to take a screen shot on the phone from the phone
- itself
+ [enhancement] Should be possible to take a screen shot on the phone from
+ the phone itself
tags: added: enhancement
kevin gunn (kgunn72)
Changed in mir:
status: Triaged → Opinion
Changed in mir (Ubuntu):
status: Triaged → Opinion
Revision history for this message
Alberto Aguirre (albaguirre) wrote :

I agree that it makes more sense to do it in the unity8 server.

However, the screencast plumbing cannot be used as is as qtmir implements Compositor not DisplayBufferCompositor. The screenshots obtained would be recomposed using our default compositor which wouldn't match qtmir compositor output.

Since the screenshotting will be done in unity8 shell on the server side, I think its easier to just implement the required functionality in qtmir (i.e. dumping it's display buffer) directly instead of trying to adapt the screencast plumbing.

Adapting it would require qtmir to at least implement DisplayBufferCompositor and DisplayBufferCompositorFactory.

Changed in qtmir:
assignee: nobody → Alberto Aguirre (albaguirre)
Changed in unity8 (Ubuntu):
assignee: nobody → Alberto Aguirre (albaguirre)
Changed in qtmir:
status: New → In Progress
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

I suggest some simple glReadPixels is sufficient :)

Mir's current screen{shot,cast} infrastructure is a bit complicated and designed on the assumption that rendering everything twice is faster than rendering everything once with a glReadPixels in the loop. I think that assumption may yet be proven false. So a simple glReadPixels could work (even from inside QtMir).

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in unity8 (Ubuntu):
status: New → Confirmed
Changed in unity8 (Ubuntu):
status: Confirmed → In Progress
Revision history for this message
Gerry Boland (gerboland) wrote :

I'd like to point you to:
https://qt-project.org/doc/qt-5/qquickwindow.html#grabWindow

QtMir exposes a Mir display as a QWindow, so this method will generate the image you want.

I suspect this would be better implemented in unity8

Revision history for this message
Alberto Aguirre (albaguirre) wrote :

@Gerry,

Yes, that's what I'm using - however grabwindow needs to be implemented by the platform in qtmir which I've done.

Revision history for this message
Alberto Aguirre (albaguirre) wrote :

@Gerry,

Actually I'm using QScreen::grabWindow which is what needs the platform implementation.

Revision history for this message
Alberto Aguirre (albaguirre) wrote :

@Gerry,

Ok QQuickWindow::grabWindow does the job and is much less intrusive :) Thanks!

Changed in qtmir:
status: In Progress → Invalid
assignee: Alberto Aguirre (albaguirre) → nobody
Revision history for this message
Alberto Aguirre (albaguirre) wrote :
Revision history for this message
Michael Zanetti (mzanetti) wrote :

Adding design to decide on how to trigger this.

Revision history for this message
Albert Astals Cid (aacid) wrote :

Also getting some info on how to notify the user from deisgn would be good, current implementation is a fading rectangle, maybe a simple notification would do?

Revision history for this message
Vesa Rautiainen (vesar) wrote :

I very much favor this enhancement!

iOS: Power button + Home button
Android: Power button + Volume Down
Windows: Power button + Volume Up

So there is no unified convention across different platforms.
So let's say Power button + Volume Down it is.

Is this kind of key combination something we can implement?

Changed in ubuntu-ux:
assignee: nobody → Vesa Rautiainen (vesar)
status: New → Fix Committed
description: updated
Revision history for this message
Alberto Aguirre (albaguirre) wrote :

@Vesa,

Volume Up + Volume Down is what's implemented as that's the least intrusive code change, since power turns on/off the screen (needs more code changes to our unity-system-compositor).

Is Volume Up + Volume Down ok?

Revision history for this message
Alberto Aguirre (albaguirre) wrote :

@Vesa,

What about notifying the user the screenshot was taken? Currently it's a white fade in-fade out (I'll record a video in a bit).

Revision history for this message
Vesa Rautiainen (vesar) wrote :

I reckon Volume Up + Volume Down is as fine. Not a big deal imo.

description: updated
Revision history for this message
Albert Astals Cid (aacid) wrote :

Ping on what's the way to notify the user and if what we do at the moment is sufficient.

Revision history for this message
Andrea Cimitan (cimi) wrote :

I would skip a notification, but I will add something to the notification center ("screenshot taken, tap to open gallery...")

Revision history for this message
Andrea Cimitan (cimi) wrote :

will/would

Revision history for this message
Alberto Aguirre (albaguirre) wrote :

Screengrabbing opacity animation

Vesa Rautiainen (vesar)
Changed in ubuntu-ux:
importance: Undecided → High
Revision history for this message
Vesa Rautiainen (vesar) wrote :

We definitely need some immediate visual feedback of the screen capture. I like the simple animation in the video as it's very fast and not very intrusive for the user. Adding shutter release sound that we use in Camera application would be a plus.

Maybe adding an item to the notification center as Cimi suggested might be quite nice idea for the future. At least there would be a direct link to the photo available conveniently.

description: updated
Michał Sawicz (saviq)
Changed in unity8 (Ubuntu RTM):
assignee: nobody → Michał Sawicz (saviq)
status: New → Triaged
status: Triaged → In Progress
Revision history for this message
Michał Sawicz (saviq) wrote :

This bug was fixed in the package unity8 - 8.01+15.04.20141104-0ubuntu1

---------------
unity8 (8.01+15.04.20141104-0ubuntu1) vivid; urgency=low

  [ Sebastien Bacher ]
  * Drop workaround, it's not needed and create issues for desktop-next
    (LP: #1387671)

  [ Albert Astals ]
  * Do not append integer to char *
  * Remove unused end() function
  * Update build.sh
  * Fix i18n

  [ Michael Zanetti ]
  * rework launcher quicklist visuals to fit new design (LP: #1368660)
  * Fix DBusVariant conversion for launcher emblems (LP: #1387261)
  * Fix desktop file encoding in launcher (LP: #1387083)
  * Add a hinting animation to indicate changes in the backend (LP:
    #1376707)

  [ Alberto Aguirre ]
  * Add audioRole to QtMultimedia mock
  * Add a plugin to take screenshots on vol up + vol down

  [ CI bot ]
  * Fix relative time formatter when using non-UTC timezone. (LP:
    #1378821)

  [ Leo Arias ]
  * Removed the tests for the alternate paths of the autopilot helpers.

  [ Nick Dedekind ]
  * Fix relative time formatter when using non-UTC timezone. (LP:
    #1378821)
  * Reset current item selection on deleted. (LP: #1378462)
  * Added timer to re-assert server value after indicator menu item
    activation. (LP: #1336715)

  [ Mirco Müller ]
  * Added dedicated swipe-to-act button for snap-decisions, which avoids
    accidental taps/button-presses. (LP: #1358343)

  [ Chris Gagnon ]
  * add missing unity-scope-click dependancy to unity8-autopilot package
    (LP: #1336276)

  [ Michael Terry ]
  * Don't lock phone if user tries to switch back to an active call.
    (LP: #1388156)

  [ Daniel d'Andrada ]
  * DirectionalDragArea: Update TODO comment in light of new events
  * TouchDispatcher: synthesize MouseButtonDblClick events

  [ Leonardo Arias Fonseca ]
  * Removed the tests for the alternate paths of the autopilot helpers.
 -- Ubuntu daily release <email address hidden> Tue, 04 Nov 2014 12:56:08 +0000

Changed in unity8 (Ubuntu):
status: In Progress → Fix Released
Michał Sawicz (saviq)
Changed in unity8 (Ubuntu RTM):
status: In Progress → Fix Released
Vesa Rautiainen (vesar)
Changed in ubuntu-ux:
status: Fix Committed → Fix Released
Michał Sawicz (saviq)
affects: qtmir → qtmir (Ubuntu)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.