Browse Source

deprecated function to get permission to acess locationcupdating deprecated function to get permission to access the user's location

master
analuizaff 3 years ago
parent
commit
8a4b7ba3e9
  1. 4
      src/app/hooks/useLocation.js

4
src/app/hooks/useLocation.js

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

Loading…
Cancel
Save