AQTest: asynchronous query from web worker to native Android code using XHR
Author: Christopher J. Brody
License: UNLICENSE (public domain)
I can hereby testify that this project is completely my own work and not subject to agreements with any other parties. In case of code written under direct guidance from sample code the link is given for reference. In case I accept contributions from any others I will require CLA with similar statements.
This project demonstrates the following:
- Ability to request native iOS functionality from within a web worker and return a callback to the web worker.
file:or custom URI
aqcallbackfunction with a string that echos the URI from the XHR request
This project also has an
AQManager component that keeps and handles the routing for multiple components that implement the
This project is a starting point for the following ideas (so far):
The Cordova project has been fixing security issues in its external domain whitelist plugin over time, and has also dealt with security issues in its internal bridging mechanism. It is very strongly advised NOT to release an app with a custom-built web view bridging or domain whitelisting mechanism without proper code review and testing.
Other major limitations
- There is no general message queueing. The idea is currently let each component implement its own queueing mechanism.
- @brodybits / aqsa-query-test-ios - request native iOS functionality from within a web worker
- @brodybits / cordova-aqs-android and @brodybits / cordova-aqs-ios
A similar concept described in my Starting JSONBus: towards a replacement for Cordova/PhoneGap post on an old blog in December 2012.