Android:通过蓝牙可接受的文件类型存在问题
我在将文件推送到 Nexus One 时遇到问题。
在我看来,我的手机只接受一小部分文件类型(例如 jpg、gif 等)。
我最近尝试将其他文件推送到我的手机(在我的例子中是 gpx),但我的手机自动拒绝了它。
有没有办法在我的程序中绕过或扩展此过滤器?
还有一种方法可以通过服务捕获这些文件吗?
I've got a problem with pushing files to my Nexus One.
It seems to me that there is only a small selection of file types that are accepted by my phone (such as jpg, gif and so on).
I recently tried to push other files to my phone (in my case gpx) and my phone rejected it automatically.
Is there a way to bypass or extend this filter in my program?
Is there also a way to catch those files by a service?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我以前也遇到过这个错误。它会说“文件不接受:目标设备声称它不会接受您尝试发送的类型的文件”或“错误,设备不接受这种类型的文件”这是因为没有权限接受此文件文件。您必须在 Manifest 文件中添加权限。
在活动下输入类似这样的内容!
I've got this error before. It would say "File Not Accepted: The target device claims it will not accept a file of the type you are trying to send" or "Error, device does not accept files of this type" This is because of not having permission to accept this file. You have to add permission in the Manifest file.
Under the activity enter something like this!
您可以尝试为您期望收到的文件扩展名添加意图过滤器,请参阅 针对特定文件扩展名的 Android 意图过滤器?
You could try to add intent filters for the file extensions you expect to receive, see Android intent filter for a particular file extension?