Closed ericcornelissen closed 7 years ago
Nice work, Eric!
Have you already looked at another much simpler solution: drawing a single image and then using touch events to get the location of where the user pressed. Such a solution is more elegant, less code and has a lot (!) more precision than 16 buttons (each having 2560x1440 / 16 = 230,400 times less precision than OnTouchEvent(x, y))
@jverbraeken I don't think we need that kind of precision to make this work, and doing it that way could complicate things significantly for no good reason.
The reason I don't think we need that kind of precision is because of the image that I image will be displayed on top of the buttons. This should be an image with a few distinct figures/drawings that can easily be communicated. These figures will be pretty large so it easy for user to identify them on the screen and touch them in order to replicate the pattern of the master device.
There is really only one downside to this approach, which is that all images have to adjusted for the buttons so that the distinct elements are within the borders of the underlying buttons.
Relevant Issues: #107
Related Pull Requests: -
What
A simple initial activity which can be used to verify the identity of another user while connecting via Bluetooth in a visual manner. For now the activity only contains a grid of buttons, later on the buttons will be overlayed with an image to present a more user friendly interface. Each button can be identified and after clicking on 5 buttons the activity will automatically go to the next activity (currently the LoginActivity) and provide it with the selected pattern.
Why
As specified in #107 we need to create a secure way to pair with Bluetooth on top of the standard pairing method. This PR contains the first step towards creating this method.
How
You can run the Cucumber tests and see it there or you can force the code to open the new activity by adding:
Alternative implementation
Not considered
Notes
As mentioned before this PR only adds simple activity with some buttons. In future PRs there will be a few additions, for example: