1
votes

I am currently using the BroswerComponent to integrate with a payment gateway. The flow relies on listening for redirects on the BrowserComponent. This is achieved this way

BrowserComponent c = new BrowserComponent();
c.addWebEventListener("onStart", e -> {
    String url = c.getURL();
    //process new url
});

This problem is that while this works fine on the Codename one simulator, it doesn't on a device (iOS and Android). It just stops redirecting after a couple of redirects without getting to the final step. I also have no such issues when I try to implement this flow with Native Android API using WebView. Redirecting is completed in that case.

1

1 Answers

0
votes

I was able to resolve this issue by getting the current URL from the event object.

String url = c.getUrl();

was changed to

String  url = e.getSource().toString();