I am using PGB 3.6.3 with plugin 2.4.0,these are my code
<script type="text/javascript">
pushNotification.register(channelHandler, errorHandler, { "channelName": "WPMPNS", "ecb": "onNotificationWP8", "uccb": "successHandler", "errcb": "jsonErrorHandler" }); //X1
pushNotification.register(successHandler, errorHandler, { "channelName": "WPMPNS", "ecb": "onNotificationWP8", "uccb": "successHandler", "errcb": "jsonErrorHandler" }); //X2
function channelHandler(event) { } //X3
function onNotificationWP8(e) { alert('onNotificationWP8'); } //X4
function successHandler(result) { alert(result.uri) } //X5
function jsonErrorHandler(error) { alert(error.code); alert(error.message); }
</script>
issue detail...(app is not open before,when the status bar appear the "Notification message",I click it,it mean "coldstart")
if I use "X1",the "X5" will trigger one time,strange,because I deliberate use the wrong words = > [channelHandler], errorHandler...it should be correct to the [successHandler], errorHandler if I use "X2",the "X5" will trigger twice time,strange,why will trigger twice times ? and the first time trigger will show the "result.uri" = > empty,but the second time is correct if I delete "X3",no mater I use "X1" or "X2",the "X5" will nerver trigger,why ?
when the app is open,the "X4" will always trigger and caught the right behavior,but when the app is not open,it mean coldstart to launch the app (click the status bar),"X4" never trigger
PS,Android and iOS that I use perfect well
该提问来源于开源项目:phonegap-build/PushPlugin