2

im using a webview with 7digital store to allow my users to buy and download mp3 onto their device.

but now when i download a song from 7digital the song will get called -3.bin, -4.bin, -5.bin etc.

How do i overwrite this name to the name of the song they are downloading?

this is my code:

wv.setDownloadListener(new DownloadListener() {
        public void onDownloadStart(String url, String userAgent,
                String contentDisposition, String mimetype,
                long contentLength) {





           Intent intent = new Intent(Intent.ACTION_VIEW);
           intent.setData(Uri.parse(url));
           startActivity(intent);

        }
    });
skolima
  • 31,963
  • 27
  • 115
  • 151
sn0ep
  • 3,843
  • 8
  • 39
  • 63

1 Answers1

0

new File("oldPath").renameTo(new File("newPath"));

Best regards.

pouzzler
  • 1,800
  • 2
  • 20
  • 32