vxh.viet
4/7/2016 - 10:23 AM

Uri parse

Uri parse

Question: To convert a path to Uri

Answer:

To avoid nasty bug:

  • for file use Uri.fromFile(new File(filePath))

  • for directory use Uri.parse(directoryPath)