メッセージ送信APIを利用することで、各プッシュサービスへ別々のメッセージを送信できます。
HttpClientBuilder httpclient = HttpClientBuilder.create(); String b64_authval = "1234567890abcdefghijklmnop=="; String url = "https://ホスト名:ポート/pushidmng/notify"; StringBuilder sb = new StringBuilder(); sb.append("{"); sb.append(" \"APNs\": {"); sb.append(" \"aps\": {"); sb.append(" \"alert\": \"test\","); sb.append(" \"sound\": \"bingbong.aiff\","); sb.append(" \"badge\": 7"); sb.append(" }"); sb.append(" },"); sb.append(" \"FJP\": {\"message\": \"fjp_message001\"},"); sb.append(" \"regIDs\": ["); sb.append(" \"1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef\","); sb.append(" \"12345678901234567890abc\""); sb.append(" ]"); sb.append("}"); HttpPost httpPost = new HttpPost(url); httpPost.setHeader("IMAPS-Authorization", "Basic " + b64_authval); httpPost.setHeader("Content-Type", "application/json; charset=UTF-8"); httpPost.setEntity(new StringEntity(sb.toString(),"UTF-8")); im_response = httpclient.build().execute(httpPost);