title: How to get a single image from flickr
body: <p>I have managed to build this function to build the necessary URL, and the URL is working fine on a browser, returning a JSON file.</p>
  
  <pre><code>  public void get_flickr(double lat,double lang){
      String flickr_api="https://api.flickr.com/services/rest/?method=flickr.photos.search&amp;api_key=";
      String flickr_key="api_key";
      String flickr_opt="&amp;format=rest&amp;accuracy=11&amp;content_type=1&amp;privacy_filter=1&amp;geo_context=2";
      String urls = flickr_api+flickr_key+"&amp;lat="+Double.toString(lat)+"&amp;long="+lang+flickr_opt;
      try {
        URL url = new URL(urls);
        Toast.makeText(getApplicationContext(), urls, Toast.LENGTH_LONG).show();
        System.out.println(urls);
      } catch (MalformedURLException e){
        Toast.makeText(getApplicationContext(), e.getMessage(), Toast.LENGTH_LONG).show();
      }
    }
  </code></pre>
  
  <p>The json file in browser looks like:</p>
  
  <pre><code>&lt;rsp stat="ok"&gt;
  &lt;photos page="1" pages="13" perpage="250" total="3172"&gt;
  &lt;photo id="49224159813" owner="105730162@N02" secret="862d382b5e" server="65535" farm="66" title="2019-12-16_03-20-48" ispublic="1" isfriend="0" isfamily="0"/&gt;
  &lt;photo id="48475806412" owner="50628097@N05" secret="8c43f70eae" server="65535" farm="66" title="." ispublic="1" isfriend="0" isfamily="0"/&gt;
  &lt;photo id="46734449494" owner="46848967@N04" secret="84ed2bf1c3" server="7876" farm="8" title="Indira Gandhi TudioJepegii" ispublic="1" isfriend="0" isfamily="0"/&gt;
  &lt;photo id="40379459983" owner="8677170@N05" secret="a5665fee00" server="7885" farm="8" title="" ispublic="1" isfriend="0" isfamily="0"/&gt;
  &lt;photo id="40379457973" owner="8677170@N05" secret="f28f8f2e05" server="7877" farm="8" title="Friends time" ispublic="1" isfriend="0" isfamily="0"/&gt;
  &lt;photo id="32355265207" owner="31074994@N05" secret="e0c88a7275" server="7840" farm="8" title="Tomb of Khusrau - Khusro Bagh" ispublic="1" isfriend="0" isfamily="0"/&gt;
  &lt;photo id="45280267934" owner="96142515@N00" secret="ffa865b31e" server="4838" farm="5" title="Face Massage by Street Barber, Allahabad India" ispublic="1" isfriend="0"
  </code></pre>
  
  <p>But, I don't know how to download the JSON file in android (i.e. using java), and get the keys from it so that, I get the image URL looks like:</p>
  
  <pre><code>https://farm{farm-id}.staticflickr.com/{server-id}/{id}_{secret}.jpg
  </code></pre>
  
  <p>can somebody kindly help?</p>