ericcornelissen / NervousFish

An app for your :iphone: to exchange public-keys in a secure manner.
GNU Lesser General Public License v3.0
2 stars 4 forks source link

Adding the possibility of connecting through bluetooth and exchanging contacts, closes #64 #133

Closed TheBonheurs closed 7 years ago

TheBonheurs commented 7 years ago

What

This adds a bluetoothactivity that handles the pairingand discovering of devices which are nearby and also visualizes this data. After pairing, the androidBluetoothHandler will handle the connection by creating a secure RFCommSocket and either listening or writing to that socket. Afterwards subsequent threads will handle the actual connecting part and the read/write part.

Why

This is needed as this is one of the specified options to transfer data between to mobile devices. This together with #109 #107 ensures that the private/public keys can be exchanged securely.

How

This can be used by clicking the bluetooth logo in the main screen and afterwards clicking in the list of the paired/discovered devices.

Alternative implementation

This implementaion is heavily inspired by this and this is also the only way 😏

Notes

The logger still has to be implemented in the bluetoothActivity. The tests for the androidBluetoothHandler are clunky but do work. @ericcornelissen disabled the need for them as this part is hard to test.

jverbraeken commented 7 years ago

@TheBonheurs I didn't explain to you how the Eventbus worked, so I committed on your branch a correct example of how it should work: https://github.com/ericcornelissen/NervousFish/pull/133/commits/15b2d63e3601fc4af7ed374c23b3b8d8bf7fb2a3

A small explanation of how it works can be found here

TheBonheurs commented 7 years ago

I fixed the build before merging, just coveralls not happy with the drop in coverage. What do you think guys @jverbraeken @ericcornelissen @clenrock