2015-11-04 66 views
1

在設置應用程序的通知部分,我的應用程序只在其下面列出了「徽章」,它應該有「徽章,聲音,橫幅「。流星雨:推送:通知設置中只有「徽章」而不是「徽章,聲音,橫幅」

由於這個原因,當新的通知進入時,我沒有得到「通知」,即沒有橫幅,沒有聲音,沒有振動。通知顯示在通知欄和鎖定屏幕以及徽章號碼更新中,但沒有警報。

任何想法如何解決這個問題?

我config.push.json看起來是這樣的:

{
"apn": { 
"passphrase": "passphrase",
 "key": "PushChatKey.pem",
 "cert": "PushChatCert.pem"
},
 "production":false, 
"badge": true,
 "sound": true,
 "alert": true,
 "vibrate": true
}

而且我發送通知如下:(類似iOS push notifications only showing badges. need sounds and banners too但使用不同的架構)

`Push.send({
from: 'Test',
title: 'Hello',text: 'World',
badge: 4,
query: {},
sound: 'default'
});` 

回答

1

我能夠使用服務器和客戶端上的Push.Configure({})設置來解決此問題。

Server代碼:

Push.Configure({ 
    apn:{ 
     passphrase:'password', 
     certData: Assets.getText('enter certificate pem file name'), 
     keyData: Assets.getText('enter key pem file name') 
    }, 
    production: false //or true if production 
}); 

客戶端代碼(包括警告:真正的是什麼做的把戲對我來說):

Push.Configure({ 
    badge:true, 
    sound:true, 
    alert:true 
}); 
+0

救了我的工作時間!希望RAIX更新時不會中斷。 – AshHimself