安卓:我怎么可以通过蓝牙浏览远程设备的文件系统?蓝牙、可以通过、文件系统、我怎么

由网友(别隐身了,我早把你拉黑了)分享简介:我需要建立一个Android应用程序,使通过蓝牙/获取从远程设备的文件;该应用程序还必须浏览远程文件系统。我读过一些关于OBEX但确实没有发现任何例如对于Android,除了市场为蓝牙文件传输上的一些伟大的应用程序。怎么能在一个应用程序中实现? I need to build an Android app tha...

我需要建立一个Android应用程序,使通过蓝牙/获取从远程设备的文件;该应用程序还必须浏览远程文件系统。 我读过一些关于OBEX但确实没有发现任何例如对于Android,除了市场为蓝牙文件传输上的一些伟大的应用程序。 怎么能在一个应用程序中实现?

I need to build an Android app that puts/gets files from a remote device via Bluetooth; the app must also browse the remote filesystem. I've read something about OBEX but have really not found any example for Android, except some great apps on the market as Bluetooth File Transfer. How can it be implemented in an app?

推荐答案

既然有OBEX OPP / FTP暴露于在Android开发人员没有标准的方法/实施,你将有你自己去滚过的蓝牙API 这是足够强大的执行几乎所有的协议,你想,因为它反映了TCP套接字。

Since there is no standard method/implementation of OBEX OPP/FTP that is exposed to developers on Android, you will have to roll you own over the Bluetooth API which is powerful enough implement just about any protocol you want as it mirrors TCP sockets.

您必须做的第一件事是可以访问的文件系统。假设SD卡,这里是一个引导,否则你将需要root权限。然后,你想获得两个设备(样板code)之间的工作蓝牙连接。最后,你应该在Google上搜索了该协议规范OBEX OPP / FTP和实现它这很可能会需要最长时间。

The first thing you will have to do is get access to the filesystem. Assuming the SD Card, here is a guide otherwise you would need root access. Then you want to get a Bluetooth connection working between two devices (boilerplate code). Lastly you should Google up the protocol specification for OBEX OPP/FTP and implement it which is probably going to take the most time.

我是pretty的肯定,这对市场上的其他应用程序是如何做到这一点,因为它们需要以发送/接收文件和浏览文件系统的两个设备上的应用程序。我不能去深入的OBEX协议本身因为我不熟悉,但我可以在此之前,如果需要的一切详细说明。不过谷歌搜索变成了这同时实施这可能是有用的。

I'm pretty sure that's how the other apps on the marketplace do it as they require the app on both devices in order to send/receive files and browse the filesystem. I can't go in depth on the OBEX protocol itself as I'm not familiar with it but I can elaborate on everything before that if needed. However a google search turned up this which may be useful while implementing.

不知道这是否会帮助,但我已经看到了this已经工作了很多人发送文件。

Not sure if this will help but I've seen this to have worked for a lot of people to send files.

阅读全文

相关推荐

最新文章