Skip to content

Commit 2dc00f3

Browse files
authored
feat(local-notifications): Add buttons for exact notifications settings (#654)
1 parent c2ac018 commit 2dc00f3

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/components/LocalNotificationTest.tsx

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,15 @@ export default function LocalNotificationTest({ permissions }: Props) {
309309
}
310310
};
311311

312+
const checkExact = async () => {
313+
const res = await LocalNotifications.checkExactNotificationSetting();
314+
console.log('res', res);
315+
};
316+
const openExact = async () => {
317+
const res = await LocalNotifications.changeExactNotificationSetting();
318+
console.log('res', res);
319+
};
320+
312321
useEffect(() => {
313322
if (permissions === 'granted') {
314323
getPendingNotifications();
@@ -402,6 +411,12 @@ export default function LocalNotificationTest({ permissions }: Props) {
402411
<IonButton onClick={removeDeliveredNotifications} expand="block">
403412
Remove All Delivered Notifications
404413
</IonButton>
414+
<IonButton expand="block" onClick={checkExact}>
415+
Check exact setting
416+
</IonButton>
417+
<IonButton expand="block" onClick={openExact}>
418+
Open exact setting
419+
</IonButton>
405420
</section>
406421
<IonList>
407422
<IonListHeader>Notifications (swipe to remove)</IonListHeader>

0 commit comments

Comments
 (0)