【问题标题】:Android app for Send file from android to other device using bluetooth用于使用蓝牙将文件从 android 发送到其他设备的 Android 应用程序
【发布时间】:2016-08-27 18:11:39
【问题描述】:

我想将文件从我的 android 移动设备发送到另一台设备,但它应该自动完成,就像我有一个特定的 MAC 地址和该文件的文件路径一样,所以当我打开应用程序时,它会自动将该文件发送到特定的设备(已配对)。用户不允许做任何事情。我怎样才能做到这一点?我希望每 10 秒后该文件会自动从该设备传输到其他设备。 如果有人知道,那对我真的很有帮助。

【问题讨论】:

    标签: android bluetooth file-transfer mac-address data-transfer


    【解决方案1】:

    我会给你一些步骤来做到这一点

    1. 首先,您必须在第一个设备中创建一个计时器,用于自动连接到第二个设备。在中使用蓝牙库很好 https://github.com/omaflak/Bluetooth-Library 或者他的样本https://github.com/omaflak/Bluetooth-Android

    2. 通过套接字创建连接后。您将通过 TCP 或 UDP 发送文件。我认为这取决于你

    How to send file from Android device to other device through Bluetooth by code https://github.com/RamolaWeb/BluetoothSend

    【讨论】:

    • 如何使用 TCP 或 UDP 发送文件?如果您有一些链接或代码,请与我分享。
    猜你喜欢
    • 2012-02-29
    • 1970-01-01
    • 1970-01-01
    • 2012-04-06
    • 2023-03-03
    • 1970-01-01
    • 1970-01-01
    • 2013-08-31
    • 1970-01-01
    相关资源
    最近更新 更多