Wij werken momenteel aan een nieuw forum voor Androidworld. Het is daarom momenteel niet mogelijk om te reageren of nieuwe topics aan te maken.
Ongelooflijk, dat ik het zeld gevonden heb !!!!.
Apache HTTP client deprecationWith Android 6.0, we removed support for the Apache HTTP client.
Beginning with Android 9, that library is removed from the bootclasspath and is not available to apps by default.
To continue using the Apache HTTP client, apps that target Android 9 and above can add the following to their
AndroidManifest.xml:
android:required="false"attribute is required for apps that have a minimum SDK of 23 or lower, because on devices with API levels lower than 24, the
org.apache.http.legacylibrary is not available. (On those devices, the Apache HTTP classes are available on the bootclasspath.)As an alternative to using the runtime Apache library, apps can bundle their own version of the
org.apache.httplibrary in their APK. If you do this, you must repackage the library (with a utility like Jar Jar) to avoid class compatibility issues with the classes provided in the runtime.
Oukitel K5000 7.0 (nog) ongeroot
Samsung Note geroot 4.2.1 Spirit Rom (dood)
HTC Desire geroot Slim Rom 4.4.4
HTC one X + geroot 4.2.2 ViperX+ 2.1.1
One plus one geroot 6.01
LG P990 geroot 2.3
Samsung A8 ongeroot (werk)
Umidigi 3 Power ongeroot.
Samsung A7 ongeroot.
Op elk apparaat werkt het, behalve op mijn telefoons met Android 9.
Ik heb het kunnen herleiden tot hier:
nameValuePairs.add(new BasicNameValuePair("name", NameHolder));
nameValuePairs.add(new BasicNameValuePair("email", EmailHolder));
Hierboven gaat het fout.
Er wordt gesproken over deprecated, maar geen idee of dat over bovenstaand gaat.
class SendPostReqAsyncTask extends AsyncTask {
@Override
protected String doInBackground(String… params) {
String NameHolder = name ;
String EmailHolder = email ;
List nameValuePairs = new ArrayList();
nameValuePairs.add(new BasicNameValuePair("name", NameHolder));
nameValuePairs.add(new BasicNameValuePair("email", EmailHolder));
try {
HttpClient httpClient = new DefaultHttpClient();
HttpPost httpPost = new HttpPost(ServerURL);
httpPost.setEntity(new UrlEncodedFormEntity(nameValuePairs));
HttpResponse httpResponse = httpClient.execute(httpPost);
HttpEntity httpEntity = httpResponse.getEntity();
} catch (ClientProtocolException e) {
} catch (IOException e) {
}
return "Data Inserted Successfully";
}
Oukitel K5000 7.0 (nog) ongeroot
Samsung Note geroot 4.2.1 Spirit Rom (dood)
HTC Desire geroot Slim Rom 4.4.4
HTC one X + geroot 4.2.2 ViperX+ 2.1.1
One plus one geroot 6.01
LG P990 geroot 2.3
Samsung A8 ongeroot (werk)
Umidigi 3 Power ongeroot.
Samsung A7 ongeroot.