Licence and source code for samsung_ble_sdk_200.jar #385

Open
krt16s opened this Issue Apr 25, 2016 · 7 comments

Projects

None yet

3 participants

@krt16s
krt16s commented Apr 25, 2016

Could you please state the licensing terms for samsung_ble_sdk_200.jar and provide a link to the source code?

@rickyepoderi
Contributor

I've been investigating this issue for a while and my findings are the following:

  • This library is for the Bluetooth Low Energy client API (runnerup uses it for the Heart Rate monitor). It seems that BLE was integrated in stock Android in 4.3 but previously (for 4.2) samsung gave this library for some devices.
  • It is used only inside the class SamsungBLEHRProvider for HR monitoring provider, used for devices 4.2 with the jar installed in the system (S4 for example). It is used only for compiling, not included in the app.
  • The library was provided by samsung but not anymore. You can check the web archive page: http://web.archive.org/web/20131027012145/http://developer.samsung.com/ble
  • Now it can be downloaded via github: https://github.com/cjhuo/Android-Samsung-Ble-APIs-Bluedroid
  • I was unable to find the sources (I think the library was never open sourced) and no license is specified.

If this library is a problem for f-droid it would be possible to add a project property switch to not compile that provider. Something like:

./gradlew build -Porg.runnerup.hr.disableSamsungBLE=true
or
./gradlew build --project-prop org.runnerup.hr.disableSamsungBLE=true

Obviously some modifications are needed to load the SamsungBLEHRProvider using reflection when the class is not compiled. I can add the modifications if you think is useful (I want runnerup in f-droid). Another option is delete this provider completely. But first I need to know if the library is a problem for f-droid (I don't know the rules of the repository).

Comments are welcome! 😄

@krt16s
krt16s commented Jan 7, 2017

Well, it's a non-free (legal), non open-source (tech) binary. I don't think we should keep that within f-droid. So any plans of getting rid of it, either by removing, replacing or excluding it from a special build flavor, would be welcome.

To make sure: This is used only for Samsung devices with 4.0 to 4.2.x? (We dont build the froyo flavor iirc, so that wouldnt concern me).

@rickyepoderi
Contributor

The web archive pages says the following: "The Samsung BLE SDK is only supported on Android 4.2, 4.2.1 and 4.2.2. Please use the global Google BLE API for Android versions 4.3 and later. "

So I think it is only available for 4.2.x and, obviously, the device should be a samsumg with BLE (S4 seems to be one of the terminals that support it). If the users have upgraded the terminal to a newer android (4.3 and above) the stock android implementation is used.

@jonasoreland or any other member, what do you think? Is the project property a valid option? Or do you prefer removing the provider completely?

@jonasoreland
Owner
@rickyepoderi
Contributor

Hi,

I've been working on this and the result is in this branch:

https://github.com/rickyepoderi/runnerup/tree/remove-samsung-ble

The basics ideas are the following:

  • The checkLibrary method is moved out from SamsungBLEHRProvider to general HRManager to check the dependency without the class.
  • The SamsungBLEHRProvider is created using reflection instead of doing a common new over the constructor. This way the HRManager can compile without the SamsungBLEHRProvider class.
  • Finally I added a project property called org.runnerup.hr.disableSamsungBLE to avoid download the jar and exclude the SamsungBLEHRProvider class from the project.

I've tested the f-droid version (without the jar and it compiles and runs ok). The problem is that I cannot test the version with the samsung_ble_sdk_200.jar library (I don't have such a phone and version). I've just tested that the creation using reflection works (using another provider instead of samsung one).

Please check if you like the idea and, if someone is using a phone that depends on samsung_ble_sdk_200.jar, it would be nice to try the branch out.

Thanks!

@rickyepoderi
Contributor

Have you seen the modifications? What's your opinion?

@jonasoreland
Owner
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment