Search Issue Tracker
Won't Fix
Votes
3
Found in
2018.2.2f1
Issue ID
1083592
Regression
No
[Android] OpenURL() doesn't open local files on > Android 6 if Target API Level is > 23
Steps to reproduce:
1. Open QA attached project
2. Add a file (preferably an image (included in the project)) to the persistantDataPath of the device (will require one launch to make that folder)
3. Launch the app and click on the screen
Expected behaviour: Image opened in an image viewer
Actual behaviour: Nothing happens
JNI:OpenURL:android.os.FileUriExposedException: file:///{persistantDataPath}/TestFile.jpg exposed beyond app through Intent.getData() is thrown
Reproduced on: 5.6.6f2, 2017.1.5f1, 2017.2.4f1, 2017.4.13f1, 2018.2.12f1, 2018.3.0b5, 2019.1.0a4
DUT:
Not reproduced on:
VLNQA00025, Xiaomi Mi 5s (MI 5s), Android 6.0.1, CPU: Snapdragon 820 MSM8996, GPU: Adreno (TM) 530
VLNQA00028, Samsung Galaxy Note4 (SM-N910F), Android 6.0.1, CPU: Snapdragon 805 APQ8084, GPU: Adreno (TM) 420
Reproduced on:
VLNQA00144, Samsung Galaxy S9 (SM-G960U1), Android 8.0.0, CPU: Snapdragon 845 SDM845, GPU: Adreno (TM) 630
VLNQA00093, Samsung Galaxy S6 edge (SM-G925F), Android 7.0, CPU: Exynos 7 Octa 7420, GPU: Mali-T760
Notes: While technically a regression from 5.5, Unity 5.5 did not have a 'Target API Level' choice
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Custom ScriptableObject asset in the project setting are not well deserialized during the Reimport All process
- Fixing Message Loss in UMPE During Domain Reload
- The Editor freezes when ScheduleReadOnly of IJobParallelForTransform with dependency is used
- Text is truncated in the Inspector when the display scale is set to 150%
- CancellationTokenSource(<timeout>) has incorrect cancellation status when used in WebGL Player
Resolution Note:
This is behavior by the Android OS: https://developer.android.com/about/versions/nougat/android-7.0-changes#permfilesys
You can't open files private to an app by other apps, if you target API23 or later.
If you want to save files and open them from other apps, please use the SD card or any other common location.