title: Get images from PHP-MySql server to Android using json
body: <p>i am devloping an application which download image from php-server and display image in image view ..but when i receive image from php page</p>
  
  <pre><code>if (!empty($result)) {
      if (mysql_num_rows($result) &gt; 0) {
  
          $result = mysql_fetch_array($result);
  
          $user = array();
          $user["image"] = base64_encode($result["image"]);
          $response["success"] = 1;
         $response["image_table"] = array();
  
          array_push($response["image_table"], $user);
          echo json_encode($response);
      } else {
          $response["success"] = 0;
          $response["message"] = "No Image found";
          echo json_encode($response);
      }
  </code></pre>
  
  <p>it gives me json response like this </p>
  
  <pre><code>03-30 04:43:44.013: D/Image:(2770): {"success":1,"image_table":   [{"image":"\/9j\/4VeRRXhpZgAASUkqAAgAAAAMAAABBAABAAAA..........
  03-30 04:43:44.253: D/skia(2770): --- decoder-&gt;decode returned false
  </code></pre>
  
  <p>i m decoding this image string to bitmap like this....</p>
  
  <pre><code>json= jsonParser.makeHttpRequest(url_img_address, "GET", params);
  
          Log.d("Image: ", json.toString());
  
          try {
              int success = json.getInt(TAG_SUCCESS);
  
              if (success == 1) {
                  address = json.getJSONArray(TAG_IMAGE_TABLE);
                  for (int i = 0; i &lt; address.length(); i++) {
                      JSONObject c = address.getJSONObject(i);
                      image = c.getString(TAG_IMAGE);
                       byte[] dwimage = Base64.decode(image.getBytes());
                        System.out.println(dwimage);
                        bmp = BitmapFactory.decodeByteArray(dwimage, 0, dwimage.length);
                  } 
              } else {
  
              }
          } catch (JSONException | IOException e) {
              e.printStackTrace();
          }
  </code></pre>
  
  <p>and i m using this bm to onotherclass which set bmp to imageview </p>
  
  <pre><code>   ivProperty.setImageBitmap(bmp);
  </code></pre>
  
  <p>but it dosent display anything......my asynck task activity is not finished and it continuesly running...
  my question is that how to display bmp to imageview and why my asyncktask is not finished........thx in advance....</p>