On android pie i am getting null response for retrofit2 request. Same code is working on all previous android devices. i have added android:usesCleartextTraffic="true" in manifest its fixed the issue of http connection but i am not getting response as expected in all other androided version the response is expected but not in pie. so please help thanks in advance
Manifest.xml
<application
android:allowBackup="false"
tools:replace="android:allowBackup"
android:icon="@mipmap/cabad_logo_new"
android:label="@string/app_name"
android:networkSecurityConfig="@xml/network_security_config"
android:roundIcon="@mipmap/cabad_logo_new_round"
android:supportsRtl="true"
android:theme="@style/AppTheme"
android:usesCleartextTraffic="true">
MainActivity
RetrofitInterface jsonPostService =
ServiceGenerator.createService(RetrofitInterface.class,
"http://xxx.xxx.xxx.xxx:8080/");
Call<LoginResult> call = jsonPostService.postRawJSON(jsonObject);
call.enqueue(new Callback<LoginResult>() {
@Override
public void onResponse(Call<LoginResult> call,
Response<LoginResult> response) {
try {
above code is working fine in all android devices except pie. Pie getting null response