I been following online tutorials on how to insert data into a database from an android app and have everything working except this small part
List<NameValuePair> params = new ArrayList<>();
params.add(new BasicNameValuePair("username", username));
params.add(new BasicNameValuePair("password", password));
NameValuePair and BasicNameValuePair have been deprecated in favor of openConnection()
. How can I create a new-value association with that? http://developer.android.com/reference/java/net/URL.html#openConnection()
Does anyone know how I can create name value pairs with openConnection? I been searching everywhere.