I\'m developing an Android app in Unity3D to be used in classrooms, it has buttons to display some webs and videos related to the current lesso
Ok, finally I got the solution! As you can read here Android permissions changed in Nougat (v.7) so that's why I wasnt able to open the pdf, the sistem was blocking it.
The solution was simple, I just lowered the target API level to 23 (Android 6.0 'Marshmallow').
Here's my code if someone is interested:
void openPDF(){
string namePDF = "test";
TextAsset pdfTem = Resources.Load("PDFs/"+namePDF, typeof(TextAsset)) as TextAsset;
System.IO.File.WriteAllBytes(Application.persistentDataPath + "/"+namePDF+".pdf", pdfTem.bytes);
Application.OpenURL(Application.persistentDataPath+"/"+namePDF+".pdf");
}