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