0

我正在使用 app42 打磨和接收推送通知。当我尝试使用通过 JAVA 调用的 JS 函数“registerForPush”注册使用时,此消息在 LOG 中显示:

“CordovaLog(3108):: Line 1: Uncaught ReferenceError: registerForPush 未定义”

请帮忙。

问候!

4

1 回答 1

0

If you are using App42 Phone Gap Sample: it contains

  • registerForPush(GCMRegId) function is written in index.html file its not the part of app42.js.

  • So if you want to customize it in your own app you can use below code in Html file.

    var push = new App42Push(); push.storeDeviceToken("Your userName",GCMRegId,'ANDROID');

于 2014-08-13T09:08:49.353 回答