My service just use post method.
in my code :
my ApiInterFace Class
public interface ApiInterface {
@POST("srrvk")
@FormUrlEncoded
Call<JoinAllAllowedInnoResponse> GETJOINALLOWEDINNOLIST(@Field("a") Integer lastOrderId, @Field("b") Integer rowCount,@Header("wkey") String wkey);
}
and my getArrayList method is like
public void getJoinlist(Integer lastOrderId,Integer rowCount){
showProgressDialog("Please Wait...");
final String wkey = tinyDB.getString(Constant.wkey);
Log.d(CLASS_NAME, "wkey :" +wkey);
ApiInterface apiService = ApiClient.getClient().create(ApiInterface.class);
Call<JoinAllAllowedInnoResponse> call = apiService.GETJOINALLOWEDINNOLIST(lastOrderId,rowCount,wkey);
call.enqueue(new Callback<JoinAllAllowedInnoResponse>() {
@Override
public void onResponse(Call<JoinAllAllowedInnoResponse> call, Response<JoinAllAllowedInnoResponse> response) {
hideProgressDialog();
if (response.body() != null){
if(response.body().getEx() == null){
List<JoinAllAllowedInno> mJoinList = response.body().getJoinList();
mJoinAdapter.setJoinList(mJoinList);
if(mJoinList.size() == 0){
emptyMessage.setVisibility(View.VISIBLE);
}
}else {
getAlert(response.body().getEx());
}
}
}
@Override
public void onFailure(Call<JoinAllAllowedInnoResponse> call, Throwable t) {
hideProgressDialog();
Log.e(CLASS_NAME, t.toString());
}
});
}
my question is when I put a breakpoint at response : noting happened ?
Where is the problem ? Any advice or sample code ?
and my son is :
My json uses Dynamic header
"ex": null,
"c": [
{
"INNOID": 8,
"SHORTDESC": "***************",
"ORDERID": 1,
"JOINEND": 1519074000000,
"LONGDESC": "******************",
"JOINSTART": 1514754000000,
"DOCLINK": "*****************************",
"TEASERVIDEO": "*****"
},
{
"INNOID": 7,
"SHORTDESC": "***********",
"ORDERID": 2,
"JOINEND": **********,
"LONGDESC": "*****************",
"JOINSTART": 1514790000000,
"DOCLINK": "***********************",
"TEASERVIDEO": "*******************"
}
]
}