February 1, 2018 at 4:27 pm #684
Just started using this plugin and have two questions:
1, Is it possible for this plugin to display a local PDF file? I get “Web page not available” when attempting to do this.
2, My Unity App runs full screen on android, but when the “In-App Web Browser” shows, the soft keys appear at the bottom. Is there a way to prevent these from appearing?
ArthurFebruary 7, 2018 at 5:21 am #702
ad 1) how exactly are you opening it? what code are you executing?
ad 2) is it happening on all websites?February 8, 2018 at 11:32 am #711
1, I am trying to open it with the following code
`InAppBrowser.DisplayOptions options = new InAppBrowser.DisplayOptions();
options.displayURLAsPageTitle = false;
options.backButtonText = “<< Back”;
options.pageTitle = “”;
options.barBackgroundColor = “#A8B1B8”;
options.textColor = “#144B8C”;
options.browserBackgroundColor = “#A8B1B8”;
options.loadingIndicatorColor = “#144B8C”;
options.pinchAndZoomEnabled = true;
string FileLocation = Application.persistentDataPath + “/Temp/Temp.pdf”
I know the file is created and exists because I can open it fine using:
2, Yes, it happens to me on all the websites I have tried.
If you have any suggestions, I would be more than happy to give them a try.
ArthurFebruary 8, 2018 at 5:10 pm #712
Oh I see. Check “Loading local files” chapter (page 3) in Readme file. 🙂February 9, 2018 at 5:04 pm #718
Thanks for your reply, unfortunately my PDF files are created at runtime and therefore can only be saved into the “Application.persistentDataPath” as the “Application.streamingAssetsPath” is read only from what I believe.
ArthurFebruary 13, 2018 at 10:01 pm #731
Any news on this, is it possible to view a PDF created at runtime which is saved to the “Application.persistentDataPath” folder?
ArthurFebruary 13, 2018 at 11:35 pm #735
If I send you source code is it something you could take a look by yourself?
I am out for next 2 weeks and not able to do any research on this.February 14, 2018 at 4:05 pm #737
That would be great, it would be a real bonus for me if I could get this working.
Mail it to email@example.com
ArthurFebruary 15, 2018 at 10:41 am #740
I have it working on IOS, this was a simple tweak to the “InAppBrowser.cs” file to prevent it from prefixing the “Application.streamingAssetsPath” to the supplied path in the appropriate function.
However, it would seem that this operation is carried out within the “InAppBrowser.jar” plugin when this function is called on Android. A modified “InAppBrowser.jar” which does not prefix the supplied file location with anything would most likely do the trick. So the source for the “In-AppBrowser.jar” should allow me to make the changes I require if you do not have the time to do this.
ArthurFebruary 27, 2018 at 9:08 pm #786
Sorry for late response. I’ve sent you an email with Android library. Let me know if it worked out for you.February 28, 2018 at 11:31 pm #788
No problem, I have also been away 😉
Unfortunately I have not received the email of the Android library ;-(
ArthurMarch 2, 2018 at 5:33 pm #800
Please check your spam folder. Email’s title is “InAppBrowser Android sources”.July 4, 2018 at 2:55 am #1129myutiniParticipant
I also need the Android soft keys hidden and and simply handle closing the browser by JS callback. How can I hide the Android soft keys?July 17, 2018 at 8:36 pm #1140
This question is not related to plugin but Unity and Android-specific APIs.October 31, 2019 at 12:34 pm #firstname.lastname@example.orgParticipant
For project needs I need to open local URLs in persistentDataPath. Could you solve it? As Arthur says, in Android it cannot be modified with “InAppBrowser.cs”.
- You must be logged in to reply to this topic.