I want to get the video size in MB from videoview from internet path

99封情书 提交于 2019-12-06 01:24:13

I think there's a size limit with the way you're doing it. Try this way:

final URL uri=new URL("http://your_url.com/file.mp4");
URLConnection connection;
try
{
   connection=uri.openConnection();
   connection.connect();
   final String contentLengthStr=ucon.getHeaderField("content-length");
   // do whatever
}

catch(final IOException exception)
{
}

edit: i just noticed you have tried something similar, but you spelt length incorrectly, maybe it's just that

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!