OpenURL() not working for pdf

Hi as the title says Application.OpenURL() is not working on Android (Target API 25). And we can’t change API to 23 ( We got errors with manifest resources enableVrMode and resizable window)

We have the “http://” for OpenURL, internet permissions on manifest and Player Settings. And we only need to open a pdf on the phone’s browser. We are trying to avoid using an asset, but if the time comes a good pdf viewer recommendation will be appreciated.

The actual question is, is there another way besides OpenURL to do this?

Thanks in advance.

When you say “not working” what is happening? Are you sure your mobile browser supports pdf?

When you call it on Android it does nothing, I’m not the one coding this, and I don’t know how to debug on android. If it is of any use could you tell me how to?

Still I have been googling and everyone seems to agree that the problem is with API 24+, they recommend compiling with target API 23 or less. But we can’t.

For android, your best bet is either using Logcat or use a runtime console viewer to see if you’re getting any errors.

One of those two should help.

I’m not sure I’ve tried openurl on a higher api, but I know I haven’t seen issues with it yet on Android. I might be able to test it later today.

Logcat tends to give much more in depth info, but can be harder to read.

2 Likes

Thanks! I will try that.