[android-developers] Re: Get the file path from a URI instance
Actually this doesn't work. On Sep 2, 11:38 am, Dianne Hackborn hack...@android.com wrote: I'm sorry, but did you even try looking at the documentation? It's not given a tricky name: getPath(). (If you are meaning you have put a relative path in, and want to get an absolute one back, well you can't, URI knows nothing about the semantics of a path in it nor how to do that kind of manipulation, it just knows what was put into it.) On Wed, Sep 2, 2009 at 6:35 AM, Pablo Szyrko pablo.szy...@gmail.com wrote: Hi, I need to get the absolute path of the file associated with a specific android.net.Uri instance. I know how to get the URI instance based on the file instance (with Uri.fromFile(file)) and i need the inverse action. Thanks in avance, Pablo -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Get the file path from a URI instance
Doesn't work in what way? It is used all over the system -- for example this is how ContentResolver returns an InputStream to you from a file: URI: return new FileInputStream(uri.getPath()); On Sat, Sep 12, 2009 at 5:00 PM, Bill wrobb...@gmail.com wrote: Actually this doesn't work. On Sep 2, 11:38 am, Dianne Hackborn hack...@android.com wrote: I'm sorry, but did you even try looking at the documentation? It's not given a tricky name: getPath(). (If you are meaning you have put a relative path in, and want to get an absolute one back, well you can't, URI knows nothing about the semantics of a path in it nor how to do that kind of manipulation, it just knows what was put into it.) On Wed, Sep 2, 2009 at 6:35 AM, Pablo Szyrko pablo.szy...@gmail.com wrote: Hi, I need to get the absolute path of the file associated with a specific android.net.Uri instance. I know how to get the URI instance based on the file instance (with Uri.fromFile(file)) and i need the inverse action. Thanks in avance, Pablo -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Get the file path from a URI instance
I'm sorry, but did you even try looking at the documentation? It's not given a tricky name: getPath(). (If you are meaning you have put a relative path in, and want to get an absolute one back, well you can't, URI knows nothing about the semantics of a path in it nor how to do that kind of manipulation, it just knows what was put into it.) On Wed, Sep 2, 2009 at 6:35 AM, Pablo Szyrko pablo.szy...@gmail.com wrote: Hi, I need to get the absolute path of the file associated with a specific android.net.Uri instance. I know how to get the URI instance based on the file instance (with Uri.fromFile(file)) and i need the inverse action. Thanks in avance, Pablo -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---