react-native-bluetooth-escpos-printer-fork 0.0.11 → 0.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/android/build.gradle
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
buildscript {
|
|
2
2
|
repositories {
|
|
3
|
-
jcenter { url "
|
|
4
|
-
maven {url "
|
|
3
|
+
jcenter { url "https://jcenter.bintray.com/" }
|
|
4
|
+
maven {url "https://repo.spring.io/plugins-release/"}
|
|
5
5
|
mavenCentral()
|
|
6
6
|
maven {
|
|
7
7
|
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
|
|
@@ -222,7 +222,11 @@ public class RNBluetoothManagerModule extends ReactContextBaseJavaModule
|
|
|
222
222
|
if (adapter!=null && adapter.isEnabled()) {
|
|
223
223
|
BluetoothDevice device = adapter.getRemoteDevice(address);
|
|
224
224
|
promiseMap.put(PROMISE_CONNECT, promise);
|
|
225
|
-
|
|
225
|
+
try {
|
|
226
|
+
mService.connect(device);
|
|
227
|
+
} catch (Exception exception) {
|
|
228
|
+
promise.reject("Failed to connect via BluetoothService", exception);
|
|
229
|
+
}
|
|
226
230
|
} else {
|
|
227
231
|
promise.reject("BT NOT ENABLED");
|
|
228
232
|
}
|
|
@@ -349,7 +353,11 @@ public class RNBluetoothManagerModule extends ReactContextBaseJavaModule
|
|
|
349
353
|
BluetoothDevice device = adapter
|
|
350
354
|
.getRemoteDevice(address);
|
|
351
355
|
// Attempt to connect to the device
|
|
352
|
-
|
|
356
|
+
try {
|
|
357
|
+
mService.connect(device);
|
|
358
|
+
} catch (Exception exception) {
|
|
359
|
+
exception.printStackTrace();
|
|
360
|
+
}
|
|
353
361
|
}
|
|
354
362
|
}
|
|
355
363
|
break;
|