Start a new topic

software keyboard bug with the AR(cordova) in the Android

software keyboard bug with the AR(cordova) in the Android


Hi Eva,

Thank you for your assistance.

We have modified our coding as you have suggested us;

this.webView.handleResume(true);
//WikitudePlugin.handleResumeInCordovaWebView(cordova.getActivity().getWindow().getDecorView().findViewById(android.R.id.content));

this.webView.getView().clearFocus();
//WikitudePlugin.releaseFocusInCordovaWebView(cordova.getActivity().getWindow().getDecorView().findViewById(android.R.id.content));



It seems that the frequency of the bug reproduction is now less than before but it is still reproducable somehow under the certain conditions (which is not determined). Also the bug is still 100% resproducable with Android 6.

A part from the user login functions we have various text box (search functions etc) in the apps, so it is quite important to make key bord appear in any case. Also the Android 6 user share is not that much yet butit it is supposed to be higher soon or later. 

Are there any more suggestions to make sure the keyboard appearance with android, and also any solutions for the android 6?

Thank you!

Regards,

Nakasha


 

Hi Nakasha,

We are aware of this issue because this is kind of intended behaviour. The click on the "1.1 Image On Target" item will let keyboard disappear anyhow because of the changing focus (focus is no longer at the textfield). Could you please try these:

1. Manually set the focus via

window.setTimeout(function ())
{
document.getElementById("url").focus();
}, 0);

 

2. Try adding these calls 

this.webView.handleResume(true) instead of calling handleResumeInCordovaWebView()
this.webView.getView().clearFocus()  instead of calling releaseFocusInCordovaWebView()

instead of having these functions 

private static void releaseFocusInCordovaWebView(View rootView) {
    if (rootView instanceof CordovaWebView) {
    ((CordovaWebView)rootView).getView().clearFocus();
    } else if (rootView instanceof ViewGroup) {
        final int childCount = ((ViewGroup)rootView).getChildCount();
        for (int i=0; i< childCount; i++) {
            WikitudePlugin.releaseFocusInCordovaWebView(((ViewGroup)rootView).getChildAt(i));
        }
    }
}

private static void handleResumeInCordovaWebView(final View rootView) {
    if (rootView instanceof CordovaWebView) {
        ((CordovaWebView)rootView).handleResume(true);
    }
    else if (rootView instanceof ViewGroup) {
        final int childCount = ((ViewGroup)rootView).getChildCount();
        for (int i=0; i< childCount; i++) {
            WikitudePlugin.handleResumeInCordovaWebView(((ViewGroup) rootView).getChildAt(i));
        }
    }
}

 

Hi

We have some cordova problem.

After completion of the AR(cordova) in the Android,
the software keyboard is not be displayed.
This issue occurred below version.
wikitude-cordova-plugin-4.1.0-3.1.0
wikitude-cordova-plugin-5.0.0-3.1.0
wikitude-cordova-plugin-5.1.1-3.2.0
wikitude-cordova-plugin-5.1.1-3.2.1
wikitude-cordova-plugin-5.1.3-3.2.1
wikitude-cordova-plugin-5.1.4-3.2.1

Also it occurs in the sample.
1. Focus to the text box of "WORLD URL". -> Keyboard is displayed.
2. Tap the "1.1 IMAGE ON TARGET", to start the AR.
3. Then, to exit the AR in the back key of the device.
4. Focus to the text box of "WORLD URL". -> Keyboard is not displayed.

 but this kind of bug is not  reproducible for sure
if you can not reproduce it, please repeat it again from 1 to 3.

 With some devices, the keyboard is no longer displayed.
"Nexus 6 (6.0.1)"
"Nexus 5 (6.0)"
"Xperia Z2 (5.0.2):SO-03F"
"Galaxy S5 (5.0):SCL23"

Because it also occurs in our Published app,
We would love to solve this problem asap.

We would appreciate any suggestion!


Thanks and greetings
Nakasha
Login or Signup to post a comment