【问题标题】:How to send push to specific devicetoken on php function如何在php函数上将推送发送到特定的设备令牌
【发布时间】:2017-06-23 19:45:50
【问题描述】:

我正在使用 Ionic Framework V1。 我已经通过 Postman 收到推送通知 而且我已经将所有设备令牌保存在我的数据库中,但我一直坚持在 php 函数中获取特定设备的任何推送。

curl -X POST -H "Authorization: Bearer API_TOKEN" -H "Content-Type: application/json" -d '{
"tokens": ["DEV_DEVICE_TOKEN"],
"profile": "PROFILE_NAME",
"notification": {
    "message": "This is my demo push!"
}

例子:

public function confirmAction($request){
    $action = $this->find($request->idtblAction);
    $action->idtblStatus=1;
    if($action->save()){
   //I need to send notification in this part
        return Response::json(array('success'=>'true'));
    }else{
        return Response::json(array('success'=>'false'));
    }
}

Ionic io 使用 Bearer key 和 profileapp 有什么想法吗?

【问题讨论】:

    标签: php ionic-framework push devicetoken


    【解决方案1】:

    我已经在不使用 php 的情况下解决了这个问题。我通过我的内部离子应用程序代码做到了。 谢谢大家!

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-10-20
      • 2012-05-28
      • 1970-01-01
      • 2018-01-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2010-11-23
      相关资源
      最近更新 更多