file.length return always 0 in android

Viewed 4322

I want to check size of file where I have only URI content://media/external/video/media/813 to get size of file I use:

File file=new File(uri.getPath());
                    long ls = file.length();

and always get 0. Any ideas?

2 Answers
Related