react-native-thermal-pos-printer
Version:
React Native thermal printer package for POS systems supporting Xprinter and other popular brands
10 lines (9 loc) • 535 B
JavaScript
;
import { PermissionsAndroid, Platform } from 'react-native';
export async function requestBluetoothPermissions() {
if (Platform.OS !== 'android') return true;
const permissions = [PermissionsAndroid.PERMISSIONS.BLUETOOTH_SCAN, PermissionsAndroid.PERMISSIONS.BLUETOOTH_CONNECT, PermissionsAndroid.PERMISSIONS.ACCESS_FINE_LOCATION];
const results = await PermissionsAndroid.requestMultiple(permissions);
return Object.values(results).every(result => result === 'granted');
}
//# sourceMappingURL=permissions.js.map