Android App无法读取0x7F之后的值

机器人先生

我有从ble设备接收数据的应用程序。首先它发送数据为|0/1|date1|month1|hour1|minute1|date2|month2|hour2|minute2|0x8A|

应用会读取除以外的所有值0x8A

当我提到某些网站时,似乎android应用程序只读取standard ASCIupto 0x7F如果是,我如何将数据转换为Extended ASCI我的数据作为String接收。

 @Override
        public void onCharacteristicRead(BluetoothGatt gatt,
                                         BluetoothGattCharacteristic characteristic, int status) {
            if (status == BluetoothGatt.GATT_SUCCESS) if (BleUuid.READ_TIME
                    .equalsIgnoreCase(characteristic.getUuid().toString())) {
                final String names = characteristic.getStringValue(0);
                runOnUiThread(new Runnable() {
                    public void run() {
                        char ff;
                        ff = names.charAt(9);
                        if (ff ==0x8a) {
                            line1.setText("Yes");
                        } else {
                            line1.setText("No");
                        }

请帮我解决这个问题。

机器人先生
if (ff == '\u008a') { 

对我有用

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

Android Resource无法找到资源ID#0x7f070024

有什么特别之处0x7f的?

为什么 Linux 支持 0x7f 映射?

为什么float.MaxValue 0xFF 0xFF 0x7F 0x7F而不是像int那样的0x7F,0xFF,0xFF,0xFF?

为什么(int)'\ xff'!= 0xff但(int)'\ x7f'== 0x7f?

Android Navigation Drawer:未找到 ID 0x7f0d0084 的视图

Java:如何使用大于0x7F的字节文字

错误:使用Gas组装时,表达式后为垃圾“ 0x7f”

java.lang.RuntimeException:无法启动活动android.content.res.Resources $ NotFoundException:资源ID#0x7f110002

android.content.res.Resources $ NotFoundException:资源ID#0x7f07006e

android.content.res.Resources $ NotFoundException:资源ID#0x7f060052

IllegalArgumentException:找不到ID为0x7f07004e android的视图

android.content.res.Resources $ NotFoundException:资源ID#0x7f07007e

Android Resources $ NotFoundException:资源ID#0x7f020052

Android 重复键未定义样式 Theme_Transparent = 0x7f130217

在Android Run上获取错误:android.content.res.Resources $ NotFoundException:资源ID#0x7f080058

Android SQLIte错误:无法从CursorWindow读取行0,列1

Flutter App在android studio 3.5之后将无法构建appbundle / APK或在Android上运行

无法从registry.bin [ANDROID STUDIO]中读取缓存值

无法读取android调试密钥

尝试打开 Googlemaps 时出现 android.content.res.Resources$NotFoundException: Resource ID #0x7f020059 错误

Android致命信号11(SIGSEGV)位于0x636f7d89(代码= 1)。如何找到它?

android.content.res.Resources $ NotFoundException:字符串数组资源ID#0x7f070002

android.app.Application无法转换为android.support.v7.app.AppCompatActivity

无法解析导入的android.support.v7.app.MediaRouteActionProvider

导入android.support.v7.app无法解析

如何解决android.content.res.Resources $ NotFoundException:资源ID#0x7f070187类型#0x4无效

爪哇 - \ PL [\ x00- \ 0x7F部分] +正则表达式未能得到利用String.match非英语字符

android java.lang.IllegalStateException:无法从CursorWindow读取第0行,第0行