You have to use the URI. Through the URI you can getContentResolver.query(theUriThatYouHave, null, null, null, null)
. Now that you have a cursor, you can check column names etc.
For Google drive there is a column name _display_name
. This will give you the file name.
Now you want access to the file? You can open an InputStream
to the URI via getContentResolver().openInputStream(theUriThatYouHave)
.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…