Software Archive
Read-only legacy content
Announcements
FPGA community forums and blogs have moved to the Altera Community. Existing Intel Community members can sign in with their current credentials.

cordova inappbrowser exit event not firing in windows phone 8.1

Sam_Deepak
Beginner
1,721 Views

Hi,

I am unable to capture cordova plugin inappbrowser's exit event in windows phoone 8.x builds.

This the code I am using

 ref.addEventListener("exit", function (e) {

        setTimeout(function () {
            if (callback)
                callback();
        }, 100);
    });

    alert('calling close for proxy');
ref.close();

Please help me resolve this problem.

0 Kudos
5 Replies
Sam_Deepak
Beginner
1,721 Views

Hi Guys,

 

Could someone please help on this issue. 

0 Kudos
PaulF_IntelCorp
Employee
1,721 Views

For that one I recommend you search StackOverflow, etc. for something like "cordova phonegap unable to capture exit event for inappbrowser on windows phone" -- we don't have much experience yet with the new Windows Phone webview... Also, have you confirmed that your code works on Android and/or iOS for reference?

0 Kudos
Sam_Deepak
Beginner
1,721 Views
Hi Paul, It is working on Android. For windows , what happens is, when you open a inappbrowser window instance , if you close it manually , the exit event is fired. But when you programmatically call close method on the instance, it does fire an event but it closes. So since I wanted to call back a function on closing it programmatically, I just removed exit event listener and call back after calling close method since the browser is closed technically but just that it did not notify exit event. But I just need to go back to the call back method after closing it, I depended on exit event. But now after my experiment , I came to know that it just closed always , but not firing exit event when closed programmatically. So I just called close method and went back to the callback after a timeout of 100 milliseconds which is fine with me. I guess the problem is with the plugin itself , which is not in my scope. Surprisingly, I searched completely internet, I could not find a single resolution for this. I guess cordova team should fix it for Windows phone. Let me know if you find any resolution for it.
0 Kudos
PaulF_IntelCorp
Employee
1,721 Views

Yes, sounds like it's a bug in the inAppBrowser plugin for Windows. You might also check to see if there is a newer version of it that you can try with the Windows platform, our feed is not be up-to-date with the versions on that one, I see that there is now a version 1.2.0 for that as of four days ago (https://github.com/apache/cordova-plugin-inappbrowser/blob/master/RELEASENOTES.md). You can try the later version by using the third-party plugin add feature, rather than the cordova list.

0 Kudos
Sam_Deepak
Beginner
1,721 Views

Hi Paul,

I am using the latest version only. But I just left it, since the inappborwser closes any way, but just that it does not raise the exit event, 

 

0 Kudos
Reply