小编Ara*_*tat的帖子

将激光测距仪(Bosch Disto GLM 50 C)与智能手机(Android Studio)连接

我遇到了一个特殊的问题(我想).对于一个研究项目,我必须制作一个可以连接到激光测距仪(Bosch GLM 50 C Distometer)的Android应用程序.到目前为止,我在Stackoverflow和其他来源处经历了无数的教程和提示.

我是Android的新手,并且不堪重负.任务是创建一个应用程序,该应用程序读取博世设备上的测量距离,并通过蓝牙在智能手机上显示/保存.

现在我的具体问题是:是否可以读取蓝牙设备发送的数据(例如2.083m)?任何建议如何实现?

我能够与设备建立连接,按照本教程我发现:

package com.test.bluetooth;

import java.io.DataInputStream;

public class Main_Activity extends Activity implements OnItemClickListener {

TextView measuredValue;
ArrayAdapter<String> listAdapter;
ListView listView;
BluetoothAdapter btAdapter;
Set<BluetoothDevice> devicesArray;
ArrayList<String> pairedDevices;
ArrayList<BluetoothDevice> devices;
public static final UUID MY_UUID = UUID.fromString("00001101-0000-1000-8000-00805F9B34FB");
protected static final int SUCCESS_CONNECT = 0;
protected static final int MESSAGE_READ = 1;
IntentFilter filter;
BroadcastReceiver receiver;
String tag = "debugging";
Handler mHandler = new Handler(){
    @Override
    public void handleMessage(Message msg) {
        // TODO Auto-generated method stub
        Log.i(tag, …
Run Code Online (Sandbox Code Playgroud)

io android bluetooth inputstream spp

9
推荐指数
1
解决办法
2659
查看次数

标签 统计

android ×1

bluetooth ×1

inputstream ×1

io ×1

spp ×1