I have Android Studio 3.5.1 and was hoping that the included sample "Bluetooth Le Gatt" described here would allow me to connect to a PM5....the sample code scans for nearby BLE devices, but even though my PM5 is switched on and set to the "Select this PM5 ....." screen that appears when you pick "Turn Wireless On" I don't get anything returned to the sample app.
Has anybody managed to get this to work? Or am I barking up the wrong tree? (I want to write an Android App that can communicate wirelessly with the PM5)
Thanks in advance
David
Android Studio "Bluetooth Le Gatt" sample
- tijmenvangulik
- 500m Poster
- Posts: 64
- Joined: November 25th, 2012, 10:24 am
Re: Android Studio "Bluetooth Le Gatt" sample
Looks like the right tree to me. Most of the time there is a little detail wrong. Maybe the permissions. More details are needed to see what is wrong.
Tijmen
Tijmen
Re: Android Studio "Bluetooth Le Gatt" sample
Having managed to create a little Android app (not connected to any external device) I thought my next step would be to extend it to connect with the PM5 via BLE - hence my question. I did come across your Javascript API which looked interesting, but knowing nothing about Javascript and wanting to refine my newly emerging Android development skills I thought the BLE sample should meet my needs, but as I say, I can't get it to see my PM5.
Then I stumbled across this page, https://bandarra.me/2017/02/20/Fitness- ... Bluetooth/ where somebody has taken a different approach that I don't claim to understand but I could access his webapp (if that's what it's called) on my phone and it does see my PM5.....so maybe I should abandon my Android plans and adopt the technique demonstrated by ANDRÉ BANDARRA
Just stumbling around looking for best technology to use, only thing I definitely want is for my app to run on android, run without cables and to connect to PM5 to read meters covered in the current workout
David
Then I stumbled across this page, https://bandarra.me/2017/02/20/Fitness- ... Bluetooth/ where somebody has taken a different approach that I don't claim to understand but I could access his webapp (if that's what it's called) on my phone and it does see my PM5.....so maybe I should abandon my Android plans and adopt the technique demonstrated by ANDRÉ BANDARRA
Just stumbling around looking for best technology to use, only thing I definitely want is for my app to run on android, run without cables and to connect to PM5 to read meters covered in the current workout
David
- tijmenvangulik
- 500m Poster
- Posts: 64
- Joined: November 25th, 2012, 10:24 am
Re: Android Studio "Bluetooth Le Gatt" sample
This example only fixes the easy problem of connecting to the blue tooth events. But these events can not only a part of al the communication. The hard part is doing go get the csafe up and running and to get it working on all the platforms.
Ergometer.js (https://github.com/tijmenvangulik/ErgometerJS) will do everyting for you including usb support. If you know more about java then skipp JavaScript and directly start with typescript. This makes everything a lot easier.
But there are more libraries to choose from, including native closed source libraries from concept2.
Tijmen
Ergometer.js (https://github.com/tijmenvangulik/ErgometerJS) will do everyting for you including usb support. If you know more about java then skipp JavaScript and directly start with typescript. This makes everything a lot easier.
But there are more libraries to choose from, including native closed source libraries from concept2.
Tijmen
-
- Paddler
- Posts: 33
- Joined: October 30th, 2015, 11:10 pm
Re: Android Studio "Bluetooth Le Gatt" sample
For more browser-based solutions checkout Erg Arcade. The pm5-base sample application abstracts away all the comms so your app can just receive information from the monitor. Code available at GitHub.
Male, 46, 5'11", 100kg, log.
Re: Android Studio "Bluetooth Le Gatt" sample
Does your implementation of the Android app pick up other BLE devices? I don't have a PM5, but I have prototyped some BLE work with HR monitors. when you issue startScan what filters are you using?
500 1:27.9 1K 3:13.6 4m 1202 2K 6:49.4 5K 18:48.6 6K 22.25.0 30m 7777 10K 37.38.4 M/2 1:22:15.0 M 2:51.03.1