Skip to content

Commit

Permalink
feat(local-notifications): Add buttons for exact notifications settin…
Browse files Browse the repository at this point in the history
…gs (#654)
  • Loading branch information
jcesarmobile authored Jun 6, 2024
1 parent c2ac018 commit 2dc00f3
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/components/LocalNotificationTest.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,15 @@ export default function LocalNotificationTest({ permissions }: Props) {
}
};

const checkExact = async () => {
const res = await LocalNotifications.checkExactNotificationSetting();
console.log('res', res);
};
const openExact = async () => {
const res = await LocalNotifications.changeExactNotificationSetting();
console.log('res', res);
};

useEffect(() => {
if (permissions === 'granted') {
getPendingNotifications();
Expand Down Expand Up @@ -402,6 +411,12 @@ export default function LocalNotificationTest({ permissions }: Props) {
<IonButton onClick={removeDeliveredNotifications} expand="block">
Remove All Delivered Notifications
</IonButton>
<IonButton expand="block" onClick={checkExact}>
Check exact setting
</IonButton>
<IonButton expand="block" onClick={openExact}>
Open exact setting
</IonButton>
</section>
<IonList>
<IonListHeader>Notifications (swipe to remove)</IonListHeader>
Expand Down

0 comments on commit 2dc00f3

Please sign in to comment.