问题
I am using the latest Phonegap Push Plugin for my Phonegap Application. It's working fine below Nougat but in Nougat the same code does not work. I have tried to debug several times, also cross verified at server side if there is anything missing but found the device is not recognized by the GCMSender. Also everytime I uninstall and reinstall the Application the registered device token is same whereas in case of the Pre Nougat devices, it's always different after each uninstall and fresh install. The device I am having is Nexus 6P.
回答1:
Finally after searching so much found the below answer:
Reboot your device since it must have got OTA update for Nougat. System's cache partition might not have been cleared. Seems to be an issue in Nougat. Below are the steps for rebooting and found the same Push Notification code working in Nougat as well:
-Power down your device
-Press and hold Volume Down and Power simultaneously until you see the boot screen
-Use Volume Down to navigate to Recovery Mode
-Press Power to confirm
-Wait until you see the Android robot then hold down Power.
-Press and release Volume Up
-Navigate with Volume Down to the Wipe Cache Partition option
-Press Power to select
-Use Volume Down to highlight the Yes option
-Press Power to select
-Press Power to reboot
Reference Link: https://productforums.google.com/forum/#!topic/nexus/xEssjbdwpgk
来源:https://stackoverflow.com/questions/40127914/phonegap-push-plugin-not-working-in-nougat