title: how to access downloads folder in android?
body: <p>I am new android, i'm making an app in which one can download files to downloads folder (using Download Manager). I can see pictures if i go to downloads folder in emulator. So if i want to show a slideshow of downloaded files how can i get the access to that folder? Secondly how to add progress bar to this code:--</p>
  
  <pre><code>import java.util.Arrays;
  
  import android.app.Activity;
  import android.app.DownloadManager;
  import android.app.DownloadManager.Query;
  import android.app.DownloadManager.Request;
  import android.content.BroadcastReceiver;
  import android.content.Context;
  import android.content.Intent;
  import android.content.IntentFilter;
  import android.database.Cursor;
  import android.net.Uri;
  import android.os.Bundle;
  import android.view.View;
  import android.widget.ImageView;
  
  public class Download_managerActivity extends Activity {
       private long quueue_for_url;
  
       private DownloadManager dm;
  
          /** Called when the activity is first created. */
          @Override
          public void onCreate(Bundle savedInstanceState) {
              super.onCreate(savedInstanceState);
              setContentView(R.layout.main);
  
              BroadcastReceiver receiver = new BroadcastReceiver() {
                  @Override
                  public void onReceive(Context context, Intent intent) {
                      String action = intent.getAction();
  
                      if (DownloadManager.ACTION_DOWNLOAD_COMPLETE.equals(action)) {
                          long downloadId = intent.getLongExtra(
                                  DownloadManager.EXTRA_DOWNLOAD_ID, 0);
                          Query query = new Query();
                          query.setFilterById(quueue_for_url);
                          Cursor c = dm.query(query);
                          if (c.moveToFirst()) {
                              int columnIndex = c
                                      .getColumnIndex(DownloadManager.COLUMN_STATUS);
                              if (DownloadManager.STATUS_SUCCESSFUL == c
                                      .getInt(columnIndex)) {
  
                                  ImageView view = (ImageView) findViewById(R.id.imageView1);
                                  String uri_String_abcd = c
                                          .getString(c
                                                  .getColumnIndex(DownloadManager.COLUMN_LOCAL_URI));
                                  view.setImageURI(Uri.parse(uri_String_abcd));
  
                              }
                          }
                      }
                  }
              };
  
              registerReceiver(receiver, new IntentFilter(
                      DownloadManager.ACTION_DOWNLOAD_COMPLETE));
          }
  
          public void onClick(View view) {
              dm = (DownloadManager) getSystemService(DOWNLOAD_SERVICE);
  
              Request request_for_url = new Request(
                      Uri.parse("http://fc03.deviantart.net/fs14/i/2007/086/9/1/Steve_Jobs_portrait_by_tumb.jpg"));
  
              Request request_for_url1 = new Request(
                      Uri.parse("http://2.bp.blogspot.com/_q7Rxg4wqDyc/S5ZRVLxVYuI/AAAAAAAAAvU/fQAUZ2XFcp8/s400/katrina-kaif.jpg"));
              Request request_for_url2 = new Request(
                      Uri.parse("http://www.buzzreactor.com/sites/default/files/Bill-Gates1.jpg"));
  
              quueue_for_url = dm.enqueue(request_for_url);
              quueue_for_url = dm.enqueue(request_for_url1);
              quueue_for_url = dm.enqueue(request_for_url2);
  
          }
  
          public void showDownload(View view) {
              Intent i = new Intent();
              //try more options to show downloading , retrieving and complete
              i.setAction(DownloadManager.ACTION_VIEW_DOWNLOADS);
              startActivity(i);
          }
      }
  </code></pre>
  
  <p>I want to add a button which performs the function of taking the pictures from downloads folder and then display like a slideshow.</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
        package="cmpe235.lab1"
        android:versionCode="1"
        android:versionName="1.0"&gt;
      &lt;uses-sdk android:minSdkVersion="9" /&gt;
  
  &lt;uses-permission android:name="android.permission.INTERNET"&gt;&lt;/uses-permission&gt;
  
      &lt;application android:icon="@drawable/icon" android:label="@string/app_name"&gt;
          &lt;activity android:name=".Download_managerActivity"
                    android:label="@string/app_name"&gt;
              &lt;intent-filter&gt;
                  &lt;action android:name="android.intent.action.MAIN" /&gt;
                  &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
              &lt;/intent-filter&gt;
          &lt;/activity&gt;
  
      &lt;/application&gt;
  &lt;/manifest&gt;
  </code></pre>
  
  <p>main.xml:-</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:orientation="vertical" android:layout_width="fill_parent"
      android:layout_height="fill_parent"&gt;
  
  
      &lt;Button android:text="Start Download" android:id="@+id/button1"
          android:layout_width="wrap_content" android:layout_height="wrap_content"
           android:layout_gravity="center_vertical|center_horizontal|center" android:textColor="#0000A0" 
           android:typeface="serif" android:onClick="onClick"&gt;&lt;/Button&gt;
  
      &lt;Button android:text="View Downloads" android:id="@+id/button2"
          android:layout_width="wrap_content" android:layout_height="wrap_content"
           android:layout_gravity="center_vertical|center_horizontal|center" android:textColor="#0000A0" 
           android:typeface="serif" android:onClick="showDownload"&gt;&lt;/Button&gt;
  
      &lt;ImageView android:layout_height="wrap_content" android:id="@+id/imageView1"
          android:src="@drawable/icon" android:layout_width="wrap_content"&gt;&lt;/ImageView&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>