1 Reply Latest reply on May 17, 2016 12:54 AM by shotts@adobe

    How to Create a web view to embed a URL in phonegap


      I am new to this mobile application development. My requirement is to open a external URL in mobile platform.I read that Phone gap with web view is best possible technology to do this. Could you help me on this.

        • 1. Re: How to Create a web view to embed a URL in phonegap
          shotts@adobe Adobe Employee

          I'm not completely sure I understand your particular need, but I'm guessing you're aiming for one of two things:


          1) You're creating an app that will "wrap" an external site; that is, no local content. The app would immediately launch an external website.


          If this is the case, please reconsider. PhoneGap isn't really about wrapping external websites -- it's about bringing web technologies local to the device and bridging to the native features available on that device. Apple will definitely reject such an app if you submit it to the Apple App Store, and other app stores may do so as well.


          In these cases, it's usually better to use a launcher/home screen bookmark. If your site is going to use native device features, you should develop local code that contacts your backend via XHR/Web Sockets.


          2) You need to be able to display external websites in an internal browser window (that is, not launch Safari or Chrome), but your app is mostly local code.


          You'll want to consider using the InAppBrowser plugin. It can display external websites within your app so that the user never actually leaves your app. You might want to consider the platform idioms here -- this would be fairly typical in iOS, but Android apps will usually just launch Chrome instead.


          Regardless, I'd suggest starting with the documentation available for PhoneGap: