我有click_Action:'FCM_PLUGIN_ACTIVITY'在我从服务器端发送的消息仍然onNotification()
方法没有在android上执行。我是设备上的gettign推送通知,但它不在onNotification()
内。它在ios上工作正常。
以下是我的应用程序中的cordova版本。
"dependencies": {
"cordova-android": "^6.2.3",
"cordova-google-api-version": "0.0.1",
"cordova-ios": "^4.5.0",
"cordova-plugin-fcm": "git+https://github.com/ostownsville/cordova-plugin-fcm.git",
"cordova-plugin-geolocation": "2.1.0",
"cordova-plugin-inappbrowser": "1.2.0",
"cordova-plugin-network-information": "1.2.1",
"cordova-plugin-screen-orientation": "~2.0.2",
"cordova-plugin-splashscreen": "3.2.2",
"cordova-plugin-streaming-media": "^1.0.2",
"cordova-plugin-whitelist": "1"
}
我已经尝试了所有可能的解决方案来解决问题。有人可以帮我这个。
答案 0 :(得分:0)
我有完全相同的问题,无论我做什么,onNotification()都不会触发。
我终于使用了使用ionic native push的cordova's push plugin,它完美无缺。
下面是我所做的# Set the flag to a 'no' value - False - because
# we don't want to exit right now.
should_exit = False
# Start the game loop, using the flag to let the loop know
# when to exit.
while not should_exit:
...
if event.type == pygame.QUIT:
# If the user is quitting the game, exit the while
# loop.
should_exit = True