evollu / evollu/react-native-fcm
Perform network tasks for schedule notifications
- Dominant language
- Java
- Stars
- 1.7k
- Forks
- 661
- PR merge metrics
- No merged PRs in 30d
Description
Once `scheduleLocalNotification()` is set, the data can't be updated until the user opens the app and sets it again.
Performing a javascript task for `scheduledNotification()` would be extremely useful for updating a news feed and notifying the user of the latest.
Is this something in the works?
For example something like this would be extremely useful:
```
FCM.scheduleLocalNotification({
fire_date: new Date().getTime(),
repeat_interval: "day",
id: "randomId",
schedule_task: this.fetchLatestFeed(), <---- like this
});
async fetchLatestFeed() {
var url = 'someUrl...';
var data = await fetch(url).then((result)=> result);
var newContent = {title: data[0].title, body: data[0].body, big_text: etc etc.... };
return newContent;
}
```
The schedule_task could listen for the title and body objects and the update it accordingly?
I'm sure there's a better way than this, but just throwing an idea/request out there. it would be awesome to have something like this.
I know there's headlessJS, but the documentation is extremely poor for coders with no java skills.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.