|
|
@ -6,7 +6,7 @@ function useLocation(defaultLocation = { longitude: 0.0, latitude: 0.0 }) { |
|
|
|
|
|
|
|
const getLocation = async () => { |
|
|
|
try { |
|
|
|
const { granted } = await Location.requestPermissionsAsync(); |
|
|
|
const { granted } = await Location.requestForegroundPermissionsAsync(); |
|
|
|
|
|
|
|
if (!granted) return; |
|
|
|
|
|
|
@ -31,7 +31,7 @@ function useLocation(defaultLocation = { longitude: 0.0, latitude: 0.0 }) { |
|
|
|
|
|
|
|
const getLocation = async () => { |
|
|
|
try { |
|
|
|
const { granted } = await Location.requestPermissionsAsync(); |
|
|
|
const { granted } = await Location.requestForegroundPermissionsAsync(); |
|
|
|
|
|
|
|
if (!granted) return; |
|
|
|
|
|
|
|