Android – how to get the file name and URL when you click download in the browser

I want to get the file name and URL file when I click download from the browser on Android. I try to use the method when I click download in the file name and URL file displayed on the website, but it doesn't display them correctly

How can I make it right?

resolvent:

I use this code in my application to get the URL and fix my problem

Uri data = getIntent().getData();
    if (data != null) {
        String url = data.toString();
        edtlink.setText(url);
}

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>