Hey guys.
Well i have a problem, or may i say some algo that i'm not figure out. -- really geek or just idiot...
First i'll tell the story.
I have a medical device, that record some stuff like (Blood Pressure, EKG...etc) after the measurement is finish, the device save data in his own memory.
Also have an android tablet with Bluetooth LE capabilities (Android v.7).
The main ideea is: tablet connect to medical device and download the saved data, that's all i need to do with with Gatt. - and this is my problem.
Tablet also has some class, that make some authentication, send data to some server, get some response...etc - those stuff are working perfectly, i don't have problem or issue with those stuff.
The functionality of tablet is: at some point in the app, u press a button on screen and tablet connect to medical device and read/save data from device memory, after that send those info to server.
What i've dont untill now: when i press the button, app intent new actvity, who check for bluetooth enabled, scan for device - filter scan ( i know the device name ), get the Gatt characteristics, get the UUID of Gatt Services, and the i have some checkpoint of the characteristics;
At some point i make the check of ACTION_DATA_AVAILABLE
if(BluetoothLeService.ACTION_DATA_AVAILABLE.equals(action)){ int[] data = intent.getIntArrayExtra(BluetoothLeService.EXTRA_DATA); ............... }
where BluetoothLeService is the service - is the originial samle Android sample that i've modified a little bit.
So my problem is... how to store the data broadcast from the medical device in some variable, and after that send it to server.
ps: the data i must receive is ArrayList - cuz' the device save more the 1 record (have like 30 posibile records), and one record can be one of the option of the device (EKG, or BP,...).
And exemple:
Record 1 : is for EKG - (and have some list of integers)
Record 2 : is for BP - (have only 2 integers - Systolic and Diastolic - SYS and DIA)
...etc
So if anyone have an ideea who should i saved those data... i'll give a beer
Thanks in advanced!