File tree Expand file tree Collapse file tree 2 files changed +34
-0
lines changed
Expand file tree Collapse file tree 2 files changed +34
-0
lines changed Original file line number Diff line number Diff line change 1919 * [ setBadge] ( #setbadge )
2020 * [ getBadge] ( #getbadge )
2121 * [ setLocalNotification] ( #setlocalnotification )
22+ * [ getLaunchAppNotification] ( #getlaunchappnotification )
2223 * [ 点击推送启动应用事件] ( #open-notification-launch-app-event )
2324 * [ 网络成功登陆事件] ( #network-did-login-event )
2425* [ Android Only API] ( #android-only-api )
@@ -292,6 +293,22 @@ JPushModule.setLocalNotification(
292293)
293294```
294295
296+ #### getLaunchAppNotification
297+
298+ 点击推送启动应用的时候原生会将该 notification 缓存起来,该方法用于获取缓存的 notification。
299+
300+ ``` javascript
301+ JPushModule .getLaunchAppNotification ( notification => {
302+ if (notification === undefined ) {
303+ // 说明应用不是通过点击通知启动的,是通过点击应用 icon
304+ } else if (notification[' aps' ] === undefined ) {
305+ // 说明是 local notification
306+ } else {
307+ // 说明是 remote notification
308+ }
309+ })
310+ ```
311+
295312#### 点击推送启动应用事件
296313
297314** NOTE
** : iOS 需要安装到
[email protected] + 。
Original file line number Diff line number Diff line change 1919 * [ setBadge] ( #setbadge )
2020 * [ getBadge] ( #getbadge )
2121 * [ setLocalNotification] ( #setlocalnotification )
22+ * [ getLaunchAppNotification] ( #getlaunchappnotification )
2223 * [ Open Notification Launch App Event] ( #open-notification-launch-app-event )
2324 * [ Network Did Login Event] ( #network-did-login-event )
2425* [ Android Only API] ( #android-only-api )
@@ -263,6 +264,22 @@ JPushModule.setLocalNotification(
263264)
264265```
265266
267+ #### getLaunchAppNotification
268+
269+ Get Launch app's notification, this function will get the launch notificatiton from cache .
270+
271+ ``` javascript
272+ JPushModule .getLaunchAppNotification ( notification => {
273+ if (notification === undefined ) {
274+ // application was launch by tap app's icon
275+ } else if (notification[' aps' ] === undefined ) {
276+ // application was launch by tap local notification
277+ } else {
278+ // application was launch by tap remote notification
279+ }
280+ })
281+ ```
282+
266283#### Open Notification Launch App Event
267284
268285** NOTE
** : iOS need update to
[email protected] +
You can’t perform that action at this time.
0 commit comments