I am instrumenting the Android app in the Kyungnam bank (KNB) project.
The Mobile SDK is working well.
When we start intensive test with multiple scenarios, we found that the UIC SDK stops capturing the web contents after some special action on the web view, such as:
- Open an app for customer to install in the app store
- Open a virtual number keyboard to input only number to an input field.
When examining the issue in the logcat, we found that after the above special actions the log result showed that web contents from UIC SDK always returned null.
Further investigation, we found that after those actions, in the chrome debugging console we can see the TLT.isInitialized() -> false, TLT.getState() -> "destroyed". But before those actions, in the same web page, we got the result TLT.isInitialized() -> true, TLT.getState() -> "loaded".
More investigating, we found that the TLT was destroyed after those action. And the reason is those action generated the event "onBeforeUnload". After this event is triggered, the Tealeaf UIC SDK will send the data to the server and destroy itself.
We checked the reason of this event and found that the KNB dev team call this kind javascript snippet:
window.location.href = "intent://#Intent;package=kr.or.kfb.bankey;end;";
This call will not cause the page to actually reload, only open an app in the play store. However, the even "onBeforeUnload" is triggered. So TLT is destroyed and all the following event or change on that page will not be captured.
I have carefully checked the app and found that they use the shouldOverrideUrlLoading function of WebViewClient to handle the special url cases. Here are the cases that can cause the UIC SDK to stop:
- "sms:..."
- "tel:..."
- "mailto:..."
- "intent:..."
- "call?..."
The last one is used to load their custom virtual security keyboards (both numbers and characters)
The function return true to prevent the webview to try to load that URL.
All the above cases caused the Tealeaf destroy before the page move to a new page
We checked with different phones and Android OSes and we found that this issue is not happening with the Android 6 or below. It happened with Nexus 5 Android 6.0.1.
The idea is to skip the beforeunload event when special events (such as click, change, etc.) happened to some elements in the web page.
What is your industry? | Computer Services |
What is the idea priority? | Urgent |