我正试图通过php将推送到android应用程序。我设置了amazon 帐户,并使用GCM 的服务器密钥创建了SNS平台。
使用AWS凭据,我编写了一个cron,它从数据库读取通知消息并使用amazon发布到sns服务。我将在cron中获取Amazon端点,并在其上发布通知。
我正在接收状态为、pass、和请求以进行通知。但是实际的通知并没有在设备上接收。
Array ( [data] => Guzzle\Service\Resource\Model Object ( [structure:protected] => [data:protected] => Array ( [MessageId] => ac9e1d0c-43a4-5d1a-833d-50c94465421d [ResponseMetadata] => Array ( [RequestId] => c1da8997-2e32-50d0-a092-c45229f36fd7 ) ) ) )我遵循的步骤是:
有人能告诉我确切的步骤吗?我有遗漏什么吗?
发布于 2016-12-24 03:11:54
使用json来讨论以下主题:
{
"default": "Msg test from sns",
"GCM": "{\"data\":{\"id\":\"161223182046\",\"badge\":1,\"message\":\"Msg test from sns\",\"title\":\"test\",\"_event\":{\"created\":1482547772}}}"
}对于端点退出默认行:
{
"GCM":"{\"data\":{\"id\":\"161223182046\",\"badge\":1,\"message\":\"Msg test from sns\",\"title\":\"test\",\"_event\":{\"created\":1482547772}}}"
}其中id和_event.created行对于每次推送都是唯一的。
https://stackoverflow.com/questions/30093644
复制相似问题