UNPKG

react-native-thermal-pos-printer

Version:

React Native thermal printer package for POS systems supporting Xprinter and other popular brands

14 lines (13 loc) 708 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.requestBluetoothPermissions = requestBluetoothPermissions; var _reactNative = require("react-native"); async function requestBluetoothPermissions() { if (_reactNative.Platform.OS !== 'android') return true; const permissions = [_reactNative.PermissionsAndroid.PERMISSIONS.BLUETOOTH_SCAN, _reactNative.PermissionsAndroid.PERMISSIONS.BLUETOOTH_CONNECT, _reactNative.PermissionsAndroid.PERMISSIONS.ACCESS_FINE_LOCATION]; const results = await _reactNative.PermissionsAndroid.requestMultiple(permissions); return Object.values(results).every(result => result === 'granted'); } //# sourceMappingURL=permissions.js.map