Skip to main content

Function: useLocationPermission()

useLocationPermission(): PermissionState

Returns whether the user has granted permission to use the Location, or not.

If the user doesn't grant Location Permission, you can use the <Camera> but you cannot capture photos or videos with GPS EXIF tags (the location={..} prop).

Returns​

PermissionState

Example​

const { hasPermission, requestPermission } = useLocationPermission()
const canCaptureLocation = hasPermission

return <Camera photo={true} location={canCaptureLocation} />

Defined in​

hooks/useCameraPermission.ts:98