php 端自定义声音的附加字段怎么设置

hmkjwh
2018-12-06 09:05 1.2k 0
$client = new \JPush\Client("11111111111", "222222222222222222");
$result = $client->push()
    ->setPlatform('all')
    ->addAlias("1337779367338ccaa68b2c8303f17faf")
    ->addTag(array('pk'))
    ->androidNotification($content,[
            'extras' => [
                'sound' => 'widget://res/dingdan.mp3'
                ]
            ])
    ->iosNotification($content, [
            'sound' => 'sound',
            'badge' => '0',
            'extras' => [
                'sound' => 'widget://res/dingdan.mp3'
                ]])
    ->options(array(
            "apns_production" => false  //true表示发送到生产环境(默认值),false为开发环境
            ))
    ->send();        

这发送是始终发送不了附加字段的自定义声音

1个回答

热门排序
  • 你是这样设置后,消息没法发成功,还是客户端收到了消息后,取不到你传的 extra 值?