What Code Do I Need To Fix Apache Http Client Removal?
Android 6.0 Marshmallow Version 23.0 broke my code Running Android Studio 1.5.1. Caused by Apache HTTP Client removal developer.android.com Android 6.0 Changes says use HttpURLConn
Solution 1:
It took a little until I understood your problem. I checked the full source code of the SDK, it is true there is no other constant you could use. However the string you are searching for is "text/plain"
. You can insert it directly.
However I would suggest to use another code:
IntentemailIntent=newIntent(Intent.ACTION_SENDTO,
Uri.fromParts("mailto", "you@example.com", null));
emailIntent.putExtra(Intent.EXTRA_EMAIL, /*...*/);
emailIntent.putExtra(Intent.EXTRA_SUBJECT, /*...*/);
emailIntent.putExtra(Intent.EXTRA_TEXT, /*...*/);
startActivityForResult(emailIntent, 1);
This intent will just open real mail clients.
Post a Comment for "What Code Do I Need To Fix Apache Http Client Removal?"