Showing posts with label php. Show all posts
Showing posts with label php. Show all posts

Monday, August 08, 2016

Android: BLOB (PHP) to Android (Java)

Image stored as BLOB in mysql.

To load image in android:
  1. Encode image binary data with base64. $obj->picture = base64_encode($binaryData);
  2. Encode in json. json_encode($obj)
  3. Receive data in android
  4. Get byte[] using Base64.decode.
  5. Get bitmap .Bitmap decodedByte = BitmapFactory.decodeByteArray(decodedString, 0, decodedString.length); 

          byte[] decodedString = Base64.decode(encodedImage, Base64.DEFAULT);

Monday, August 01, 2016

Android: posting data to server side script

Posting data to PHP script


Using StringBuilder to format the data string to prepare to send to server side

jQuery videos: HTML forms, jQuery and PHP

Form submission


Reading JSON from PHP 

Reading HTML from PHP


Send data to PHP