android - Java- Data parse on Andorid device BLE -


i need data parsing. have device send android phone measured data in 7 byte format x801fff191fff19

first byte head (0x80)

next 3 bytes 24 bit data1

and last 3 bytes 24 bit data2

because newbie in java programming, want modify android app github zh2x/spo2-ble-for-android. gatt service , gatt characteristics works.

i have problem reading data. there reading byte after byte , converting integer. , want data1 bytes 1 integer value , data2 bytes 1 integer value.

this link dataparse java file

would willing me?

you @

byte[] data1 = arrays.copyofrange(servicedata, 2, 5); 

together byte array , int conversion in java


Comments

Popular posts from this blog

javascript - Confirm a form & display message if form is valid with JQuery -

Retrieving ETA (estimated time of arrival) with Google Distance Matrix API and public transit as transport mode -

ionic framework - Meteor - Error: Failed to execute 'insertBefore' on 'Node' -