For me, onNotification functions, which are also not called, even when the application was in the foreground.
Reading on the Internet I made sure that the sender ID was 100% correct, as the register function will return success, even if it is incorrect.
Now you have proposed clearing the Dalvik cache, which seems to require a built-in device or recovery tools (something that my Galaxy Nexus test device does not have by default). However, it made me try to rename the application in the hope that it would not use the current cache. It worked.
My steps to solve the problem:
- Change
id widget value in config.xml file - Remove the application from the phone in the application settings
- In my case, the application was removed from the Phonegap build service and a new one was created (not sure if this is necessary)
- Rebuild and deploy the application
Run and run, and the onNotification function worked! :)
Update
The same thing started again, I tried to prevent the rooting of my device, since it would need a full cleaning, but my correction did not repeat the second time.
After rooting the device and installing the recovery tool, clearing the Dalvik cache did the trick ...
source share