@linvix-sistemas/react-native-tectoysunmisdk
Version:
Pacote de comunicação com o hardware de Sunmi/Tectoy Automação, para efetuar impressão, comunicação com LCD entre outros.
40 lines (34 loc) • 942 B
JavaScript
import { NativeModules } from 'react-native';
const {
TectoySunmiSdk
} = NativeModules;
const FecharApp = async () => {
try {
return await TectoySunmiSdk.Utilidades_FecharApp();
} catch (error) {
throw error;
}
};
const ModoFullScreen = async function () {
let ativar = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
try {
return await TectoySunmiSdk.Utilidades_ModoFullScreen(ativar);
} catch (error) {
throw error;
}
};
const ReiniciarDispositivo = async function () {
let motivo = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
try {
return await TectoySunmiSdk.Utilidades_ReiniciarDispositivo(motivo);
} catch (error) {
throw error;
}
};
const NativeModuleTectToySunmiUtilsSDK = {
FecharApp,
ModoFullScreen,
ReiniciarDispositivo
};
export default NativeModuleTectToySunmiUtilsSDK;
//# sourceMappingURL=tectoysunmi-utils.js.map