Dear stack overflow, The concept of an URI on Android is wonderful, and it abstracts out how we point to different things on the device and internet, but it does need careful thought to work with them. I have couple of questions for you.
1) How do people generally consume remote URI for uploading into their own server ? The best I can think of is, downloading the remote URI to disk, and giving a pointer to the file to okhttp. Is this the best way to go about doing it ?
2) Second is a more basic question with respect to local URI's. URI's can point to different things, and the absolute path to the file is stored at various places for various kinds of providers. Please see #getPath in this link .
Since okhttp works only with absolute files, is this logic present in that file the best way to do about sending the file via okhttp.
Or do you suggest anything better ?
Let us assume that for simplicity sake, we are developing for Kitkat and above.