[Freedombox-discuss] QR verification after Tap-to-share PGP key exchange
Timur Mehrvarz
timur.mehrvarz at googlemail.com
Sun Oct 2 10:59:58 UTC 2011
On 01.10.2011 00:02, Timur Mehrvarz wrote:
> The complete 2-way process could be done with a total
> number of four clicks per user.
>
> 1. click on the received .asc file
> 2. click on "QR verification" in the "Apply action..." menu
> 3. click to snap / click to continue to switch around
> 4. click to continue to switch around / click to snap
>
For a new "QR verification" activity to appear in the PGP-key's "Apply
action..." menu (based on mime type), the activity needs to be specified
like this in it's AndroidManifest.xml:
<activity android:name=".QrPgpKeyVerificationActivity"
android:label="QR PGP key verification">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:mimeType="application/pgp"/>
</intent-filter>
</activity>
The activity can get access to the path of the selected (received) key
file like so:
intent = getIntent()
receivedKeyUri = intent.getData()
receivedKeyPath = receivedKeyUri.getPath()
It can get the path of the users own public PGP key file (from the
current send folder) like so:
bundle = intent.getExtras()
sendKeyPath = bundle.getString("sendKeyFile")
(The Bluetooth nic info for both devices can be made available in
similar ways.)
More information about the Freedombox-discuss
mailing list