1

I have a class within my application when instatianted i could to send to a servelet.

public class PinnedVehicle {

    private String userId;
    private Location location;
    private Date timeToReturn;
    private String notes;
    private Bitmap photo;
    }

now for location i only really need the longitudes and latitudes, but how would i go about sending this to my server

at the moment all i do is

 String URL = "xxxx";
 String result = "";
 String deviceId = "xxxxx" ; 
 String q = "?lat="+location.getLatitude()+"&lng="+location.getLongitude()" //and so on for all strings and integers

 HttpClient httpclient = new DefaultHttpClient();  
 HttpGet request = new HttpGet(URL+q);  
 request.addHeader("deviceId", deviceId);  
 ResponseHandler<String> handler = new BasicResponseHandler();  
 try {  
     result = httpclient.execute(request, handler);  
     } catch (ClientProtocolException e) {  
         e.printStackTrace();  
     } catch (IOException e) {  
         e.printStackTrace();  
 }  
 httpclient.getConnectionManager().shutdown(); 

How would i go about sending the date object and bitmap object?

molleman
  • 2,934
  • 16
  • 61
  • 92

0 Answers0