Review Request 122020: Make a bluetooth backend for Android

Albert Vaca Cintora albertvaka at gmail.com
Tue Jan 13 08:33:55 UTC 2015


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/122020/#review73905
-----------------------------------------------------------


Looks pretty good, but you should test it! I recommend you to start with something simple: you don't need to support payloads or even encryption to test that the connection works. Then add more stuff gradually. The same goes for asking the user to enable bluetooth, first make the basics of the backend work, and then we will figure out all the details around.


src/org/kde/kdeconnect/Backends/BluetoothBackend/BluetoothLink.java
<https://git.reviewboard.kde.org/r/122020/#comment51378>

    You are not calling .start() on this thread.



src/org/kde/kdeconnect/Backends/BluetoothBackend/BluetoothLink.java
<https://git.reviewboard.kde.org/r/122020/#comment51381>

    If the np doesn't have a payload (which is what happens most of the times, payloads are only used when sending binary data like entire files) you are actually not sending anything! Don't worry about payloads yet, and start by implementing sending and receiving simple packages.


- Albert Vaca Cintora


On gen. 13, 2015, 1:12 a.m., Saikrishna Arcot wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/122020/
> -----------------------------------------------------------
> 
> (Updated gen. 13, 2015, 1:12 a.m.)
> 
> 
> Review request for kdeconnect.
> 
> 
> Repository: kdeconnect-android
> 
> 
> Description
> -------
> 
> (Note that this isn't ready for merging yet.)
> 
> This is an initial implementation of a bluetooth backend. This backend implementation can be run only on Android 4.0.2 or higher. The implementation as-is only looks at already-bonded devices; it does not start a discovery session to see other bluetooth devices nearby.
> 
> There are several things that need to be worked out.
> 
> 1. When requesting permission to enable Bluetooth (if it's not already enabled), `startActivityForResult` needs to be called. However, this must be called by a class that implements `Activity`. One possible solution is to call this on the home screen. Another is to just not request it.
> 2. I believe starting a discovery session also requires calling `startActivityForResult`, which has to be called from a class that implements `Activity`. The same solutions for the previous item exist here.
> 3. Options for enabling the Bluetooth backend need to be added to the settings window.
> 4. Some sections of code may warrant a new thread being created, as they may take a while to run.
> 
> 
> Diffs
> -----
> 
>   AndroidManifest.xml 6cbe4a7830cfe416fe98e42be143c0f26f2bf1e8 
>   src/org/kde/kdeconnect/Backends/BluetoothBackend/BluetoothLink.java PRE-CREATION 
>   src/org/kde/kdeconnect/Backends/BluetoothBackend/BluetoothLinkProvider.java PRE-CREATION 
>   src/org/kde/kdeconnect/BackgroundService.java 576425cf568e4b223d9840842803d7adabf6b990 
> 
> Diff: https://git.reviewboard.kde.org/r/122020/diff/
> 
> 
> Testing
> -------
> 
> Installed on my Android 4.1.2, and it correctly detected that there are 2 bonded devices. No crashes.
> 
> Note that since the KDE side doesn't have a bluetooth backend, much of the code wasn't executed.
> 
> 
> Thanks,
> 
> Saikrishna Arcot
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdeconnect/attachments/20150113/8e88122b/attachment-0001.html>


More information about the KDEConnect mailing list