¡@

Home 

2014/10/16 ¤W¤È 08:10:27

android Programming Glossary: ba1

Android post Base64 String to PHP

http://stackoverflow.com/questions/9920967/android-post-base64-string-to-php

bao new ByteArrayOutputStream bitmap.compress Bitmap.CompressFormat.JPEG 90 bao byte ba bao.toByteArray String ba1 Base64.encodeBytes ba ArrayList NameValuePair nameValuePairs new ArrayList NameValuePair nameValuePairs.add new BasicNameValuePair.. ba ArrayList NameValuePair nameValuePairs new ArrayList NameValuePair nameValuePairs.add new BasicNameValuePair image ba1 This is http Code to send image on server HttpClient httpclient new DefaultHttpClient HttpPost httppost new HttpPost http..

Android upload image to server using base64

http://stackoverflow.com/questions/9987343/android-upload-image-to-server-using-base64

Bitmap.CompressFormat.PNG 100 stream bitmap.recycle byte byteArray stream.toByteArray stream.close stream null String ba1 Base64.encodeToString byteArray Base64.DEFAULT bitmap null System.gc immediately free bitmap byteArray null System.gc HttpClient.. httppost new HttpPost Data.upload_photo JSONObject jsonObj new JSONObject jsonObj.put user_id LoginParser.id int cnt ba1.length 4 System.out.println cnt cnt jsonObj.put image ba1 jsonObj.put caption edt_caption.getText .toString Create the.. new JSONObject jsonObj.put user_id LoginParser.id int cnt ba1.length 4 System.out.println cnt cnt jsonObj.put image ba1 jsonObj.put caption edt_caption.getText .toString Create the POST object and add the parameters StringEntity entity new..