Ok, so IMO that sounds like a bug in the Android lib, so the UPS registration should be fired after 'onTokenRefresh' is called

Also, cordova question. Do we need to define our "UnifiedPushInstanceIDListenerService" in the plugin's config section for the manifest? Or is this, inside the AGPush lib good enough ?


On Mon, Jun 20, 2016 at 9:46 AM, Julio Cesar Sanchez Hernandez <jusanche@redhat.com> wrote:
Yes, getToken will return null until onTokenRefresh is called the first time when it gets the real value.

On Mon, Jun 20, 2016 at 9:06 AM, Matthias Wessendorf <matzew@apache.org> wrote:

On Sun, Jun 19, 2016 at 8:39 PM, Matthias Wessendorf <matzew@apache.org> wrote:
Looking at the JavaDoc for the getToken():

"the master token or null if the token is not yet available"

looks like on the android lib we should not have it return null ?

On Sat, Jun 18, 2016 at 3:17 PM, Matthias Wessendorf <matzew@apache.org> wrote:

when I launch a fresh and clean Cordova app (I am unable to reproduce this on our native Android HelloWorld), and open it the first time for registration, I am receiving a 400 status code from the server.

Uninstalling the app, and launching it again, show the the problem again, ONLY on Cordova...

This means either the deviceToken from Android is null or invalid (according to the pattern):

Doing some debugging, on the server, I see the provided token is actually null.

Is there a race condition or so on the client, for the initial launch of the app ? 

I added some logging on the client (see [1]), and indeed, it looks like, on Cordova, it is actually null:

Now... a few lines above... I see 'outdated' c2dm packages/permissions, and a GCM: "Missmatched messenger", it looks like something is still not correct.

Any thoughts ? 




aerogear-dev mailing list

aerogear-dev mailing list

Matthias Wessendorf

blog: http://matthiaswessendorf.wordpress.com/
twitter: http://twitter.com/mwessendorf