i get Uri using data.getData() and it returns android.net.Uri . But i want to create a file object and file accept java.net.URI .
So how can i convert them ?
Or how can i create a file object using android.net.Uri ?
have you tried, File file = new File(uri.getPath());
Yes . It does not work .
"It doesn't work" doesn't give anything. You need to give more details like error message, code snippet, etc. You did the same last time I/someone answered your question.
It solved ! I use Content Resolver to get path of image .
Обсуждают сегодня