我不知道该如何发送ChatNotification函数。
private void sendNotificationToPatner(String token) {
SendNotificationModel sendNotificationModel = new SendNotificationModel("check", "i miss you");
RequestNotification requestNotificaton = new RequestNotification();
requestNotificaton.setSendNotificationModel(sendNotificationModel);
//token is id , whom you want to send notification ,
requestNotificaton.setToken(token);
ApiInterface apiService = ApiClient.getClient().create(ApiInterface.class);
retrofit2.Call<ResponseBody> responseBodyCall = apiService.sendChatNotification(requestNotificaton);
responseBodyCall.enqueue(new Callback<ResponseBody>() {
@Override
public void onResponse(retrofit2.Call<ResponseBody> call, retrofit2.Response<ResponseBody> response) {
Log.d("kkkk","done");
}
@Override
public void onFailure(retrofit2.Call<ResponseBody> call, Throwable t) {
Log.e("Failure", "onFailure: Task dropped" );
}
});
}