← Back to team overview

ubuntu-phone team mailing list archive

[sdk] QR code support

 

As QR codes have become such a common integral part of phone apps, is
there any plan to support them in the SDK, so they don't need to be
reimplemented in each app?

Obviously, there are two parts to this, so I'll give some ideas of what
I'm expecting.

== Scanning a QR code ==
It would be useful to be able to scan QR codes from many different apps,
without needing to manually switch to another app.

This could be implemented as an SDK element, so a QR code can be scanned
directly in the app.

Another approach would be to launch an installed QR code app. This could
give more flexibility, as other apps might work with things other than
QR codes or have other features.
	For this approach, I would expect to be able to call something which
opens the default scanner app, which should be able to open directly in
scanning mode, then return the result directly to the calling app as it
exits.

== Generating a QR code ==
It would also be really great to have an SDK element that can generate a
QR code from some text. This could just inherit from Image or something.

This could have a really simple interface, so it could be used something
like:
        QRCode {
            text: "Text to be encoded"
        }
Obviously, the image would update whenever the text property is changed,
making it trivial to generate these.

Attachment: signature.asc
Description: This is a digitally signed message part


Follow ups