capacitor-request-location
v0.0.8
Published
A Capacitor plugin to check and request permission for using location service (Android)
Downloads
1,519
Readme
capacitor-request-location
A Capacitor plugin to check and request permission for using location service (Android)
Install
npm install capacitor-request-location
npx cap sync
Example
import { RequestLocation } from 'capacitor-request-location';
checkLocationPermission = async () => {
await RequestLocation.checkLocationPermission();
};
API
isLocationPermissionGranted()
isLocationPermissionGranted() => Promise<{ isGranted: boolean; }>
Returns: Promise<{ isGranted: boolean; }>
isAlwaysAllowLocation()
isAlwaysAllowLocation() => Promise<{ isAlways: boolean; }>
Returns: Promise<{ isAlways: boolean; }>
requestPermission()
requestPermission() => Promise<void>