User Tag List

Results 1 to 9 of 9

Thread: Issues with links in Webview Object

  1. #1
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    Kimera's Avatar
    Join Date
    Feb 2007
    Location
    Houston, TX
    Posts
    729
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Issues with links in Webview Object

    I am using webview 2 in an app right now and just came across this.

    I have to do a bit of web dev then test it in the mobile app, In my first run of testing on a mobile device I had to test basic functionality and interface functionality. I have to say I expected issues, things such as interface format, sizing issues, some code not working, etc. I HAD NONE OF THAT! So thank you for doing such a wonderful job on this object.

    I did realize that some of my links were not working in the mobile app which lead to a test. I have 6 of them in this test...

    1. Download a pdf file using the download attribute in the link
    2. Load a PDF file in the browser window.
    3. Load a PDF file in a new window, using target="_blank".
    4. Download a HTML file using the download attribute in the link.
    5. Load a HTML file in the browser window.
    6. Load a HTML file in a new window, using target="_blank".

    They all work in a web browser just as they are described (chrome/edge).

    In Webview, running the frame in windows.
    All the pdf links download the file.
    The HTML Links
    Link 4 loads the page rather than downloads it.
    Link 5 & 6 load the page as expected.

    In Webview, running as a mobile app
    All the pdf links do nothing
    The HTML Links
    Link 4 does nothing
    Link 5 loads the page as it should
    Link 6 loads the page in the same window

    I am sure this is my ignorance but...
    I expected a web browser window to open when target="_blank" was used regardless of the file type.
    I did not know what to expect trying to load a pdf file but did at least expect the chance to download on mobile.
    I did not expect using the download attribute would prevent the download from working as it's an HTML 5 standard.

    I have added the MFA file for a mobile app that loads a web page with all 6 links.
    http://dev.genapp.pro/examples/webview/

    Please help me understand what is happening here and how I can get a PDF file to download through clicking a link.

    Thank you!
    Attached files Attached files

  2. #2
    Clickteam Clickteam
    Fernando's Avatar
    Join Date
    Dec 2006
    Posts
    6,741
    Mentioned
    296 Post(s)
    Tagged
    4 Thread(s)
    i will check more in deep, BUT:

    1.- Webbrowser (windows) is not the same as WebView in Android
    2.- Android doesn't like http and from android 9 you need to add this link in the runtime to allow it to work (security issues) in res/xml
    https://community.clickteam.com/threads/107259-Get-objecto-doesnt-work-on-android-9-and-10
    3.- You cannot use _blank in Webview also for security concept, only way to open external browser is using Intents.
    4.- If you want to download something use the action designed for that, save in a file and from there open it.
    (I may add these feature in webview (API MIN=21 o 5.1) to download from page, need to check this action if this can be a source of problem since is related to write permission AND need to show a dialog that need to be only in English for now)

    And as information Android webview doesn't show pdf

    you will need to use google as support for this

    "https://docs.google.com/gview?embedded=true&url=" + "http://dev.genapp.pro/examples/webview/Laws_for_Contests_and_Gifts.pdf"

    of course you will need to be patient with showing and scrolling
    Regards,


    Fernando Vivolo

    ... new things are coming ...

  3. #3
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    Kimera's Avatar
    Join Date
    Feb 2007
    Location
    Houston, TX
    Posts
    729
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Thanks Fernando! I spoke a bit with Simon as well and your info as well as his should help. You guys rock! I only want it to download but I want the user to know what file they are downloading and when and since the link is from a web page and not the native app showing the web page I can't just download it in the background. Well I can, and have, but I need it to be transparent to the user what is going on. I do nothing in the background they are not aware of.

  4. #4
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    Kimera's Avatar
    Join Date
    Feb 2007
    Location
    Houston, TX
    Posts
    729
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Hey @Fernando , I just got off the phone a few minutes ago and clicked your link. I had read that already but thought it was only for the Get object only for some reason. Thinking about it after you pointed it out makes me realize it's android based, not Get object based. I will fix the https issue by using https and not editing the files, I just feel that is a better way to go. The issue still takes place though in terms of the pdf file downloads not working. In fact any link (< a href...) that uses the HTML5 "download" attribute does not work at all in webview, not just PDF. You can see this in the example this sample app shows you as link number 4, under HTML, does not work in the mobile app. The APK was to large so I had to post the mfa file. This does go to an https address so that part should not be an issue.

    Thanks again!
    Attached files Attached files

  5. #5
    Clickteam Clickteam
    Fernando's Avatar
    Join Date
    Dec 2006
    Posts
    6,741
    Mentioned
    296 Post(s)
    Tagged
    4 Thread(s)
    @Kimera New Object sent for you to test and please let us know if it works
    Regards,


    Fernando Vivolo

    ... new things are coming ...

  6. #6
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    Kimera's Avatar
    Join Date
    Feb 2007
    Location
    Houston, TX
    Posts
    729
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Thank you so much! I will get back to you ASAP!

  7. #7
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    Kimera's Avatar
    Join Date
    Feb 2007
    Location
    Houston, TX
    Posts
    729
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    @Fernando I am sorry it was not yesterday that I posted this, it was very late when I finished up. It does appear the object is working to download. I had no issues saving with an HTML5 link using download attr and a standard link.

    Thanks so much for your time and hard work!

    As always you guys are on top of things!

  8. #8
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleUniversal Windows Platform Export Module
    Fusion 2.5 (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Oct 2009
    Posts
    333
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    I would like to open a simple web page in a frame (html5), I would like to know if we can do this with HTML Tag Holder & Absolute

  9. #9
    Clickteam Clickteam
    Fernando's Avatar
    Join Date
    Dec 2006
    Posts
    6,741
    Mentioned
    296 Post(s)
    Tagged
    4 Thread(s)
    Sorry @pl, why are you asking this in android forum?

    yes you can open a web inside html5 using tag object you need to code for iframe
    Regards,


    Fernando Vivolo

    ... new things are coming ...

Similar Threads

  1. Help with WEBVIEW 2 Object. Permissions not Activating?
    By VBEinc in forum Android Export Module 2.5
    Replies: 21
    Last Post: 11th October 2019, 02:21 AM
  2. Webview object
    By Lecherbault in forum Android Export Module 2.5
    Replies: 37
    Last Post: 27th August 2019, 09:36 AM
  3. webview object : optical zoom
    By arthurh in forum Android Export Module 2.5
    Replies: 15
    Last Post: 6th November 2015, 09:14 AM
  4. WebView Object is here!
    By Fernando in forum Android Export Module Version 2.0
    Replies: 57
    Last Post: 3rd August 2015, 07:41 PM
  5. WebView and WebX Object Issues
    By Kracker in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 2nd December 2013, 07:21 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •