You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+56-2Lines changed: 56 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,8 +40,62 @@ res://
40
40
41
41
## Usage
42
42
43
-
After setup, the plugin will be ready to use.
44
-
Examples of usage can be found in the `main.gd` file provided in the repository.
43
+
After setup, the plugin will be ready to use. This section describes the main functions available for sending, scheduling, and managing notifications in your Godot Android project. Examples of usage can be found in the `main.gd` file included in the repository.
-`past_n_seconds` (`int`, optional): Delay in seconds before the notification is triggered (default is 0).
74
+
75
+
---
76
+
### Schedule a JSON-based notification after a delay
77
+
```gdscript
78
+
schedule_json(channel: String, json_name: String, past_n_seconds: int = 0) -> String
79
+
```
80
+
**Parameters:**
81
+
-`channel` (`String`): The notification channel identifier.
82
+
-`json_name` (`String`): Name of the JSON file containing notification data.
83
+
-`past_n_seconds` (`int`, optional): Delay in seconds before the notification is triggered (default is 0).
84
+
85
+
[Read this before use JSON](#considerations)
86
+
87
+
---
88
+
### Cancel a scheduled notification
89
+
```gdscript
90
+
cancel(notification_id: int) -> String
91
+
```
92
+
**Parameters:**
93
+
-`notification_id` (`int`): The ID of the notification to cancel. If the notification has already been sent, it will be removed from the notification bar.
94
+
95
+
96
+
## Considerations
97
+
-`NotificationNode` methods return a `String`. This is a stringified object. If needed, you can parse it with `NotificationResult.parse(res: String) -> NotificationResult` Currently, the available results are: `NotificationCreated`, `NotificationCanceled`, and `NotificationError`. This implementation is still basic, so the methods return a `String` to let you handle it as you find most appropriate.
98
+
- To save and modify JSONs use `JSONHandler.save_json(name: String, data: Dictionary = {})`.
0 commit comments