I’m going through the Notification section in the advanced react native, and I received an error message " expo-permissions is now deprecated — the functionality has been moved to other expo packages that directly use these permissions (e.g. expo-location, expo-camera). The package will be removed in the upcoming releases."
Not sure what I need to do for this section of the code. Please let me know if you have any idea!
import * as Notifications from “expo-notifications”;
import * as Permissions from “expo-permissions”;
import AccountNavigator from “./AccountNavigator”;
import FeedNavigator from “./FeedNavigator”;
import ListingEditScreen from “…/screens/ListingEditScreen”;
import NewListingButton from “./NewListingButton”;
import routes from “./routes”;
instead of using :
import * as Permissions from “expo-permissions”;
const permission = await Permissions.askAsync(Permissions.NOTIFICATIONS);
we use:
through out the course, I’ve found 3 places from using “permissions”:
ImageInput component
import * as ImagePicker from “expo-image-picker”;
const { granted } = await ImagePicker.requestCameraPermissionsAsync();
useLocation hook
import * as Location from “expo-location”;
const { granted } = await Location.requestForegroundPermissionsAsync();
useNotification hook
import * as Notifications from “expo-notifications”;
const permission = await Notifications.getPermissionsAsync();
I hope this hope you understand what this sentence means:
"expo-permissions is now deprecated — the functionality has been moved to other expo packages that directly use these permissions (e.g. expo-location, expo-camera). The package will be removed in the upcoming releases. "