# JPush_Server_PHP **Repository Path**: Yx_Lin/jpush_server_php ## Basic Information - **Project Name**: JPush_Server_PHP - **Description**: No description available - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-04-27 - **Last Updated**: 2021-04-27 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # JPush API PHP Client ### 1.角标 >android: ``` ->androidNotification('Hello Android', [ 'badge_add_num' => +1, 'badge_class' => 'pub.kilo.thirdpush.MainActivity', ]) ``` >iOS: ``` ->iosNotification(array( 'title' =>'Hello IOS', 'body' => '123' ), array( // 设置角标自动+1 'badge' => 1, )) ``` ### 2.自定义铃声 >android: ``` ->androidNotification('Hello Android', [ 'sound' => 'sound.caf', ]) ``` >iOS: ``` ->iosNotification(array( 'title' =>'Hello IOS', 'body' => '123' ), array( // 如果不需要自定义声音,推送的时候,iOS 的 sound 值保持默认,传 default ,不要传空! 'sound' => 'default', )) ``` ### 3.点击跳转 ``` ->androidNotification('Hello Android', [ // 华为/小米通道 'uri_activity' => 'pub.kilo.thirdpush.MainActivity', // OPPO/FCM 'uri_action' => 'pub.kilo.thirdpush.MainActivity', ]) ``` ### 4.下发策略 ``` ->options(array( 'third_party_channel' => (array( 'oppo'=>(array( 'distribution' => 'secondary_push', 'channel_id' => '', )), 'huawei'=>(array( 'distribution' => 'secondary_push', 'importance' => 'HIGH', 'channel_id' => '', )), 'xiaomi'=>(array( 'distribution' => 'secondary_push', 'channel_id' => '', )), 'meizu'=>(array( 'distribution' => 'secondary_push', )), 'vivo'=>(array( 'distribution' => 'secondary_push', )), )) )) ```