App42 Phonegap register user

204 views Asked by At

I´m using app42 to sand and receive push notifications. When I try to register use using the JS function "registerForPush" called via JAVA this message shows in LOG:

"CordovaLog(3108): : Line 1 : Uncaught ReferenceError: registerForPush is not defined"

Please help.

Regards!

1

There are 1 answers

0
VISHNU GARG On

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');