How to create UUID from string in android

后端 未结 6 1255
Happy的楠姐
Happy的楠姐 2020-12-29 01:53

In my app, I scan low energy Bluetooth for specific service uuid 2415. To convert the string 2415 into uuid I am using UUID serviceUUID = UUID.fromString(

6条回答
  •  醉酒成梦
    2020-12-29 02:20

    The accepted answer was provided in a comment by @Michael:

    Have you tried combining your short UUID with the Bluetooth base UUID? I.e. "00002415-0000-1000-8000-00805F9B34FB"? (assuming that you meant 2415 hexadecimal)?

    I'm converting that comment to an answer because I missed it first time I read through this thread.

提交回复
热议问题