Skip to content
This repository was archived by the owner on Apr 4, 2023. It is now read-only.

Commit 482dd97

Browse files
feature: [iOS] enable handling of text input notifications #886
1 parent 19f46ad commit 482dd97

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

docs/MESSAGING.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,9 +195,15 @@ This results in a payload of:
195195
To register the app to receive interactive pushes you need to call `firebase.registerForInteractivePush(model)`.
196196
And you may hook to the `model.onNotificationActionTakenCallback` callback to know what action the user took interacting with the notification.
197197

198-
<img src="https://raw.githubusercontent.com/EddyVerbruggen/nativescript-plugin-firebase/master/docs/images/messaging/interactive01.png" height="270px" alt="Interactive Notification, part 1"/> <img src="https://raw.githubusercontent.com/EddyVerbruggen/nativescript-plugin-firebase/master/docs/images/messaging/interactive02.png" height="270px" alt="Interactive Notification, part 2"/> <img src="https://raw.githubusercontent.com/EddyVerbruggen/nativescript-plugin-firebase/master/docs/images/messaging/interactive03.png" height="270px" alt="Interactive Notification, part 3"/> <img src="https://raw.githubusercontent.com/EddyVerbruggen/nativescript-plugin-firebase/master/docs/images/messaging/interactive04.png" height="270px" alt="Interactive Notification, part 4"/>
198+
Each action has either type `button` or `input`, and you can set `options` to do any or all of:
199+
- Launch the app: `foreground`.
200+
- Only allow the action when the device is unlocked: `authenticationRequired`.
201+
- Make the text red to indicate something will be removed/deleted/killed: `destructive`.
202+
203+
Consider this example, where an interactive push notification is received which the user expands and picks the fourth option.
204+
He then types his reply, and (because of how the action was configured) the app launches and captures the reply.
199205

200-
The example shown above was created with the code below.
206+
<img src="https://raw.githubusercontent.com/EddyVerbruggen/nativescript-plugin-firebase/master/docs/images/messaging/interactive01.png" height="270px" alt="Interactive Notification, part 1"/> <img src="https://raw.githubusercontent.com/EddyVerbruggen/nativescript-plugin-firebase/master/docs/images/messaging/interactive02.png" height="270px" alt="Interactive Notification, part 2"/> <img src="https://raw.githubusercontent.com/EddyVerbruggen/nativescript-plugin-firebase/master/docs/images/messaging/interactive03.png" height="270px" alt="Interactive Notification, part 3"/> <img src="https://raw.githubusercontent.com/EddyVerbruggen/nativescript-plugin-firebase/master/docs/images/messaging/interactive04.png" height="270px" alt="Interactive Notification, part 4"/>
201207

202208
```typescript
203209
import { messaging } from "nativescript-plugin-firebase/messaging";

0 commit comments

Comments
 (0)