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

Add Bluetooth cancel functionality #318

Closed ericcornelissen closed 7 years ago

ericcornelissen commented 7 years ago

What

This Pull Request adds to the repository functionality to actually cancel the Bluetooth connection. Either by pressing the Cancel button in the WaitingActivity or the back button in any of the activities that appear in the Bluetooth connection process

Why

This Pull Request is needed because it makes it possible to cancel a Bluetooth connection whenever a user wants to. Besides that it also makes it so the actual connection is stopped, not just the activities.

How

This feature can be viewed/tested within the project by starting a Bluetooth connection and trying to cancel it from every activity. Be sure to check if you can immediately start a new connection, as this shows that the previous connection has been canceled.

Alternative implementation

None considered

Notes

Not sure if this.serviceLocator.getBluetoothHandler().stop(); is the correct way to stop a Bluetooth connection 🤔

jverbraeken commented 7 years ago

@ericcornelissen Did you test if this code works?

ericcornelissen commented 7 years ago

I did not 😅 Sorry, should've been more clear about that