mirror of
https://github.com/jpush/jpush-phonegap-plugin.git
synced 2025-02-21 04:32:59 +08:00
update demo add receiveLocalNotification Event
This commit is contained in:
parent
9c103753e6
commit
9ea65add1f
@ -55,6 +55,16 @@ export class HomePage {
|
||||
}
|
||||
alert('Open notification: ' + content);
|
||||
}, false);
|
||||
|
||||
document.addEventListener('jpush.receiveLocalNotification', (event: any) => {
|
||||
// iOS(*,9) Only , iOS(10,*) 将在 jpush.openNotification 和 jpush.receiveNotification 中触发。
|
||||
var content;
|
||||
if (this.devicePlatform == 'Android') {
|
||||
} else {
|
||||
content = event.content;
|
||||
}
|
||||
alert('receive local notification: ' + JSON.stringify(event));
|
||||
}, false);
|
||||
}
|
||||
|
||||
getRegistrationID() {
|
||||
|
Loading…
Reference in New Issue
Block a user