title: How to store image using Downloader Manager downloaded image name in external storage in android
body: <p>Hello I am downloading image from Url using Downloadmanager. and i perfectly manage to download that image.but i dont know where it store the image for future reference. </p>
  
  <p>I want to store it in download folder.how to do that to store in download folder.</p>
  
  <p>Here is my code</p>
  
  <pre><code>public class MainActivity extends AppCompatActivity {
  Button downld;
  private DownloadManager dm;
  private long enqueue;
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
      downld=(Button)findViewById(R.id.download);
      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);
                  DownloadManager.Query query = new DownloadManager.Query();
                  query.setFilterById(enqueue);
                  Cursor c = dm.query(query);
                  if (c.moveToFirst()) {
                      int columnIndex = c
                              .getColumnIndex(DownloadManager.COLUMN_STATUS);
                      if (DownloadManager.STATUS_SUCCESSFUL == c
                              .getInt(columnIndex)) {
                          String uriString = c
                                  .getString(c
                                          .getColumnIndex(DownloadManager.COLUMN_LOCAL_URI));
                         File ifdir1 = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES), "EPP");
                          if (!ifdir1.exists())
                              ifdir1.mkdirs();
                         File imagefile1 = new File(ifdir1.getPath() + File.separator +c.getString(c.getColumnIndex(DownloadManager.COLUMN_TITLE));
  
                        Uri tempuri = Uri.fromFile(imagefile1);
                          Log.v("Abhi", "" +  c.getString(c.getColumnIndex(DownloadManager.COLUMN_TITLE)));
  
                      }
                  }
              }
          }
      };
  
      registerReceiver(receiver, new IntentFilter(
              DownloadManager.ACTION_DOWNLOAD_COMPLETE));
      downld.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View v) {
              dm = (DownloadManager) getSystemService(DOWNLOAD_SERVICE);
              DownloadManager.Request request = new DownloadManager.Request(
                      Uri.parse("https://www.eprintpost.com/images/homepage/slider0.gif"));
              enqueue = dm.enqueue(request);
  
          }
      });
  }
  }
  </code></pre>
  
  <p>How to download image in download folder with image name.</p>
  
  <p>Thansk in advance</p>