From ffc291d127e8d38763911cd7d9533e7f21f74485 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Llu=C3=ADs=20Sancho?= Date: Mon, 11 May 2020 19:00:17 +0200 Subject: [PATCH 1/4] Update build.gradle --- android/build.gradle | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index d86e4f51..829b472a 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,7 +1,7 @@ buildscript { repositories { - jcenter { url "http://jcenter.bintray.com/" } - maven {url "http://repo.spring.io/plugins-release/"} + jcenter { url "https://jcenter.bintray.com/" } + maven {url "https://repo.spring.io/plugins-release/"} mavenCentral() maven { // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm @@ -40,8 +40,8 @@ android { } repositories { - jcenter { url "http://jcenter.bintray.com/" } - maven {url "http://repo.spring.io/plugins-release/"} + jcenter { url "https://jcenter.bintray.com/" } + maven {url "https://repo.spring.io/plugins-release/"} mavenCentral() maven { // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm @@ -57,4 +57,4 @@ dependencies { implementation 'com.facebook.react:react-native:+' // From node_modules implementation group: 'com.android.support', name: 'support-v4', version: '27.0.0' implementation "com.google.zxing:core:3.3.0" -} \ No newline at end of file +} From 133e11c46fed146b505e0e7b00aba69110970074 Mon Sep 17 00:00:00 2001 From: Wesley Lima Date: Fri, 22 Aug 2025 09:30:35 -0300 Subject: [PATCH 2/4] fix: adjust compatibility with React Native --- android/build.gradle | 14 +++++++------- .../bluetooth/RNBluetoothManagerModule.java | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 55fa50df..6d4f602a 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,7 +1,8 @@ buildscript { repositories { - jcenter { url "http://jcenter.bintray.com/" } - maven {url "http://repo.spring.io/plugins-release/"} + google() + jcenter { url "https://jcenter.bintray.com/" } + maven {url "https://repo.spring.io/plugins-release/"} mavenCentral() maven { // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm @@ -20,7 +21,7 @@ buildscript { apply plugin: 'com.android.library' android { - compileSdkVersion 28 + compileSdkVersion 30 buildToolsVersion "28.0.3" defaultConfig { @@ -40,8 +41,8 @@ android { } repositories { - jcenter { url "http://jcenter.bintray.com/" } - maven {url "http://repo.spring.io/plugins-release/"} + jcenter { url "https://jcenter.bintray.com/" } + maven {url "https://repo.spring.io/plugins-release/"} mavenCentral() maven { // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm @@ -53,8 +54,7 @@ repositories { } dependencies { - implementation fileTree(dir: 'libs', include: ['*.jar']) implementation 'com.facebook.react:react-native:+' // From node_modules implementation group: 'com.android.support', name: 'support-v4', version: '27.0.0' implementation "com.google.zxing:core:3.3.0" -} +} \ No newline at end of file diff --git a/android/src/main/java/cn/jystudio/bluetooth/RNBluetoothManagerModule.java b/android/src/main/java/cn/jystudio/bluetooth/RNBluetoothManagerModule.java index c48a00f8..9585062c 100644 --- a/android/src/main/java/cn/jystudio/bluetooth/RNBluetoothManagerModule.java +++ b/android/src/main/java/cn/jystudio/bluetooth/RNBluetoothManagerModule.java @@ -10,8 +10,8 @@ import android.content.IntentFilter; import android.content.pm.PackageManager; import android.os.Bundle; -import android.support.v4.app.ActivityCompat; -import android.support.v4.content.ContextCompat; +import androidx.core.app.ActivityCompat; +import androidx.core.content.ContextCompat; import android.util.Log; import android.widget.Toast; From df6c19e429ba815b96270be51761655c8abd7a9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mui=C3=B1o=20Migallon?= Date: Mon, 6 Oct 2025 16:45:38 +0200 Subject: [PATCH 3/4] fix merge --- android/build.gradle | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index de707368..4f1da01b 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,9 +1,6 @@ buildscript { repositories { -<<<<<<< HEAD -======= google() ->>>>>>> 133e11c46fed146b505e0e7b00aba69110970074 jcenter { url "https://jcenter.bintray.com/" } maven {url "https://repo.spring.io/plugins-release/"} mavenCentral() @@ -60,4 +57,4 @@ dependencies { implementation 'com.facebook.react:react-native:+' // From node_modules implementation group: 'com.android.support', name: 'support-v4', version: '27.0.0' implementation "com.google.zxing:core:3.3.0" -} \ No newline at end of file +} From 8b9fbafdbd7b786a7b7375640799378614c5bdc5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mui=C3=B1o=20Migallon?= Date: Thu, 9 Oct 2025 22:47:08 +0200 Subject: [PATCH 4/4] update --- android/build.gradle | 4 ++-- .../bluetooth/RNBluetoothEscposPrinterPackage.java | 2 +- .../cn/jystudio/bluetooth/RNBluetoothManagerModule.java | 2 +- .../bluetooth/escpos/command/sdk/PrintPicture.java | 8 ++++---- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 4f1da01b..59ef28e3 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,6 +1,5 @@ buildscript { repositories { - google() jcenter { url "https://jcenter.bintray.com/" } maven {url "https://repo.spring.io/plugins-release/"} mavenCentral() @@ -54,7 +53,8 @@ repositories { } dependencies { + implementation fileTree(dir: 'libs', include: ['*.jar']) implementation 'com.facebook.react:react-native:+' // From node_modules - implementation group: 'com.android.support', name: 'support-v4', version: '27.0.0' + implementation 'androidx.core:core:1.12.0' implementation "com.google.zxing:core:3.3.0" } diff --git a/android/src/main/java/cn/jystudio/bluetooth/RNBluetoothEscposPrinterPackage.java b/android/src/main/java/cn/jystudio/bluetooth/RNBluetoothEscposPrinterPackage.java index bed59b5c..0a664fc8 100644 --- a/android/src/main/java/cn/jystudio/bluetooth/RNBluetoothEscposPrinterPackage.java +++ b/android/src/main/java/cn/jystudio/bluetooth/RNBluetoothEscposPrinterPackage.java @@ -31,4 +31,4 @@ public List> createJSModules() { public List createViewManagers(ReactApplicationContext reactContext) { return Collections.emptyList(); } -} \ No newline at end of file +} diff --git a/android/src/main/java/cn/jystudio/bluetooth/RNBluetoothManagerModule.java b/android/src/main/java/cn/jystudio/bluetooth/RNBluetoothManagerModule.java index 9585062c..3ac727bf 100644 --- a/android/src/main/java/cn/jystudio/bluetooth/RNBluetoothManagerModule.java +++ b/android/src/main/java/cn/jystudio/bluetooth/RNBluetoothManagerModule.java @@ -238,7 +238,7 @@ public void disconnect(String address, final Promise promise){ promise.reject("BT NOT ENABLED"); } - } + } @ReactMethod public void unpaire(String address,final Promise promise){ diff --git a/android/src/main/java/cn/jystudio/bluetooth/escpos/command/sdk/PrintPicture.java b/android/src/main/java/cn/jystudio/bluetooth/escpos/command/sdk/PrintPicture.java index 761b9e42..99d09f53 100644 --- a/android/src/main/java/cn/jystudio/bluetooth/escpos/command/sdk/PrintPicture.java +++ b/android/src/main/java/cn/jystudio/bluetooth/escpos/command/sdk/PrintPicture.java @@ -77,10 +77,10 @@ public static byte[] POS_PrintBMP(Bitmap mBitmap, int nWidth, int nMode, int lef */ public static byte[] Print_1D2A(Bitmap bmp) { - /* - * 使用下传位图打印图片 - * 先收完再打印 - */ + /* + * 使用下传位图打印图片 + * 先收完再打印 + */ int width = bmp.getWidth(); int height = bmp.getHeight(); byte data[] = new byte[1024 * 10];