File tree 1 file changed +29
-0
lines changed
1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -133,6 +133,35 @@ CustomNotification({
133
133
| ` color ` | Text color|
134
134
| ` ZeroTime ` | Time at which zero comes|
135
135
136
+ ### Event Handling
137
+
138
+ ``` javascript
139
+ import { onEvent } from " react-native-custom-timer-notification" ;
140
+
141
+ // Listen for notification interactions (press/cancel)
142
+ onEvent (event => {
143
+ const { action , payload } = event ;
144
+
145
+ switch (action) {
146
+ case ' press' :
147
+ // Handle notification press/click
148
+ console .log (' Notification pressed:' , payload);
149
+ break ;
150
+ case ' cancel' :
151
+ // Handle notification dismissal
152
+ console .log (' Notification cancelled:' , payload);
153
+ break ;
154
+ }
155
+ });
156
+
157
+ ### Remove Notifications
158
+
159
+ ` ` ` javascript
160
+ import { RemoveTimer } from "react-native-custom-timer-notification";
161
+
162
+ // Remove a specific notification by ID
163
+ RemoveTimer(1);
164
+ ` ` `
136
165
137
166
## 🤝 Contributing
138
167
You can’t perform that action at this time.
0 commit comments