簡體   English   中英

將推送通知發送到特定頻道

[英]send push notifications to a specific channel

假設我訂閱了一個以上的頻道,如何將消息發送到特定頻道?

我使用了以下行:

push.setMessage(msg);
push.sendInBackground();

我還嘗試過使用push.setChannel(SPECIFIC CHANNEL); 但這沒用...

但是顯然這還不夠,因為它會將消息發送到所有通道。

您必須設置要推送到的頻道。

  public void pushData(String channel, String Message) {
    ParsePush push = new ParsePush();
    push.setChannel(channel);
    push.setMessage(Message);
    push.sendInBackground();
}

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM