I've opened pdf file from different sources and got this Intents
:
File manager (Google Files) -> Internal storage -> Download:
Intent { act=android.intent.action.VIEW dat=content://com.google.android.apps.nbu.files.provider/1/file:///storage/emulated/0/Download/Untitled.pdf typ=application/pdf flg=0x13000001 cmp=team.sls.testapp/.ActivityMain }
File manager (Google Files) -> Downloads:
Intent { act=android.intent.action.VIEW dat=content://com.google.android.apps.nbu.files.provider/2/1863 typ=application/pdf flg=0x13000001 cmp=team.sls.testapp/.ActivityMain }
Dowdload manager (from notification panel):
Intent { act=android.intent.action.VIEW dat=content://com.android.providers.downloads.documents/document/1508 typ=application/pdf flg=0x13000003 cmp=team.sls.testapp/.ActivityMain }
Telegram chat:
Intent { act=android.intent.action.VIEW dat=content://org.telegram.messenger.provider/media/Telegram/Telegram Documents/2_5276292126848585208.pdf typ=application/pdf flg=0x13000001 cmp=team.sls.testapp/.ActivityMain }
What is content://com.google.android.apps.nbu.files.provider/2/1863
and why the path to same file is different?
But more interesting - why cases 1 and 4 can open files with custom extensions but 2 and 3 don't?
If there is a misunderstanding with cases 1 and 2, take a look to screenshots in this question