----以下方法前提確保你的設備掀淘,打開了此APP的通知提示。
正題------
我遇到的情況是油昂,安卓客戶端是有提示音和振動提示的革娄。
iOS端在極光的web后臺編輯消息 推送到我的手機有提示音和振動,通過我自己的后臺推送的消息就沒有提示音和振動冕碟。
下面貼上一段后臺的代碼
//向IOS平臺推送消息 JpushHelper.getJPushClient().sendPush(JpushHelper.buildPushObject_ios_audienceMore_regId(registrationID, msgContent));/**
* 構建推送對象:平臺是 Andorid 與 iOS拦惋,按照registrationId推送
* 推送內(nèi)容是 - 內(nèi)容為 msgContent 的消息,并且附加字段 from = JPush安寺。
*/publicstaticPushPayloadbuildPushObject_ios_audienceMore_regId(String registrationId,String msgContent) {
return PushPayload.newBuilder().setPlatform(Platform.ios()).setAudience(Audience.registrationId(registrationId)).setNotification(Notification.newBuilder()
.addPlatformNotification(IosNotification.newBuilder()
.setAlert(msgContent)
.setBadge(5)
.setSound("default")//這一步是關鍵厕妖,設置默認聲音,這樣就會使用手機本身的設置.addExtra("from","Jpush")
.build())
.build()).build();
}
我的問題是沒有設置“.setSound("default")”挑庶,如果你的情況和我的一樣可以試一下言秸,這個東西是需要后臺去改的;