mirror of
https://github.com/jpush/jpush-phonegap-plugin.git
synced 2026-04-19 00:03:45 +08:00
Add jpush.receiveRegistrationId event.
This commit is contained in:
@@ -217,6 +217,14 @@ JPushPlugin.prototype.setCustomPushNotificationBuilder = function () {
|
||||
}
|
||||
}
|
||||
|
||||
JPushPlugin.prototype.receiveRegistrationIdInAndroidCallback = function (data) {
|
||||
if (device.platform === 'Android') {
|
||||
data = JSON.stringify(data)
|
||||
var event = JSON.parse(data)
|
||||
cordova.fireDocumentEvent('jpush.receiveRegistrationId', event);
|
||||
}
|
||||
}
|
||||
|
||||
JPushPlugin.prototype.receiveMessageInAndroidCallback = function (data) {
|
||||
data = JSON.stringify(data)
|
||||
console.log('JPushPlugin:receiveMessageInAndroidCallback: ' + data)
|
||||
|
||||
Reference in New Issue
Block a user