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
Comments (1)
-
Kubic75
Mar 08, 2019 14:22
Simple working example please!
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
- "Shader warning in 'Hidden/Light2D': implicit truncation of vector type" is thrown when building Universal 2D template
- AI Assistant breaks compilation of packages using System.Runtime.CompilerServices.Unsafe via auto-referencing
- Unity Hub checks the "Documentation" module by default on the 6.4 and 6.5 streams despite that it was unchecked with the previous installs
- Shortcut that toggles between Dopesheet and Curves Views in the Animation Window's Timeline is mislabed
- Property List Items Overlap onto the Property List's top edge when scrolling through a long Property List
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.