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
It's not entirely clear from the above when your app will be able to handle the notification depending on it's state at the time the notification is received. For clarification, see the following table:
| App is open and foregrounded | Exponent.notification: origin: "received", data: Object | Same as Android
136
+
| App is open and backgrounded | Can only be handled if the notification is selected. If it is dismissed, app cannot know it was received. | Same as Android
137
+
| App is open and backgrounded, then foregrounded by selecting the notification | Exponent.notification: origin: "selected" | Exponent.notification: origin: "received" |
138
+
| App was not open, and then opened by selecting the push notification | Passed as props.exp.notification on app root component | props.exp.notification: origin: "selected" | props.exp.notification | props.exp.notification: origin: "received" |
139
+
| App was not open, and then opened by tapping the home screen icon | Can only be handled if the notification is selected. If it is dismissed, the app cannot know it was received. | Same as Android
134
140
135
141
## HTTP/2 API
136
142
@@ -140,9 +146,11 @@ Although there are server-side SDKs in several languages to help you send push n
140
146
141
147
Send a POST request to `https://exp.host/--/api/v2/push/send` with the following HTTP headers:
142
148
143
-
accept: application/json
144
-
accept-encoding: gzip, deflate
145
-
content-type: application/json
149
+
```
150
+
accept: application/json
151
+
accept-encoding: gzip, deflate
152
+
content-type: application/json
153
+
```
146
154
147
155
This API currently does not require any authentication.
It's not entirely clear from the above when your app will be able to handle the notification depending on it's state at the time the notification is received. For clarification, see the following table:
| App is open and foregrounded | Exponent.notification: origin: "received", data: Object | Same as Android
136
+
| App is open and backgrounded | Can only be handled if the notification is selected. If it is dismissed, app cannot know it was received. | Same as Android
137
+
| App is open and backgrounded, then foregrounded by selecting the notification | Exponent.notification: origin: "selected" | Exponent.notification: origin: "received" |
138
+
| App was not open, and then opened by selecting the push notification | Passed as props.exp.notification on app root component | props.exp.notification: origin: "selected" | props.exp.notification | props.exp.notification: origin: "received" |
139
+
| App was not open, and then opened by tapping the home screen icon | Can only be handled if the notification is selected. If it is dismissed, the app cannot know it was received. | Same as Android
134
140
135
141
## HTTP/2 API
136
142
@@ -140,9 +146,11 @@ Although there are server-side SDKs in several languages to help you send push n
140
146
141
147
Send a POST request to `https://exp.host/--/api/v2/push/send` with the following HTTP headers:
142
148
143
-
accept: application/json
144
-
accept-encoding: gzip, deflate
145
-
content-type: application/json
149
+
```
150
+
accept: application/json
151
+
accept-encoding: gzip, deflate
152
+
content-type: application/json
153
+
```
146
154
147
155
This API currently does not require any authentication.
0 commit comments