I am developing an app that is used to download the songs. I am able to download the songs and as the download is completed I am moving that song to a different folder programmatically.
The issue that I am facing is that if I am moving song to another folder it does not become visible in google play Music and if I do not move it to another folder it is visible in Google Play Music but if the song is not moved it is getting deleted once the app is uninstalled. Please help me out what can be done to resolve this. I am stuck in this functionality.
Thanks.
After searching for 3 days. I finally got the solution to this.
Intent intent = new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE);
intent.setData(Uri.fromFile(new File(Environment.getExternalStorageDirectory(), "/FolderName/"+inputFile)));
context.sendBroadcast(intent);
I am sending broadcast to the default Google Music Library once the downloading and moving is completed.