从PC读取接收到Android手机的数据 [英] Read data received to android phone from a PC

查看:329
本文介绍了从PC读取接收到Android手机的数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要实施一种解决方案,以从通过USB电缆连接到PC的android设备上读取数据.也就是说,连接到PC的手机将通过NFC通过另一个android设备接收数据,其中PC-C#程序必须从插入的android手机中读取接收到的数据,如下所示.

I have a requirement to implement a solution to read data from an android device, connected to PC via a USB cable. i.e. the phone connected to the PC will receive data through another android device via NFC where the PC - C# program must read the received data from the plugged in android phone as show below.

[PC]<----(2. read data) usb cable----[android phone]<-----NFC (1. transmit string)-----[android phone]

我已经通过NFC通过此处的链接实现了数据传输- http://developer.android.com/guide/topics/connectivity/nfc/nfc.html .但是,当它通过NFC接收内容(一条小字符串消息)时,我能找到有关从android手机读取数据的任何参考.

I have implemented data transmission via NFC utlizing the link here - http://developer.android.com/guide/topics/connectivity/nfc/nfc.html . However, I could find any reference as to reading data from the android phone when it receives content (a small string message) via NFC.

我尝试了许多Google搜索,但由于我是该领域的新手,因此空手而归.如果您的专家可以指出一些有关如何实现此任务的教程/代码段/参考,我将不胜感激.

I tried many Google searches but ended up empty handed as I am novice in this field. I will really appreciate if you experts could point out some tutorials/ code snippets/ references on how to achieve this task.

如果这个问题重复出现或含糊不清,请原谅.我是该领域的新手,并且不知道要寻求在线帮助的关键字.

Please forgive if this question is repeated or vague. I am a novice to this field and not aware of keywords to look for online help.

谢谢:)

推荐答案

我认为这是您应该做的.接收到来自NFC的数据后,将其存储在SD卡中的预定义位置.同时运行一个连续线程为该特定文件执行adb拉取.如果adb pull下载文件,则操作完成.

I think this is what you should do. When the data from NFC is received, store it in the SD Card at a predefined location. At the same time run a continuous thread to do a adb pull for that specific file. If the adb pull downloads the file, you're done.

这篇关于从PC读取接收到Android手机的数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆