title: How to display the images from MySQL database in Android using JSON object
body: <p>I've been trying several ways of displaying my JSON images but my solutions never succeeded.</p>
  
  <p>I've parsed my JSON and I'm getting the response.</p>
  
  <p>However included the response is an image which I need to display in my application.</p>
  
  <p>Recieving the image as :"img src=question/images/u2_1_l2_q66" which is just string. I'm getting the same text as in emulator <strong>"not a image"</strong>. </p>
  
  <p>In drawable, should I add the image ? </p>
  
  <p>How can I display these image in my application ? Please guide me.</p>
  
  <p>Any help would be appreciable.</p>
  
  <blockquote>
    <p>code </p>
  </blockquote>
  
  <pre><code>       protected String doInBackground(String... args) {
          List&lt;NameValuePair&gt; params = new ArrayList&lt;NameValuePair&gt;();
          params.add(new BasicNameValuePair("tid", tid));
          json = jsonParser.makeHttpRequest(url_get_quesurl, "GET", params);
          Log.d("All Groups: ", json.toString());
          try {
          int success = json.getInt(TAG_SUCCESS);
          if (success == 1) {
              System.out.println("Success");
              groups = json.getJSONArray(TAG_GROUP);
              System.out.println("Result Success+++"+groups);
               for (int i = 0; i &lt; groups.length();i++) {
              JSONObject c = groups.getJSONObject(i);
              String question = c.getString(TAG_QUES);
              System.out.println("Checking ::"+question);
              ques1.add(question);
              String img = c.getString(TAG_IMAGE);
              System.out.println("Checking ::"+img);
              imgarr.add(img);
               }
          } else {
              showAlert();
          }
      } catch (JSONException e) {
          System.out.println("Error "+e.toString());
      }
      return null;
  }
  protected void onPostExecute(String file_url) {
          pDialog.dismiss();
          ques1=new ArrayList&lt;String&gt;(new ArrayList&lt;String&gt;(ques1));
          imgarr=new ArrayList&lt;String&gt;(new ArrayList&lt;String&gt;(imgarr));
          TextView txtque = (TextView) findViewById(R.id.que_txt); 
          txtque.setText("Q" + num + ")" + ques1.get(j) + imgarr.get(g));
             }
  </code></pre>
  
  <blockquote>
    <p>php code</p>
  </blockquote>
  
  <pre><code>      $group[$i]['image']= base64_encode(file_get_contents("http://10.0.2.2/question/images/".$row['image']));                                                                                                     
          $i++;
        array_push($response["group"], $group);
  </code></pre>