Thanks, Xingnan. Seems we can follow current way to support app://. Questions: any limitations on Android port?
Yongsheng From: Crosswalk-dev [mailto:[email protected]] On Behalf Of Wang, Xingnan Sent: Thursday, November 28, 2013 1:54 PM To: [email protected] Subject: [Crosswalk-dev] Intent to Implement: [Android] app URI scheme support on Android Summary: App URI scheme, as part of sysapps API, is used to address resources inside a packaged application. http://app-uri.sysapps.org/ In crosswalk, app URI scheme is supported in all ports except Android, as on Android crosswalk has a different path to access file from local(app's resources on Android locates in assets folder, and we need to access them from java side). So to let web applications access resources via app scheme and keep aligned with other ports, we need to add the app URI scheme support on Android. Affected component: N/A Related feature: XWALK-174 < https://crosswalk-project.org/jira/browse/XWALK-174> Target Release: Crosswalk 3 Implementation details: These are several steps to implement the app scheme: 1 Create a new app scheme protocol handler and register it into URL protocol handler factory. Runtime/browser/android/net/android/_protocol_handler.cc New Class: AppProtocolHander New Function: CreateAppProtocolHandler Runtime/browser/runtime_url_request_context_getter.cc Register AppProtocolHander 2 Bridge the app access into assets on Android. Runtime/android/java/src/org/xwalk/core/AndroidProtocolHandler.java Add app scheme verification, and call openAsset() for it. 3 Add the HTTP responses in the app scheme protocol handler. Runtime/browser/android/net/android_stream_reader_url_request_job.cc Support HTTP responses of 400, 403, 404, 200, 501 etc.
_______________________________________________ Crosswalk-dev mailing list [email protected] https://lists.crosswalk-project.org/mailman/listinfo/crosswalk-dev
