Pressing any button more than once in the navigation browser does not work

Problem:

Pressing any button (input tag in html) of any html page more than once in the Crosswalk browser (XWalkView) does not work in Android. (Clicking for the first time works, but pressing the button after that at any time gives no answer, except for the next error in the Eclipse IDE Logcat, i.e. Pressing a file like input shows the first file selection, but presses the same button once without getting an answer. But after restarting the application, the process repeats. This is really strange behavior.)

Mistake:

This error message is displayed every time you press any button (input tag).

11-20 17:32:04.019: E/chromium(31406): [ERROR:xwalk_autofill_client.cc(170)] Not implemented reached in virtual void xwalk::XWalkAutofillClient::OnFirstUserGestureObserved() 

The code:

index.html

 <html> <body> <form> <input type="file" accept="*/*"/> <input type="submit"/> </form> </body> </html> 

MainActivity.java

 import org.xwalk.core.XWalkView; import android.app.Activity; import android.os.Bundle; import android.widget.LinearLayout; public class MainActivity extends Activity { private LinearLayout linearLayout; private XWalkView xWalkWebView; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); linearLayout = (LinearLayout) findViewById(R.id.LinearLayout1); xWalkWebView = new XWalkView(this.getApplicationContext(), this); xWalkWebView.load("file:///android_asset/index.html", null); linearLayout.addView(xWalkWebView); } } 
+8
android html crosswalk crosswalk-runtime
source share
1 answer

Adding the following code helped solve the problem:

  @Override protected void onPause() { super.onPause(); if (mXwalkView != null) { mXwalkView.pauseTimers(); mXwalkView.onHide(); } } @Override protected void onResume() { super.onResume(); if (mXwalkView != null) { mXwalkView.resumeTimers(); mXwalkView.onShow(); } } @Override protected void onDestroy() { super.onDestroy(); if (mXwalkView != null) { mXwalkView.onDestroy(); } } @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { if (mXwalkView != null) { mXwalkView.onActivityResult(requestCode, resultCode, data); } } @Override protected void onNewIntent(Intent intent) { if (mXwalkView != null) { mXwalkView.onNewIntent(intent); } } 

Indicated here

+7
source share

All Articles