Sample code for integrating PushWoosh

thanks, solve it, but I use to ask, as I can encrypt or protect my code?

use EVAL and on start download core source from your server, encryption on apk is nothing, may help the UGLIFY tool but not 100%

Good Morning

I would to use your factory , when i deploy it on android device i get an error message is:

“Uncaught TypeError: Cannot read property ‘pushNotification’ of undefined”

if could help about this issue.

Thank you

Did you ever figure this out?

Maybe this sample repo can help you.

1 Like

Thank you for providing this code. Was able to register an android device. After debugging in the console, the console.warn may also need JSON.stringify as I am not able to see the push token. Also, not able to receive the push notification although sent successfully from Pushwoosh dashboard. After further reading, looks like an event handler is required for when the app is in the background and foreground; ideally even if the app is “killed” would be great.

Otherwise, this is a great start and look forward to seeing an updated version of the code.

Thank you @xifengzhu Will also try this sample to see if push notifications are received.

Hi @amugika Can you please share where did you add the missing ‘}’ within the code? Thanks.