How do I add a cover art (album art) to a downloaded mp3 programmatically?
I am letting my app download a mp3 file via the DownloadManager from the Android APIS as shown below:
private void startDownload(){
Uri uri = Uri.parse(BASE_URL+DOWNLOAD+mp3+".mp3");
filename = title+".mp3";
Request request = new DownloadManager.Request(uri)
.setDestinationInExternalPublicDir(MUSIC_PATH, filename);
DOWNLOAD_MANAGER.enqueue(request);
}
Is it possible to add a coverart to the downloaded mp3 file, so that the mp3 player on the phone will show a image while playing the song?
Download this jar file MyID3_for_android and add it to your project’s build path. here is a sample code of how you can change the cover
You Will need also the Jakarta Regex jar
readFile is only a function to get byte[] from File
Got it from stackOverflow , dont know from who 🙂