hyperboria / android

Android app for mesh networking with cjdns
GNU General Public License v3.0
159 stars 40 forks source link

QR code for peering #25

Open benhylau opened 9 years ago

benhylau commented 9 years ago

We have a standardized format to request for peering and distribute credentials. It's work-in-progress, but they will look something like this.

Peering Request

scheme://host/?type=peer&interface=udp&link=overlay&pk=wrbtPk&metadata=metadataOfAlice&cjdnsVersion=X&wrbtVersion=Y

Credentials

scheme://host/?type=credentials&interface=udp&link=overlay&pk=wrbtPk&message=encodedMessage&cjdnsVersion=X&wrbtVersion=Y

This text should be sent through one of the following methods.

cjdns2

All of them are easy to do, except QR code requires more work. Probably use zxing to encode and decode between text and QR.

benhylau commented 9 years ago

Oops forgot this https://github.com/BerlinMeshnet/cjdns-android/issues/2 exists.

hossain-khan commented 8 years ago

Hey @benhylau, I haven't done much research into it, but I guess we should be able to easily create QR code with the URL and data. But don't we need a defined scheme name instead of scheme:// and then register intent filters in the app so that this app becomes one of the option to open the URL?

benhylau commented 8 years ago

Yea like this poc: https://github.com/benhylau/wrbt-poc/blob/master/README.md

benhylau commented 8 years ago

Sample QR implementation here: https://github.com/bitcoin-wallet/bitcoin-wallet/blob/master/wallet/build.gradle#L16 https://github.com/bitcoin-wallet/bitcoin-wallet/blob/master/wallet/src/de/schildbach/wallet/util/Qr.java#L46