언어 설정

Menu
Sites
Language
Bluetooth Adapter: createBonding and unknown exception

My device is Samsung Gear S3 SM-R760 Frontier.

Tizen version is 3.0.0.2

I use this tutorial:http://https://developer.tizen.org/development/guides/web-application/connectivity-and-wireless/bluetooth

I want to connect with my mobile phone. After calling adapter.getKnownDevices I get one device with the name of my mobile and its MAC address of Bluetooth. 

Here is the fragment of my code:

function onBondingErrorCallback(e) {
    alert('Cannot create a bond, reason: ' + e.message);
}

function createBonding() {
   try {
      alert("Connection with "+BluetoothDevices[0].address);
      adapter.createBonding(BluetoothDevices[0].address, onBondingSuccessCallback, onBondingErrorCallback);
  }
  catch (err) {
      alert('createBonding error: '+err.message); 
  }
}

When I call my function createBonding I see the proper MAC address and then I see alert alert from onBondingErrorCallback:

Cannot create a bond, reason: unknown exception

Does anybody know what this "unknown exception" is?

Please, help me.

Edited by: Marek Jóźwik on 05 12월, 2018

Responses

1 댓글
Marek Jóźwik

I solved the problem.

In config.xml I changed:

required_version="2.3"

into:

required_version="3.0"