0
我開發了一個Ionic 2應用程序並在Android模擬器上測試。未收到背景和內容可用的應用程序GCM通知= 1
當應用程序在後臺並且通知沒有標題,沒有消息和content-available = 1時,通知應直接發送到應用程序通知處理程序。但沒有發生。
我可以在前臺收到與應用程序通知。
如果我有一個標題和一條消息,我會在通知區域收到通知。但是我需要以靜默方式直接將通知發送到應用程序,而不通過通知區域。
這裏是我的代碼發送推送通知:
{
"delay_while_idle": true,
"priority": "high",
"sound": "default",
"color": "FFFF00",
//payload
"data": {
"content-available": "1",
"some_var": "some_value",
"ohter_var": "other_value",
}
}
我怎麼能發送無聲通知我的Android應用?
感謝您的回覆,但正如我說這是一個離子2應用程序。我不直接處理Java代碼或Android XML。此外,我不認爲這是一個前端配置問題,但一個GCM消息配置問題。 – Natanael