1
내 AfterSave에서 푸시를 실행하면 CloudCode에 성공 문이 인쇄되지만 내 IOS 또는 Android 디바이스에서는 수신되지 않습니다. 여기 AndroidManifest.xml
이다Localhost/amazon beanstalk에서 호스팅되는 Parse-server로 푸시하지 않음
function senderPush(instalationId, receiverName, receiverNumber, message, status) {
var query = new Parse.Query(Parse.Installation);
query.equalTo("installationId", instalationId);
Push.send({
where: query,
data: {
header: "Status : " + status ,
...
badge: "Increment",
message : message,
status : status,
}
},{
success: function() {
console.log("notification sent");
},
error: function(error) {
console.log("Error sending senderPush: " + error);
},
useMasterKey: true
});
}
: 다음
는Cloudcode
이고
<receiver android:name="com.Myapplication.receiver.StatusReceiver" android:exported="false">
<intent-filter>
<action android:name="com.Myapplication.receiver.UPDATE_STATUS" />
</intent-filter>
</receiver>
<service
android:name="com.Myapplication.util.VoiceCommandService"
android:exported="false">
</service>
<meta-data android:name="com.parse.push.gcm_sender_id" android:value="id:XXXXXXXX" />'
여기 내 Application.Java
입니다 : 다른
Parse.addParseNetworkInterceptor(new ParseLogInterceptor());
Parse.initialize(new Parse.Configuration.Builder(getApplicationContext())
.applicationId(APPLICATION_ID)
.server(BRConstants.MY_IP_ADDRESS_SERVER).build()
);
모든 것이 잘 작동한다. 그러나 푸시는 효과가없는 것 같습니다. 오류 없음. Android에서 데이터를 전송할 때 요청이 있지만 응답이없는 Console에서이 메시지가 표시됩니다.
GCM request and response {"request":{"params":
{"priority":"normal","data":{"time":"2016-07-
18T19:50:01.949Z","push_id":"2SxLKSeThF","data":"{\"header\":\"Status :
Cancelled\",\"alertMessage\":\".....
MYDATA.......\":\"Cancelled\"}"}}}}
여기에 무엇이 누락되어 있는지 잘 모르겠습니다.