Click here to Skip to main content
15,919,245 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
intent = getIntent();

   Uri contactUri = intent.getData();
                    if(contactUri!= null) {
                getSupportActionBar().setTitle(contactUri.getPath());

}

What I have tried:

getPath() or getname() i am trying to reteive the name of the file but instead of returning the real name of file, it is returning some numeric nummbers. When i use getPath() it is returning something like /external/file/36587 instead of real name of file such as xyx.pdf. Can someone help me to return the real name of the file.please.
Posted
Comments
David Crow 9-Jul-20 11:56am    
Ummm, what file?
Vivek Kansal 9-Jul-20 12:09pm    
PDF file
Richard MacCutchan 9-Jul-20 12:06pm    
What does contactUri contain after the call to getData?
Vivek Kansal 9-Jul-20 12:10pm    
Its a PDF file
David Crow 9-Jul-20 12:32pm    
The actual file contents, or just the relative/absolute path to/of the file?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900