简体   繁体   English

带有HC-05的蓝牙串行作为Android服务

[英]Bluetooth Serial as Android Service with HC-05

I've been having issues creating an app to auto-send data to an Arduino. 我在创建将数据自动发送到Arduino的应用程序时遇到了问题。 I've tried this . 我已经试过 Problem is, they're both focused towards Bluetooth communication from an activity, not from a service. 问题是,它们都专注于通过活动而非服务进行蓝牙通信。 I'm completely new to Android development, so... 我是Android开发的新手,所以...

With the first, I can't get past " Cannot resolve method "startActivityForResult " inside of the service.java. 首先,我无法超越service.java内部的“ Cannot resolve method "startActivityForResult ”。

KeepMeLocatedService.java KeepMeLocatedService.java

Edit: Spelling, it was spelled correctly in the program. 编辑:拼写,它在程序中正确拼写。

You have a typo on the method name. 您在方法名称上有错字。

The correct method name is startActivityForResult() . 正确的方法名称是startActivityForResult()

startActivityForResult() startActivityForResult()

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Arduino HC-05写入串行监视器,但不写入蓝牙(Android) - Arduino HC-05 writes to serial monitor but not Bluetooth (Android) 最佳实践 - Java 串行蓝牙连接 HC-05 - Best practice - Java serial bluetooth connection HC-05 Android InputStream无法从Bluetooth HC-05接收整个消息 - Android InputStream cannot receive the whole message from Bluetooth HC-05 从蓝牙输入流中提取数据的问题,使用安卓平板电脑和 HC-05 无线电发射器 - Problems with extracting data from Bluetooth input stream, using android tablet and HC-05 radio transmitter 如何从 android 应用程序发送值到 Arduino 蓝牙 HC-05 - How to Send Value from android app to Arduino Bluetooth HC-05 如何使用蓝牙模块HC-05从Arduino-uno发送数据并在Android中读取? - How to send data from Arduino-uno using Bluetooth module HC-05 and read it in Android? 通过 HC-05 蓝牙从 Arduino 传感器接收字符串数据到 Android Studio Textview - Receive string data from Arduino sensor to Android Studio Textview via HC-05 Bluetooth 如何开发与蓝牙“ HC-05”连接的Java桌面应用程序? - How to develop Java desktop application to connect with bluetooth “HC-05”? Arduino HC-05 蓝牙模块发送数据时断开连接 - Arduino HC-05 Bluetooth module disconnects when sending data Arduino蓝牙模块HC-05与Androidstudio app之间的连接 - Connection between Arduino bluetooth module HC-05 and Androidstudio app
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM