X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=android%2Fexamples%2Fsimplebase%2Fsrc%2Fmain%2Fjava%2Forg%2Fiotivity%2Fbase%2Fexamples%2FBluetoothFragment.java;h=21e727ea7112fb172603581e548790515b76a211;hb=c315c87e07c4080ecd0ef488e7a1047bc3c509b2;hp=30b3d0ea41e54580e9e50da44150421eba0dd4aa;hpb=a01c5d0400bfa9fd51388c1c0bb6e0a5d64d0a2e;p=platform%2Fupstream%2Fiotivity.git diff --git a/android/examples/simplebase/src/main/java/org/iotivity/base/examples/BluetoothFragment.java b/android/examples/simplebase/src/main/java/org/iotivity/base/examples/BluetoothFragment.java index 30b3d0e..21e727e 100644 --- a/android/examples/simplebase/src/main/java/org/iotivity/base/examples/BluetoothFragment.java +++ b/android/examples/simplebase/src/main/java/org/iotivity/base/examples/BluetoothFragment.java @@ -178,7 +178,6 @@ public class BluetoothFragment extends Fragment implements super.onDestroy(); CaInterface.stopBtPairingService(); CaInterface.stopManagerService(); - CaBtPairingInterface.destroyEdrInterface(); if (mGatt != null) { mGatt.close(); mGatt = null; @@ -267,6 +266,7 @@ public class BluetoothFragment extends Fragment implements sb.append("Set Connect with : "); try { final String address = mBluetoothDevices.get(pos).getAddress(); + Common.setLeAddress(address); CaInterface.setAutoConnectionDevice(address); OcPlatform.OnResourceFoundListener resourceFoundListener = new OcPlatform.OnResourceFoundListener() { @@ -274,6 +274,12 @@ public class BluetoothFragment extends Fragment implements public void onResourceFound(OcResource ocResource) { Log.i(TAG, "onResourceFound : " + ocResource.getUri()); } + + @Override + public void onFindResourceFailed(Throwable throwable, String uri) { + Log.i(TAG, "findResource request has failed"); + Log.e(TAG, throwable.toString()); + } }; OcPlatform.findResource("", address + OcPlatform.WELL_KNOWN_QUERY, EnumSet.of(OcConnectivityType.CT_ADAPTER_GATT_BTLE),