i have been making an app which download files from internet and save themon storage i have 2 questions :first how to address it to save them in downlod folder which is the exact address? and second where is this "/data/user/0/com.example.moein.download_kotlin/files/Downloads/file.jpg" directory that it is using now? here is my code
mainFetch = Fetch.Builder(applicationContext, "Download 1 file")
.setDownloadConcurrentLimit(1) .
.enableLogging(true)
.build()
//Single enqueuing example
val request = Request("https://www.sample-videos.com/img/Sample-jpg-image-50kb.jpg",
applicationContext.getFilesDir().getPath().toString() +"/Downloads/file.jpg")
request.priority=Priority.HIGH;
request.networkType=NetworkType.ALL
request.addHeader("download", "2")
mainFetch!!.enqueue(request, object : Func<Download> {
override fun call(t: Download) {
Toast.makeText(applicationContext,t.file,Toast.LENGTH_SHORT).show();
//toasts /data/user/0/com.example.moein.download_kotlin/files/Downloads/file.jpg
}
}, object : Func<Error> {
override fun call(t: Error) {
Toast.makeText(applicationContext,t.toString(),Toast.LENGTH_SHORT).show();
}
})`