当我从高级Rest Client发送通知到将接收通知json的设备时,它也变成{},但效果很好! 我如何跟踪此错误来解决? 我发送通知的代码
FNotification fNotification = new FNotification("Food Maker", "You have new order " + order_number);
Log.e( "onDataChange: ",serverToken.getToken()+" " +fNotification.getBody().toString()+" "+fNotification.getTitle().toString() );
Sender content = new Sender(serverToken.getToken(), fNotification);
mService.sendNotification(content)
.enqueue(new Callback<MyResponse>() {
@Override
public void onResponse(Call<MyResponse> call, Response<MyResponse> response) {
Log.e("sendNotificationOrder", "onDataChange: "+order_number);
Log.e("onResponse: ", response.body() + "");
if (response.body().success == 1) {
Toast.makeText(Cart.this, "Thanks you, order place", Toast.LENGTH_SHORT).show();
finish();
} else {
Toast.makeText(Cart.this, "Failed!!", Toast.LENGTH_SHORT).show();
}
}