使用TTL将推送通知发送到Ionic应用程序

时间:2018-05-10 05:19:11

标签: php android firebase ionic-framework push-notification

我需要使用TTL将推送通知发送到离线Android应用。我使用PHP代码发送以下git(https://gist.github.com/prime31/5675017)中提到的推送。

我使用了以下两个终点 (https://android.googleapis.com/gcm/send& https://fcm.googleapis.com/fcm/send)发送推送通知。但推送通知是在TTL之后发送的。

我在TTL之后添加了此行以进行销毁。

$msg = array
(
'body' => 'This is a message sent from my http server',
'title' => 'From server side',
'priority' => 'high',
'sound' => 'default',
'time_to_live' => 3600
); 

以上代码也在上面的git代码的回复中提到了" FernandoFactor"。

我该如何解决这个问题?

0 个答案:

没有答案