Suggestion for quick improvement

Welcome! Forums Unity Plugins In-App Web Browser Suggestion for quick improvement

  • This topic has 4 replies, 2 voices, and was last updated 5 years ago by VEGA.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #639
    VEGA
    Participant

    Hi!
    Thank you for your plugin!
    Please, can you add some improvement for android library:
    In Helper.java in method onCreateDialog you have a next code:

    if(customBackButtonBehaviour) {
      // bla-bla
    } else {
    super.onBackPressed();
    }
    

    If you will replace line “super.onBackPressed();” with this code:

    if (mWebView.canGoBack())
    	super.onBackPressed();
    

    everyone (especially i) will be very very happy! 🙂

    Thank you!

    #640
    PiotrPiotr
    Keymaster

    Hey,
    I don’t get this suggestion 🙂
    So user will exit browser only if he has visited more thank link? What’s the point?

    #642
    VEGA
    Participant

    Closing app by pressing back button is disabled in Unity by default and enabling this feature – totally bad idea, because when you play in games with on-screen controls, you necessarily will click on back button while playing.

    In addition let me explain what i see:
    1) App is opened and web-site is loaded.
    2) I pressed back button and have a white screen.
    3) I pressed back button again and app is closed.

    It’s not good and checking web browser history is a point, where you need to dig to avoid this behavior of “null”-page.

    #643
    PiotrPiotr
    Keymaster

    It seems only thing your app is doing is opening a website? Why do you use Unity at all? 😀

    I am thinking about changing your approach and simply adding new APIs:
    InAppBrowser.CanGoBack()
    InAppBrowser.GoBack()

    That way you can use custom button behavior and do whatever you want inside there. What do you think?

    #644
    VEGA
    Participant

    I’m using your plugin for one of scenes, which is intended for view web-content. But basically it’s a big game. I’m doing just what client want )

    Api changes in your way – very good idea!

    Thank you for your time!

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