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

c# - Update a combobox from a presenter (MVP) -

How to understand 2 main() functions after using uftrace to profile the C++ program? -

How to put a lock and transaction on table using spring 4 or above using jdbcTemplate and annotations like @Transactional? -