title: Download Sqlite database into app internal storage
body: <p>I want to download a cell phone operator specific sqlite db on the app's installation.
  I have the following code to download the new_db using DownloadManager.
  But I get the following exception.</p>
  
  <pre><code>     java.lang.RuntimeException: Unable to start activity     
  ComponentInfo{com.xyz.abc/com.xyz.abc.MainActivity}:     
      java.lang.SecurityException: Destination must be on external storage:     
  file:///data/data/com.xyz.abc/databases/new_db.gz
  </code></pre>
  
  <p>Code:</p>
  
  <pre><code>Uri uri=Uri.parse("http://download_url_of_mine?cellinfo=404_45_1_2");
  String databasePath = context.getDatabasePath("existing_db.db").getParent();
  
  lastDownload=
          mgr.enqueue(new DownloadManager.Request(uri)
                  .setAllowedNetworkTypes(DownloadManager.Request.NETWORK_WIFI |
                          DownloadManager.Request.NETWORK_MOBILE)
                  .setAllowedOverRoaming(false)
                  .setTitle("Title")
                  .setDescription("Downloading Data Once for all.")
                  .setDestinationUri(Uri.fromFile(new File(databasePath+"/new_db.gz"))));
  </code></pre>
  
  <p>Any Help is much appreciated!
  Is it that DownloadManager should be used only for external data not for the data that I need to be inside the private access of app?</p>