Android Soft Keys & PDF

Welcome! Forums Unity Plugins In-App Web Browser Android Soft Keys & PDF

Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #684
    ArthurHucksake
    Participant

    HI,

    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?

    Kind regards,

    Arthur

    #702
    PiotrPiotr
    Keymaster

    Hi,
    ad 1) how exactly are you opening it? what code are you executing?
    ad 2) is it happening on all websites?

    #711
    ArthurHucksake
    Participant

    Hi Piotr,

    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”
    InAppBrowser.OpenURL(FileLocation, options);`

    I know the file is created and exists because I can open it fine using: Application.OpenURL(FileLocation);

    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.

    Kind regards,

    Arthur

    #712
    PiotrPiotr
    Keymaster

    Oh I see. Check “Loading local files” chapter (page 3) in Readme file. 🙂

    #718
    ArthurHucksake
    Participant

    Hi Piotr,

    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.

    Kinds regards,

    Arthur

    #731
    ArthurHucksake
    Participant

    Hi piotr,

    Any news on this, is it possible to view a PDF created at runtime which is saved to the “Application.persistentDataPath” folder?

    Kind regards,

    Arthur

    #735
    PiotrPiotr
    Keymaster

    Hi Arthur,
    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.

    #737
    ArthurHucksake
    Participant

    Hi Piotr,

    That would be great, it would be a real bonus for me if I could get this working.

    Mail it to arthur@ffs-solutions.com

    Kind regards,

    Arthur

    #740
    ArthurHucksake
    Participant

    Hi Piotr,

    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.

    Kind regards,

    Arthur

    #786
    PiotrPiotr
    Keymaster

    Hi Arthur,
    Sorry for late response. I’ve sent you an email with Android library. Let me know if it worked out for you.

    #788
    ArthurHucksake
    Participant

    Hi Piotr,

    No problem, I have also been away 😉

    Unfortunately I have not received the email of the Android library ;-(

    Kind regards,

    Arthur

    #800
    PiotrPiotr
    Keymaster

    Please check your spam folder. Email’s title is “InAppBrowser Android sources”.

    #1129
    myutini
    Participant

    Hi Piotr,

    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?

    #1140
    PiotrPiotr
    Keymaster

    This question is not related to plugin but Unity and Android-specific APIs.

    #1811
    jaime@vector001.com
    Participant

    Hello,
    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”.
    Thank you.

Viewing 15 posts - 1 through 15 (of 15 total)
  • You must be logged in to reply to this topic.