As my understanding, app scheme provides a same origin, safe(ground the access 
to the files belong to the app), and HTTP-response(support XHR) file access.
Same origin is the nature part of app scheme. What we need to do add the HTTP 
response and security support based on the file scheme(android_asset).
Android_asset has no safe issue, thanks to the asset mechanism on Android.
After we add the HTTP response support, there should be no more limitation.

From: Zhu, Yongsheng
Sent: Friday, November 29, 2013 9:53 AM
To: Wang, Xingnan; crosswalk-dev@lists.crosswalk-project.org
Subject: RE: [Crosswalk-dev] Intent to Implement: [Android] app URI scheme 
support on Android

Thanks, Xingnan. Seems we can follow current way to support app://.
Questions: any limitations on Android port?

Yongsheng

From: Crosswalk-dev [mailto:crosswalk-dev-boun...@lists.crosswalk-project.org] 
On Behalf Of Wang, Xingnan
Sent: Thursday, November 28, 2013 1:54 PM
To: 
crosswalk-dev@lists.crosswalk-project.org<mailto:crosswalk-dev@lists.crosswalk-project.org>
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
Crosswalk-dev@lists.crosswalk-project.org
https://lists.crosswalk-project.org/mailman/listinfo/crosswalk-dev

Reply via email to