- Home /
Question by
VKirschbaum · Oct 09, 2018 at 07:17 AM ·
c#androidpdf
Opening a PDF on Android
I want to make an App, where you can open the implemented PDFs and read them.
The following Code works on Unity-Editor on Windows, but NOT on my Android-Build.
public void Button_Test()
{
try
{
TextAsset pdfTem = Resources.Load("Recipes/a", typeof(TextAsset)) as TextAsset;
File.WriteAllBytes(Application.persistentDataPath + "/" + "a" + ".pdf", pdfTem.bytes);
Application.OpenURL(Application.persistentDataPath + "/" + "a" + ".pdf");
}
catch (Exception _ex)
{
m_Text_Debug.text = _ex.ToString();
}
}
It doesn't show an Exception, although nothing happens. Can someone help?
Comment