Skip to content

Take a picture as attachment in-app

Matti Viljanen requested to merge camera-button into master

New feature: take a picure within Whisperfish and send it as an attachment. The UI isn't pretty, but the basic functionality works, so feel free to try it out!

The important stuff:

  • Save the picture in Whisperfish storage path
  • Handle device rotation (very slightly janky, but works great)
  • Add the picture as an attachment and send it!
  • Tap to focus
  • Create dedicated folder for pics under storage (needs a new QSetting key and related Rust code)
  • Delete the taken picture, if user rejects it (needs Rust code?)
  • Re-arrange the attachment buttons in ChatTextInput.qml (they take up too much space as-is)


  • Make the UI prettier
  • Auto-focus (unless tapped-to-focus)
  • Video (should be easy, but practically requires delete-rejected functionality)
  • Use front camera (easy, but needs new tedious orientation hunt)
  • White balance, exposure, focus, flash controls (at least some subset of these)

Getting device orientation + UI orientation + viewfinder + photo orientation all work together was tricky, but it all works fine. Tested successfully with

  • Sony Xperia X 10 II (4.4)
  • Sony Xperia XA2 Ultra (4.4)
  • Sony Xperia X (4.1)
  • Jolla Phone (3.4)

Fixes #7 (closed)

Edited by Matti Viljanen

Merge request reports