Android设备和PC之间的蓝牙聊天

Bluetooth Chat between Android device and PC(Android设备和PC之间的蓝牙聊天)
本文介绍了Android设备和PC之间的蓝牙聊天的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以将蓝牙聊天示例与 PC 连接?如何将信息接收到 PC?我认为我可以使用 Android 设备中的串行端口配置文件 (SPP) 并在 PC 上打开一个常规的 COM 终端.实际上,我的应用程序需要将加速度计和其他传感器信息发送到 PC 以了解智能手机的位置.我希望你能帮助我.

Is it possible to connect the Bluetooth Chat sample with a PC? How can I receive the information to the PC? I thought that I can use the Serial Port Profile (SPP) from the Android device and open a regular COM Terminal on the PC. Actually my application requires sending the accelerometers and other sensors information to a PC in order to know the position of the smartphone. I hope you can help me.

推荐答案

你问了一个一般性的问题,所以我能做的最好的就是给你一个一般性的答案.这是一个两方面的问题.听起来你知道你在 android 端做什么,但我们是你在 PC 端绊倒.对?就PC端而言,您基本上需要实现蓝牙服务器".您可以使用 bluecove 库或标准 javax.bluetooth 库.

You've asked a general question, so the best I can do is give you a general answer. This is a two prong problem. It sounds like you know what you're doing on the android side of things, but we're you're stumbling is on the PC side. Right? As far as PC side goes, you're basically going to need to implement a "bluetooth server". You can use the bluecove library or the standard javax.bluetooth library.

这篇关于Android设备和PC之间的蓝牙聊天的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

How to target newer versions in .gitlab-ci.yml using auto devops (java 11 instead of 8 and Android 31 instead of 29)(如何在.gitlab-ci.yml中使用自动开发工具(Java 11而不是8,Android 31而不是29)瞄准较新的版本)
Android + coreLibraryDesugaring: which Java 11 APIs can I expect to work?(Android+core LibraryDesugering:我可以期待哪些Java 11API能够工作?)
How to render something in an if statement React Native(如何在If语句中呈现某些内容Reaction Native)
How can I sync two flatList scroll position in react native(如何在本机Reaction中同步两个平面列表滚动位置)
Using Firebase Firestore in offline only mode(在仅脱机模式下使用Firebase FiRestore)
Crash on Google Play Pre-Launch Report: java.lang.NoSuchMethodError(Google Play发布前崩溃报告:java.lang.NoSuchMethodError)