Question

In my android project i am using Phonegap 2.2.0 with child browser.

i went through Phonegap 2.3.0 at Phonegap documentation, i got attracted when i saw inAppBrowser so,i thought by using phonegap 2.3.0 i can avoid child browser plugin and i tried to use.

My question is, i am using child browser's onLocationChange method, i need something similar in inAppBrowser, but i gone through full inAppBrowser documentation at phonegap.

there is only three events in inAppBrowser (Phonegap 2.3.0 documentation)

  1. loadstart - event fired when the InAppBrowser starts to load a URL

  2. loadstop - event fired when the InAppBrowser finished loading a URL

  3. exit - event fired when the InAppBrowser window is closed

I just tried 1&2 events to see how they are working, as i was expected these two events are not match for child browser's onLocationChange method.

is there any solution ? or i have stick with child browser ?

Was it helpful?

Solution

For me loadstop worked by adding following lines,

iabrowser = window.open(url, target, op);
iabrowser.addEventListener('loadstop', locChanged);

Make sure you initialize iabrowser properly.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top