Claw писал(а):
Как жешь вам тяжело оказываеться програмить-то
Ну вот, загуглил команду + слово форум :
http://androidforums.ru/topic/12676-bluetooth-obex/Все бы хорошо, но только obex push мы не используем.
И я пишу, используя конкретный инструмент - Qt.
Использую те классы, которые он мне предоставляет.
http://doc-snapshot.qt-project.org/qt5- ... odule.htmlЕсть там несколько интересных сигналов, слотов и функций, которые как бы намекают
Цитата:
[slot] void QBluetoothLocalDevice::pairingConfirmation(bool accept)
To be called after getting a pairingDisplayConfirmation(). The accept parameter either accepts the pairing or rejects it.
Accepting a pairing always refers to the last pairing request issued via requestPairing().
[signal] void QBluetoothLocalDevice::pairingDisplayConfirmation(const QBluetoothAddress & address, QString pin)
Signal by some platforms to display a pairing confirmation dialog for address. The user is asked to confirm the pin is the same on both devices. The pairingConfirmation() function must be called to indicate if the user accepts or rejects the displayed pin.
This signal is only emitted for pairing requests issues by calling requestPairing().
See also pairingConfirmation().
[signal] void QBluetoothLocalDevice::pairingDisplayPinCode(const QBluetoothAddress & address, QString pin)
Signal by some platforms to display the pin to the user for address. The pin is automatically generated, and does not need to be confirmed.
This signal is only emitted for pairing requests issues by calling requestPairing().
[signal] void QBluetoothLocalDevice::pairingFinished(const QBluetoothAddress & address, QBluetoothLocalDevice::Pairing pairing)
Pairing or unpairing has completed with address. Current pairing status is in pairing. If the pairing request was not successful, this signal will not be emitted. The error() signal is emitted if the pairing request failed. The signal is only ever emitted for pairing requests which have previously requested by calling requestPairing() of the current object instance.
void QBluetoothLocalDevice::requestPairing(const QBluetoothAddress & address, Pairing pairing)
Set the pairing status with address. The results are returned by the signal, pairingFinished(). On BlackBerry AuthorizedPaired is not possible and will have the same behavior as Paired. Caution: creating a pairing may take minutes, and may require the user to acknowledge.
Но я с этим колхозом паке не могу разобраться, да и к тому же они не на всех платформах работают.
Например на ubuntu сигнал
void QBluetoothLocalDevice::pairingDisplayConfirmation(const QBluetoothAddress & address, QString pin)
не вызывается, похоже.