@rejaul/react-native-printer-kit 0.3.2 → 0.3.3

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.
@@ -1,5 +1,6 @@
1
1
  package com.rejaul.reactnativeprinterkit
2
2
 
3
+ import android.bluetooth.BluetoothManager
3
4
  import android.content.ComponentName
4
5
  import android.content.Context
5
6
  import android.content.Intent
@@ -112,7 +113,8 @@ class ReactNativePrinterKitModule(reactContext: ReactApplicationContext) :
112
113
  }
113
114
 
114
115
  override fun isBluetoothEnabled(): Boolean {
115
- return standalonePrinter.isBluetoothEnabled()
116
+ val manager = reactApplicationContext.getSystemService(BluetoothManager::class.java)
117
+ return manager?.adapter?.isEnabled == true
116
118
  }
117
119
 
118
120
  override fun hasBluetoothPermission(): Boolean {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rejaul/react-native-printer-kit",
3
- "version": "0.3.2",
3
+ "version": "0.3.3",
4
4
  "description": "Direct Bluetooth POS/thermal (ESC/POS) printer integration for React Native on Android — print raw text, images, PDFs, and full HTML/CSS content including Bangla and other non-Latin scripts.",
5
5
  "main": "./lib/module/index.js",
6
6
  "types": "./lib/typescript/src/index.d.ts",