Voici la réponse que je reçois de l'API RESTJe ne reçois pas de réponse de l'API REST en utilisant Retrofit Android
{
"statusCode": "200",
"statusData": "Updated Successfully",
"responseData": {
"bookingId": null,
"customerName": null,
"customerMobileNumber": null,
"patientMobileNumber": null,
"driverMobileNumber": "9090909090",
"deviceToken": "f4kc2epndRA:APA91bEXrl4OmlfRUU2M_mfj3khz53_-OgrOk_lpdYWg8hz4hN4yWEogL3eMobH9nPERyO13UN88zQQDUZn262VBv3gICv9BcNECppuJ_G0SlE-1qn57X5w9kMN_q9MXb6ilXQnlIl0A",
"bookedBy": null,
"emergencyType": null,
"emergencyLatitude": 17.443277115352867,
"emergencyLongitude": 78.45206458121537,
"emergencyGeoHashCode": null,
"hospital": null,
"customerId": 0,
"bookingForSelf": 0,
"bookingStatus": "ACCEPTED",
"customerApp": null,
"groupTypeId": 0,
"groupId": 0,
"gcmToken": null,
"hospitalLatitude": 17.8979999,
"hospitalLongitude": 78.7879989,
"hospitalGeoHashCode": null,
"vehicleNumber": null,
"driverName": "santhosh",
"ambulance_start_latitude": 17.786889,
"ambulance_start_longitude": 78.786999,
"vehicle_id": 1,
"booking_id": 201708240006,
"accepted_datetime": 1503556227596,
"vehicleAttributes": null,
"driverImage": "XXXXXX/pic1.png",
"duration": null,
"distance": null
}
}
est en dessous du code que j'ai essayé, BookingAcceptedResponseData
est la classe POJO
final Call<BookingAcceptedResponseData> upDBooking = apiService.updateBookingStat(updateBookingMap);
upDBooking.enqueue(new Callback<BookingAcceptedResponseData>() {
@Override
public void onResponse(Call<BookingAcceptedResponseData> call, Response<BookingAcceptedResponseData> response) {
System.out.println("####### Basic updateBookingStat response.body() : "+response.body());
System.out.println("####### Basic toString updateBookingStat response.body() : "+response.body().toString());
try {
if (response.body() != null) {
System.out.println("####### updateBookingStat response.body() : "+response.body().toString());
Intent it = new Intent(MainActivity.this, DashBoardActivity.class);
it.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK);
it.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
//it.putExtra("bookingDetails", bookingDetails);
finish();
}
}catch (Exception e){
e.printStackTrace();
}
}
@Override
public void onFailure(Call<BookingAcceptedResponseData> call, Throwable t) {
}
});
Je reçois la réponse comme [email protected]
de l'API REST Appel Je ne reçois pas les données actuelles.S'il vous plaît me aider.
Écrivez votre sortie imprimée ici ... – Wizard
@naveen pouvez-vous poster la classe 'BookingAcceptedResponseData' – akhilesh0707