Not the case in general (just tested deviceready with this app with hydration and it was fine) but possible its messing with your particular app. Do you have an App ID on PGB that reproduces this issue?
#2527859 is currently not hydrated and works fine although I can't
filter contacts for some reason, no doubt user error. It registers for
gcm and hits my server with the device id, and when I send a
notification it will get it and try to read contacts for the phone I
send, that filter is failing.
If I Hydrate it never registers for gcm.
I have tried moving the ondeviceready stuff all over with no luck.
Don't know if this matters but I haven't automated the association of
the gcm device id with my system and was manually getting it from the
device's call to my server so you won't be able to push to it, however
if it registers successfully with gcm and hits my server a brief
notification does show up after opening the app.
Ok, FINALLY got it to work by:
1. Putting AFTER all my script
tags loading js
2. Putting addEventListener('deviceready') at BEGINNING of
Hope this saves someone else from wasting a couple of days.
Glad you got it working.
Sounds like you were having a timing problem regarding when scripts were getting loaded and executed.
Moderation or something deleted the reference to the file, it should be:
1. Putting a script reference to cordova.js AFTER all my script tags.
2. Putting addEventListener('deviceready') at BEGINNING of $(document).ready
It looks like Hydration is only copying cordova.js to the hydrated app... phonegap.js is not being copied. This is an bug and will be fixed soon. The workaround in the meantime is to reference cordova.js instead of phonegap.js in your html files.
This has been fixed -- both cordova.js and phonegap.js should now be available to hydrated apps. That said I would in general use cordova.js so that apps will work with the phonegap/cordova cli.