I never had to send media files to the server. Plain text data sent as follows:
HttpClient httpclient = new DefaultHttpClient(); HttpPost httppost = new HttpPost(Application.TEST_API + Application.TEST_API_IDENTIFIER); httppost.setHeader(HTTP.CONTENT_TYPE, "application/x-www-form-urlencoded;charset=UTF-8"); List<NameValuePair> valuePairs = new ArrayList<>(); valuePairs.add(new BasicNameValuePair("request", "save_profiles_result")); valuePairs.add(new BasicNameValuePair("profiles", jsonProfiles)); httppost.setEntity(new UrlEncodedFormEntity(valuePairs, "UTF-8")); HttpResponse httpResponse = httpclient.execute(httppost); But right now, I have a completely different task, I just can’t figure out how to insert
String outputpath = VideoRecordConfig.getOutputMediaFile( VideoRecordConfig.MEDIA_TYPE_VIDEO).getAbsolutePath(); Type like this, only here the outputpath just the name of the file
valuePairs.add(new BasicNameValuePair("video", outputpath )); ValuePairs you please tell me how to insert a video in ValuePairs ? Maybe this will seem like a silly question to someone, but I don’t browse at all in media files!