Files
address-verification-app/src/components/utlis/DeviceUtils.ts
Sayed Owais Ali 5b280edd97 updated sww bridge
2023-09-14 18:05:37 +05:30

16 lines
611 B
TypeScript

import { NativeModules } from 'react-native';
const { DeviceUtilsModule } = NativeModules; // this is the same name we returned in getName function.
// returns true if enabled, and false if disabled.
export const locationEnabled = (): Promise<boolean> => DeviceUtilsModule.isLocationEnabled();
// returns array of all the installed packages.
export const getAllInstalledApp = (): Promise<string> => DeviceUtilsModule.getAllInstalledApp();
export const alfredHandleSWWEvent = (error: Error) => {
const {message="", stack="", name=""} = error;
DeviceUtilsModule.handleSWWEvent(message, stack, name)
};