projects
/
platform
/
upstream
/
iotivity.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
replace : iotivity -> iotivity-sec
[platform/upstream/iotivity.git]
/
android
/
examples
/
simplebase
/
src
/
main
/
java
/
org
/
iotivity
/
base
/
examples
/
BluetoothFragment.java
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
(file)
--- 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();
super.onDestroy();
CaInterface.stopBtPairingService();
CaInterface.stopManagerService();
- CaBtPairingInterface.destroyEdrInterface();
if (mGatt != null) {
mGatt.close();
mGatt = null;
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();
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() {
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());
}
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),
};
OcPlatform.findResource("", address + OcPlatform.WELL_KNOWN_QUERY,
EnumSet.of(OcConnectivityType.CT_ADAPTER_GATT_BTLE),