Open raju249 opened 7 years ago
use below codes to inform to android OS " a new media added! " :
// save file to galery
if (fifn.isMediaFile()) {
try {
File mDownloadDir = Tools.getDownloadDirectoryFile(fifn.savelocation);
File temp_file = new File(mDownloadDir, fifn.name);
MediaScannerConnection.scanFile(
context,
new String[]{temp_file.getAbsolutePath()},
new String[]{Tools.getMimeType(temp_file.getAbsolutePath())},
new MediaScannerConnection.OnScanCompletedListener() {
@Override
public void onScanCompleted(String path, Uri uri) {
//....
}
}
);
} catch (Exception e) {
e.printStackTrace();
}
}
Hi team, I was just wondering if we could add support for saving the downloaded data in application cache folder or application files folder so that its not accessed by any other app. Like for example a Music Streaming app can have feature for downloading songs, but would like to access by that app only and not any other music player app.
Thanks