I’m dealing with doubles and looking for the “double” equivalent of this…
ArrayList<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>();
nameValuePairs.add(new BasicNameValuePair("lat",lat));
nameValuePairs.add(new BasicNameValuePair("lng",lng));
edit// I’m making a HTTP request, I think need to map the lat value to a php lat variable and the long to a php variable.
Thanks!
If you have to use
NameValuePair, there are two possible solutions.You can convert a
Mapto aListofNameValuePair:Or you can implement a new NameValuePair to handle Double values:
In the latter case, you can use a List of NameValuePair that can be passed directly to UrlEncodedFormEntity’s constructor: