Naar content
Trending apps
  • Inbox by Gmail

  • Maps: Navigatie en OV

  • WhatsApp Messenger

  • Messenger

  • Facebook

Trending games
  • Ghostbusters World

  • Asphalt 9: Legends - 2018’s New Arcade Racing Game

  • Pokémon Quest

  • PUBG Mobile

  • Super Mario Run

Trending smartphones
  • ASUS ZenFone 6

  • OnePlus 7 Pro

  • Google Pixel 3a XL

  • Xiaomi Mi 9T

  • Huawei P30 Pro

Nieuwste tablets
  • Samsung Galaxy Tab A 10.5

  • Samsung Galaxy Tab S4

  • Samsung Galaxy Tab S3 9.7

  • Asus Zenpad 3S 10

  • Sony Xperia Z4 Tablet

Timelord

Timelord

  • Lid sinds 05 juni 2010
  • Berichten 2285
  • Reputatie 20
  • #1
  • 5 juni 2019
  • 19:02

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 (op sterven na 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

Timelord

Timelord

  • Lid sinds 05 juni 2010
  • Berichten 2285
  • Reputatie 20
  • #2
  • 5 juni 2019
  • 21:24

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
:


Note: The 
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.legacy
 library 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.http
library 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 (op sterven na 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

Reageer

Om te reageren, dien je te zijn ingelogd. Druk op de onderstaande knop om in te loggen of maak een nieuwe account aan.

Inloggen Registreren