Cordova Plugin : 3.4.6

I'm calling registerDevice() after the device ready event fires. Before the user responds to the prompt, the error callback occurs. Then, after their response the success callback is called.

Results of this even though they DID choose to accept notifications:

{"type":"0","pushBadge":"0","pushSound":"0","enabled":"0","deviceToken":"7d4.....8a6b5","pushAlert":"0"}

So, my app thinks push was not actually authorized.

However, if the user closes the app completely and reopens, I get this after registerDevice():

{"type":"7","pushBadge":"1","pushSound":"1","enabled":"1","deviceToken":"7d4.....8a6b5","pushAlert":"1"}

Why does the first success callback indicate that push was not enabled? How can I solve this?

asked 06 Feb '15, 13:53
calendee-push's gravatar image

calendee-push
3115

Here's the "fix". You need to install a new version of the PushWoosh plugin with a commit that fixes the old "fail callback called before user answer prompt" problem.

Unfortunately, this patch is not in the latest release. So, you must install from that specific commit like this:

cordova plugin add https://github.com/Pushwoosh/pushwoosh-phonegap-3.0-plugin#c4a9e3313b0ae919540ccd7eb7110344174e53d1

Here's more detail : https://calendee.com/2015/02/06/pushwoosh-plugin-fix/

permanent link
answered 06 Feb '15, 14:54
calendee-push's gravatar image

calendee-push
3115

edited 06 Feb '15, 18:32

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×444
×352
×190

question asked: 06 Feb '15, 13:53

question was seen: 1,298 times

last updated: 06 Feb '15, 18:32