I am constructing a B4A BLE app that needs a number of B4XPlusMinus SelectedValue fields (5 total) to be updated from a byte array (5 bytes in length) that is sent from the BLE peripheral. I am having trouble converting the incoming bytes to objects that are acceptable to replace the current B4XPlusMinus SelectedValue fields. For instance, the first B4XPlusMinus entry is set to "default" 50 by my code (pmFoo.SelectedValue = 50). I receive a byte with the value of 0x40 from the BLE peripheral that needs to replace the "default" SelectedValue of 50 with 64. The idea is to display to the user updated values that are currently active in the BLE peripheral within the B4XPlusMinus view (< 50 > would change to < 64 > as displayed to the user).
The basic question is: How do I convert a byte to an object that I can place into the B4XPlusMinus SelectedValue field?
Thanks in advance for any pointers and/or suggestions.
The basic question is: How do I convert a byte to an object that I can place into the B4XPlusMinus SelectedValue field?
Thanks in advance for any pointers and/or suggestions.