Usecase: Open pdf(present in internal storage in my app name directory) in android via any pdf reader app present in the device (eg: GDrive).
Problem As per my current analysis it works fine in android 9 and below devices but creates the problem in Android 10.
What is happening: Pdf name gets displayed in Gdrive pdf viewer header but pdf doesn't render. and brings back to my app.
Devices which are creating a problem: Samsung s 10(Doesnot know the android version), One plus A6000(Android 10), Samsung A70(Doesnot know the android version), Nokia 6.1 plus(Android 10), OnePlus 6T(Doesnot know the android version)
Though there are devices which are running on android 10 and are not creating a problem.
Devices which are not creating a problem: Samsung GalaxyS20(Android 10)
There are also few devices that were not creating a problem earlier with android 10 and recently have started creating the problem and vice-versa also(i.e. problem got fixed automatically).
This problem is quite confusing and I am unable to find root cause.
What I have tried 1. Checked Logs: No error/exception got logged
2. Checked result code of intent there also no issue.
3. Permissions: In-app: Media, camera, and storage permission: enabled In drive: Storage permission: enabled
4. I have also read the documentation of android 10.
To allow other apps to access files stored in this directory within internal storage, use a FileProvider with the FLAG_GRANT_READ_URI_PERMISSION attribute.
5. There is no problem with pdf because opening same pdf with some other pdf reader(eg: adobe)it works flawlessly.
I just simply want to solve this issue. I am having a few questions:
1. Is it actually some problem with android 10 or issue with my code only?
2. Does making app compatible with android 10 will solve this issue?
3. How can I debug it?
If I have missed any case then please let me know. Thanks in advance.
Then my advice would be to try to reduce it to an SSCCE: a minimal app that still exhibits this problem. It should have one class (the main activity), and do nothing but send that Intent. My guess would be that this app would not actually exhibit the issue. Then you'd know that this problem is somewhere else in your app, which makes it amenable to further examination.
OTOH, if the minimal app still exhibits the problem, you have all you need for filing a bug report with Google :-)
A timing clock, fuse wire, high explosives and a tiny ad:
Devious Experiments for a Truly Passive Greenhouse!