4 Replies Latest reply on May 17, 2017 7:02 PM by howard_owens

    Navigation from inappbrowser page back to app

    howard_owens

      I have a couple of websites in my suite of sites that I link to in my app.  I have them opening in with the inappbrowser plugin currently.

       

      I have another situation where I have a form submission and since it's an insert, there's no json response back from the server.  The easiest thing would be just to handle the response page with inappbrowser (I might even want to do this with the FORM itself, though currently, I'm creating it with Javascript in the app).

       

      Here's what I can't figure out: navigation back to the app.  After the form submission, I want to enable if not full app navigation, least return to the app's home screen.

       

      I believe I can do JavaScript and CSS injection, but I'm not sure that solves the issue because the navigation will still be on that page, outside of app itself.

       

      So boil this down to a very simple question: How do I create "home" link that when clicked returns user to the home page of my application? (I've googled around on this a bunch and haven't found an answer.

        • 1. Re: Navigation from inappbrowser page back to app
          howard_owens Level 1

          still looking for an answer here ... thanks.

          • 2. Re: Navigation from inappbrowser page back to app
            kerrishotts Adobe Community Professional

            I'm not entirely sure I follow what you're after, but you should be able to listen to load events on the IAB and detect when you should close the IAB, thus returning users to your app. See Inappbrowser - Apache Cordova for more info.

             

            If that doesn't help, holler! It might be easier to see a diagram of your desired flow.

            • 3. Re: Navigation from inappbrowser page back to app
              howard_owens Level 1

              After going through more material online, I think I understand better that the intended functionality of an external link is that to return to the app page, a user would click the "Done" button.

               

              Which is all fine and good if you're sending the user to a clearly third-party page.  The user expectation is they've left the app and are looking at something third party.  For example, when I'm in Tweetdeck and I click a link to the Washington Post.  I know I've opened something external to the app.

               

              My initial thinking here was I'm going to have some functionality that happens on my own server.

               

              For example, if a user creates a new account.  The easiest way to deal with the response is on a web page that is on my server rather than returning a response to the app (since an insert query doesn't naturally return JSON). 

               

              I'd like that page, even though it's on my server and not in my app, to appear to the user as seamlessly part of the app.

               

              Tonight I think I'm going to experiment with my own close button on the response page.

               

              I'm thinking about just making my whole account creation process as well as some other content submission aspects just external pages instead of pages in the app.  I just need to find the right user experience.

              • 4. Re: Navigation from inappbrowser page back to app
                howard_owens Level 1

                Well, I can't close a window that wasn't opened by JavaScript, so that won't work.