I created an intent filter to associate my activity with a custom file extension. This works fine: the mail application launches my activity for an attachment with a user extension.
In the exercise, I read the intention like this:
Uri uri = getIntent().getData();
and I can open the input stream OK, but I would like to know the file name and extension for the attachment. Any way to get this from Uri?
I tried to get this information with a cursor, but the mail application seems to have only two columns: _id and _data, and not something that might be related to the file name and / or extension.
I know that I canβt access the actual file, but I need to know the file name.
source share