Hey everyone,
i'm looking for a way in Basic4Android on how to refresh the MediaState.
I'm updating some information in MP3's ID3 tags, and when viewing in the default 's media player, I can't see it's updated unless i unmount and remount my sdcard. Then I can see the updated MP3 File.
In Java, I already tries this:
I don't know if there are any other solutions in B4A or Java.
Thanks,
Tomas
i'm looking for a way in Basic4Android on how to refresh the MediaState.
I'm updating some information in MP3's ID3 tags, and when viewing in the default 's media player, I can't see it's updated unless i unmount and remount my sdcard. Then I can see the updated MP3 File.
In Java, I already tries this:
B4X:
public void refreshMediaState(final String path) {
scanner=new MediaScannerConnection(ba.applicationContext, new MediaScannerConnectionClient() {
@Override
public void onScanCompleted(String arg0, Uri arg1) {
// TODO Auto-generated method stub
ba.raiseEvent(this, eventName + "_onscancompleted", arg1.toString() );
}
@Override
public void onMediaScannerConnected() {
// TODO Auto-generated method stub
scanner.scanFile(path, "audio/*");
ba.raiseEvent(this, eventName + "_onmediascannerconnected");
}
});
scanner.connect();
}
I don't know if there are any other solutions in B4A or Java.
Thanks,
Tomas