Hi Aslam Thank you for trying Crosswalk. What project link you need? How you want integrate crosswalk in your project? So, could you open a new mail thread and descript more details about your project and request?
Best Regards ☺ Xiaofeng Zhang From: Aslam Ansari [mailto:[email protected]] Sent: Tuesday, December 22, 2015 9:15 AM To: Zhang, Xiaofeng Cc: Jonathon Gray; [email protected] Subject: Re: [Crosswalk-help] XWalkResourceClient ShouldOveride...- Android - Crosswalk Lite Hi Zang, I need help in integrating the crosswalk in existing ionic project, which is based on objective c. Can you please send a project link or help me to integrate crosswalk in my project. i have tried many things but its not working. Please this is becoming very stressful task. -- Thanks and regards, Aslam [cid:[email protected]] Follow us on: [cid:[email protected]] [cid:[email protected]] [cid:[email protected]] [cid:[email protected]] [cid:[email protected]] [cid:[email protected]] On 22-Dec-2015, at 6:35 AM, Zhang, Xiaofeng <[email protected]<mailto:[email protected]>> wrote: Have you tried Crosswalk? And is the issue still can reproduced? Best Regards ☺ Xiaofeng Zhang From: Crosswalk-help [mailto:[email protected]] On Behalf Of Zhang, Xiaofeng Sent: Tuesday, December 22, 2015 9:04 AM To: Jonathon Gray; [email protected]<mailto:[email protected]> Subject: Re: [Crosswalk-help] XWalkResourceClient ShouldOveride...- Android - Crosswalk Lite Oh.. sorry, I didnĦŻt see you mentioned Crosswalk Lite, not Crosswalk. Yes, I used Crosswalk, and you can get the version in our official website:https://crosswalk-project.org/documentation/downloads.html Best Regards ☺ Xiaofeng Zhang From: Jonathon Gray [mailto:[email protected]] Sent: Tuesday, December 22, 2015 1:41 AM To: Zhang, Xiaofeng; [email protected]<mailto:[email protected]> Subject: Re: [Crosswalk-help] XWalkResourceClient ShouldOveride...- Android - Crosswalk Lite I am having a hard time finding the version you mentioned. I am looking here: https://download.01.org/crosswalk/releases/crosswalk-lite/android/canary/ . Are you using Crosswalk and not Crosswalk lite? Thanks. BR Jonathon ________________________________ From: Zhang, Xiaofeng <[email protected]<mailto:[email protected]>> Sent: Monday, December 21, 2015 12:22 AM To: Jonathon Gray; [email protected]<mailto:[email protected]> Subject: RE: [Crosswalk-help] XWalkResourceClient ShouldOveride...- Android - Crosswalk Lite I use current stable version 15.44.384.12, it works well. Please download my sample code here to try:https://github.com/xzhan96/XWalkSimpleDemo Note a change of your code is here Ħ°( (scheme != null)Ħħ. Best Regards ☺ Xiaofeng Zhang From: Jonathon Gray [mailto:[email protected]] Sent: Monday, December 21, 2015 10:42 AM To: Zhang, Xiaofeng; [email protected]<mailto:[email protected]> Subject: Re: [Crosswalk-help] XWalkResourceClient ShouldOveride...- Android - Crosswalk Lite Yes, there is a browser on the device. I tried on both my own cell phone and a virtual device but still getting the same errors. I know this issue can also come up when there are issue in the manifest file. Is there anything that should be changed in the manifest file besides permissions and setting hardware acceleration to true? Thanks, Jonathon ________________________________ From: Zhang, Xiaofeng <[email protected]<mailto:[email protected]>> Sent: Sunday, December 20, 2015 8:00 PM To: Jonathon Gray; [email protected]<mailto:[email protected]> Subject: RE: [Crosswalk-help] XWalkResourceClient ShouldOveride...- Android - Crosswalk Lite Hi Jonathon Thanks for using Crosswalk. Which version you are using? I make a little change of your code, and it works well. From your error log: android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action ... it seems your test devices doesnĦŻt have other browser? The issue shouldnĦŻt be caused by xwalkview, could you double check? @Override public boolean shouldOverrideUrlLoading( XWalkView view, String url ) { Log.d(TAG, "url = " + url.toString()); Uri uri = Uri.parse( url ); if ( uri != null ) { String scheme = uri.getScheme(); Log.d(TAG, "SCHEME = " + scheme); boolean shouldOverride = ( (scheme != null) || scheme.equalsIgnoreCase( "http" ) || scheme.equalsIgnoreCase( "https" ) || scheme.equalsIgnoreCase( "file" ) || scheme.equalsIgnoreCase( "content" ) ); Log.d(TAG, "shouldOverride == " + shouldOverride ); if ( shouldOverride ) { if ( scheme.equalsIgnoreCase( "ps" ) || scheme.equalsIgnoreCase( "pss" ) ) { Uri.Builder builder = uri.buildUpon(); builder.scheme( scheme.equalsIgnoreCase( "ps" ) ? "http" : "https" ); uri = builder.build(); } Intent intent = new Intent( Intent.ACTION_VIEW, uri ); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); startActivity(intent); return true; } } return false; } Best Regards ☺ Xiaofeng Zhang From: Crosswalk-help [mailto:[email protected]] On Behalf Of Jonathon Gray Sent: Sunday, December 20, 2015 1:36 PM To: [email protected]<mailto:[email protected]> Subject: [Crosswalk-help] XWalkResourceClient ShouldOveride...- Android - Crosswalk Lite Hello All, I am an intern at a small company that is considering replacing the native WebView with Crosswalk. We are using a custom webview client that now extends XWalkResourceClient but we are getting an error in the overridden shouldOverrideUrlLoading method. @Override public boolean shouldOverrideUrlLoading( XWalkView view, String url ) { if ( !Text.isNull( url ) ) { LogUtil.d("SCHEME", url.toString(), context); Uri uri = Uri.parse( url ); if ( uri != null ) { String scheme = uri.getScheme(); LogUtil.d("SCHEME ", scheme, context); boolean shouldOverride = !( scheme == null || scheme.equalsIgnoreCase( "http" ) || scheme.equalsIgnoreCase( "https" ) || scheme.equalsIgnoreCase( "file" ) || scheme.equalsIgnoreCase( "content" ) ); if ( shouldOverride ) { if ( scheme.equalsIgnoreCase( "ps" ) || scheme.equalsIgnoreCase( "pss" ) ) { Uri.Builder builder = uri.buildUpon(); builder.scheme( scheme.equalsIgnoreCase( "ps" ) ? "http" : "https" ); uri = builder.build(); } Intent intent = new Intent( Intent.ACTION_VIEW, uri ); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); LogUtil.d("SCHEME", uri.toString(), context); context.startActivity(intent); return true; } } } return false; } The above code works fine in the WebView version of the app but results in an error in the XWalk version: 12-19 23:18:31.555 2206-2206/? W/System.errİs java.lang.RuntimeException: android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action ... 12-19 23:18:31.555 2206-2206/? W/System.errİs at org.xwalk.core.internal.ReflectMethod.invoke(ReflectMethod.java:67) 12-19 23:18:31.555 2206-2206/? W/System.errİs at org.xwalk.core.internal.XWalkResourceClientBridge.shouldOverrideUrlLoading(XWalkResourceClientBridge.java:162) 12-19 23:18:31.555 2206-2206/? W/System.errİs at org.xwalk.core.internal.XWalkResourceClientBridge.shouldOverrideUrlLoading(XWalkResourceClientBridge.java:155) 12-19 23:18:31.556 2206-2206/? W/System.errİs at org.xwalk.core.internal.XWalkContentsClientBridge.shouldOverrideUrlLoading(XWalkContentsClientBridge.java:206) 12-19 23:18:31.556 2206-2206/? W/System.errİs at org.xwalk.core.internal.XWalkContentsClientBridge$InterceptNavigationDelegateImpl.shouldIgnoreNavigation(XWalkContentsClientBridge.java:92) 12-19 23:18:31.556 2206-2206/? W/System.errİs at org.chromium.base.SystemMessageHandler.nativeDoRunLoopOnce(Native Method) 12-19 23:18:31.556 2206-2206/? W/System.errİs at org.chromium.base.SystemMessageHandler.handleMessage(SystemMessageHandler.java:53) 12-19 23:18:31.556 2206-2206/? W/System.errİs at android.os.Handler.dispatchMessage(Handler.java:102) 12-19 23:18:31.556 2206-2206/? W/System.errİs at android.os.Looper.loop(Looper.java:135) 12-19 23:18:31.556 2206-2206/? W/System.errİs at android.app.ActivityThread.main(ActivityThread.java:5257) 12-19 23:18:31.556 2206-2206/? W/System.errİs at java.lang.reflect.Method.invoke(Native Method) 12-19 23:18:31.556 2206-2206/? W/System.errİs at java.lang.reflect.Method.invoke(Method.java:372) 12-19 23:18:31.556 2206-2206/? W/System.errİs at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903) 12-19 23:18:31.556 2206-2206/? W/System.errİs at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698) 12-19 23:18:31.556 2206-2206/? W/System.errİs Caused by: android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=data:text/html, ... 12-19 23:18:31.556 2206-2206/? W/System.errİs at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1781) 12-19 23:18:31.556 2206-2206/? W/System.errİs at android.app.Instrumentation.execStartActivity(Instrumentation.java:1501) 12-19 23:18:31.556 2206-2206/? W/System.errİs at android.app.ContextImpl.startActivity(ContextImpl.java:1243) 12-19 23:18:31.556 2206-2206/? W/System.errİs at android.app.ContextImpl.startActivity(ContextImpl.java:1225) 12-19 23:18:31.556 2206-2206/? W/System.errİs at android.content.ContextWrapper.startActivity(ContextWrapper.java:323) 12-19 23:18:31.557 2206-2206/? W/System.errİs at com.XCENSORX.core.util.DialogUtil$CustomWebViewClient.shouldOverrideUrlLoading(DialogUtil.java:325) 12-19 23:18:31.557 2206-2206/? W/System.errİs at java.lang.reflect.Method.invoke(Native Method) 12-19 23:18:31.557 2206-2206/? W/System.errİs at java.lang.reflect.Method.invoke(Method.java:372) 12-19 23:18:31.557 2206-2206/? W/System.errİs at org.xwalk.core.internal.ReflectMethod.invoke(ReflectMethod.java:61) 12-19 23:18:31.557 2206-2206/? W/System.errİs ... 13 more Thanks for all the help in the past and let me know if there is anything I should include. BR, Jonathon _______________________________________________ Crosswalk-help mailing list [email protected]<mailto:[email protected]> https://lists.crosswalk-project.org/mailman/listinfo/crosswalk-help
_______________________________________________ Crosswalk-help mailing list [email protected] https://lists.crosswalk-project.org/mailman/listinfo/crosswalk-help
