This repo contains the source code of the TrainAround trainer-side app for android devices.
For more details on this project refer to its main repo.
Trainer-side app of TrainAround
Home Page: https://paciosoft.com/projects/trainaround
This repo contains the source code of the TrainAround trainer-side app for android devices.
For more details on this project refer to its main repo.
Two services:
- its heartrate characteristic
- RecognisedActivityCharacteristic
- CurrentSpeedCharacteristic
- PeaceCharacteristic
- StepCounterCharacteristic
I think that it would be useful to implement a good method to store and retrieve data in order to save the trainer name and eventually some other informations.
This would be useful also for the athleteApp.
In order to update the UI when new data arrives from the GATT clients:
A good mechanism for the notification could be a broadcast receiver (using LocalBroadcastManager) (but seems to be deprecated).
Otherwise consider this: https://developer.android.com/reference/androidx/lifecycle/LiveData
It would be a more polite approach.
Have a look on broadcast messages and intent filters, those method should help to pass informations on athletes informations changes between the service and the activity (and the list view).
So that the main acitivty / in general every other process that needs it, knows its status.
In this way the main activity would be able to restart the service when needed (for example in onResume).
Note:
if you implement this broadcast, please implement also the main activity side of it, in order to manage the status of the service.
At the moment the order changes every time a new data is available and broadcasted by the GATTServerService.
It should be better to implement an ordering function inside the broadcast receiver so that the athletes have a fixed order.
Add here as a comment the ordering method choosen.
That's all folks
order the athletes by one (or some) of their values.
According to their training status classify the athletes and show the status as a different color in the ListView (for example).
The sorting strategy could be starting from their training status.
This issue depends on the issue #15 solve that first.
The athlete obj should contain:
Find a way in the onConnectionStateChange method of the GATT server in the if block (newState == BluetoothProfile.STATE_CONNECTED)
to filter the connected devices that are not athletes' devices.
BluetoothDevice CONNECTED: DE:0F:D8:A2:F1:F9 - device name: Mi Smart Band 5 - device alias: Mi Smart Band 5
The GATT server should broadcast the name of the trainer / the name of the training session, so that the Athlete's client app would show some information useful to select the right training session.
Required:
Optional:
In this way only when the GATT server is broadcasting its presence a new client can join the network.
OPTIONAL:
Investigate on this log message and try to close every closeable resource.
https://stackoverflow.com/questions/56911580/w-system-a-resource-failed-to-call-release
According to their training status classify the athletes and show the status as a different color in the ListView (for example).
Define training status.
Implement a way to calculate the avg HR and other fields with moving avg / exponential moving average to obtain some aggregated field.
Comment here with the chosen aggregate data.
it is only a fact of xml modifications.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.