- Home /
Question by
Requiem99 · Jun 09, 2017 at 09:32 AM ·
androidresources.loadfile-iopdf
Resources Load to open pdf is not working anymore in Android 7
HI! I used this code to open a pdf file located inside the Resources folder in Android devices. The pdf was renamed with .bytes extension. But this code doesn't work anymore with Android 7. Any suggestions? Or there are other ways to do that?
string nome = "fileToOpen";
TextAsset pdfTem = Resources.Load("test/"+nome, typeof(TextAsset)) as TextAsset;
System.IO.File.WriteAllBytes(Application.persistentDataPath + "/"+nome+".pdf", pdfTem.bytes);
Application.OpenURL(Application.persistentDataPath+"/"+nome+".pdf");
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220612123826im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
android browse and read text files 1 Answer
downloading file, saving on android 1 Answer
Android: Writing persistent data to SD Card 2 Answers