mirror of
https://github.com/jpush/jpush-phonegap-plugin.git
synced 2026-04-19 00:03:45 +08:00
update demo add receiveLocalNotification Event
This commit is contained in:
@@ -55,6 +55,16 @@ export class HomePage {
|
|||||||
}
|
}
|
||||||
alert('Open notification: ' + content);
|
alert('Open notification: ' + content);
|
||||||
}, false);
|
}, 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() {
|
getRegistrationID() {
|
||||||
|
|||||||
Reference in New Issue
Block a user