Before new gallery access in KitKat I got my real path in sdcard with this method
That was never reliable. There is no requirement that the Uri
that you are returned from an ACTION_GET_CONTENT
or ACTION_PICK
request has to be indexed by the MediaStore
, or even has to represent a file on the file system. The Uri
could, for example, represent a stream, where an encrypted file is decrypted for you on the fly.
How could I manage to obtain the real path in sdcard?
There is no requirement that there is a file corresponding to the Uri
.
Yes, I really need a path
Then copy the file from the stream to your own temporary file, and use it. Better yet, just use the stream directly, and avoid the temporary file.
I have changed my Intent.ACTION_GET_CONTENT for Intent.ACTION_PICK
That will not help your situation. There is no requirement that an ACTION_PICK
response be for a Uri
that has a file on the filesystem that you can somehow magically derive.