NMF-earth / nmf-app

Understand and reduce your carbon footprint 🌱 iOS & Android.
https://nmf.earth
GNU General Public License v3.0
498 stars 156 forks source link

Add Notification page for receiving scheduled notifications #229

Closed BatDroid closed 3 years ago

BatDroid commented 3 years ago

✅ I have read the contributing file

Summary

related to #213 . Adding a notification page for receiving scheduled notifications. I wasn't sure if I should use google translate for translation in other locales. as it is explained here, this page is only available on ios devices.

Changelog

New notification page available in settings page in ios devices. By turning on and giving permission, user will receive notification on every sunday 9 pm.

Demo

PierreBresson commented 3 years ago

@BatDroid Thanks for your PR! I've been investigating around android weekly notif and it seems that it has been done in this PR

You can see in expo/package/expo-notifications that WeeklyNotificationTrigger looks like what we want for Android

So I did a little experiment with WeeklyNotificationTrigger, so you can add "expo-notifications": "https://gitpkg.now.sh/PierreBresson/packages/expo-notifications?main", instead of "expo-notifications": "0.7.2" in package.json. Unfortunately, it doesn't work on my android so far...

BatDroid commented 3 years ago

I'll add the changes and check the pr that you mentioned in the following days

BatDroid commented 3 years ago

@BatDroid Thanks for your PR! I've been investigating around android weekly notif and it seems that it has been done in this PR

You can see in expo/package/expo-notifications that WeeklyNotificationTrigger looks like what we want for Android

So I did a little experiment with WeeklyNotificationTrigger, so you can add "expo-notifications": "https://gitpkg.now.sh/PierreBresson/packages/expo-notifications?main", instead of "expo-notifications": "0.7.2" in package.json. Unfortunately, it doesn't work on my android so far...

didn't work on my android either. here is my code: Screen Shot 1399-08-07 at 00 44 24 and here is the catch running it:

Screen Shot 1399-08-07 at 00 44 35

I believe it's better we wait till it is officially merged/tested & released.

PierreBresson commented 3 years ago

@BatDroid Good job, thanks a lot for the PR 🤗 Feel free to send my your address at contact @ nmf . earth if you want some stickers!