OMA API Server Demo
This is a quick demo of a design mockup for an OMA API server running under Android. The purpose of this API server is to provide browser-based apps with access to device features that are not currently exposed natively by the browser. In this demo, I am using the OMA Mobile Codes API in development at OMA, to scan a QR code and return the result to the browser-based app. Using any Android browser, I have loaded an OMA mobile codes test page from my web server. The test page provides a button which will invoke a code scan operation by issuing a cross-domain HTTP request to the OMA API server running on the localhost. When I select the scan button, the app sends the request to the OMA API server which then uses the Zebra Crossing code scanner's "scan by intent" interface to scan a code. I position the camera over the code and ZXing scans it, then sends the result back to the OMA API server via an Activity Result intent. The OMA API server then responds to the app via the existing HTTP connection, completing the app's request. This demo shows that a network based app can use the XHR API to interact with a locally served resource, which acts as an API bridge to device capabilities such as a code scanner.
This is a quick demo of a design mockup for an OMA API server running under Android. The purpose of this API server is to provide browser-based apps with access to device features that are not currently exposed natively by the browser. In this demo, I am using the OMA Mobile Codes API in development at OMA, to scan a QR code and return the result to the browser-based app. Using any Android browser, I have loaded an OMA mobile codes test page from my web server. The test page provides a button which will invoke a code scan operation by issuing a cross-domain HTTP request to the OMA API server running on the localhost. When I select the scan button, the app sends the request to the OMA API server which then uses the Zebra Crossing code scanner's "scan by intent" interface to scan a code. I position the camera over the code and ZXing scans it, then sends the result back to the OMA API server via an Activity Result intent. The OMA API server then responds to the app via the existing HTTP connection, completing the app's request. This demo shows that a network based app can use the XHR API to interact with a locally served resource, which acts as an API bridge to device capabilities such as a code scanner.