ICEmobile
  1. ICEmobile
  2. MOBI-827

ICEmobile-SX protocol and API enhancements

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.3 Final
    • Fix Version/s: BridgeIt 1.0
    • Component/s: Containers
    • Labels:
      None
    • Environment:
      ICEmobile, ICEmobile-SX

      Description

      ICEmobile-SX is effectively a "helper application" and interacts with the browser via a custom URL scheme. Improvements to this scheme and an API will enhance the functionality of ICEmobile-SX/BridgeIt.

        Activity

        Ted Goddard created issue -
        Ted Goddard made changes -
        Field Original Value New Value
        Assignee Steve Maryka [ steve.maryka ] Ted Goddard [ ted.goddard ]
        Hide
        Ted Goddard added a comment - - edited

        One option for ICEmobile-SX return value enhancement is to use JSON encoding rather than URL encoding. Unfortunately, JSON is characterized by an abundance of characters that must all be encoded in URLs (specifically braces, quotes, and commas).

        URL encoding will be used as the base encoding for ICEmobile-SX return values. By default name=value pairs will be found in the document by id (name is not unique and would require a form to be specified) and their value will be set. If the id (with suffix "-hid" added) is not found, but is valid, a hidden field will be created to store the value. This case where the ID is "invalid" can be used by JavaScript invocations that rely on the callback alone for data transport. In this case the name passed to ICEmobile-SX invocation should be of the form "_result" since underscore is not an allowed character for HTML IDs.

        [Possible future simplified ajax capability: If an element without a value is found (such as a div or text area) the value will be set to the innerHTML of the element.]

        Name/value pairs of the form "!name=value" (where the name starts with "!") are reserved and are processed by the hashchange logic for flags and other data values used by the JavaScript API.

        The safest data transport mechanism is to use the name=value form since this will function even if the browser completely loads the page (thereby losing any in-memory context for JavaScript callbacks).

        Each native function is defined in the ice.mobi namespace, for instance:

        ice.mobi.scan("myqr");

        will result in the scanned value being stored in the field with name "myqr" and id "myqr-hid" adjacent to the element with id "myqr".

        ice.mobi.scan("_myqr", mycallback);

        will result in

        mycallback(event)

        where

        event.command = "scan"
        event.name = "_myqr"
        event.value = "scanned text"
        event.response = null
        event.preview = null
        event.status = "done"

        ice.mobi.camera("_mycam", mycallback);

        will result in

        mycallback(event)

        where

        event.command = "camera"
        event.name = "_mycam"
        event.value = null
        event.response = "handled by AuxUploadResourceHandler"
        event.preview = "data:image/png;base64,iVBOR..."
        event.status = "wait"
        event.statusDetail = "offline"

        For bulk upload types such as photo and video, ICEfaces does not return a useful value, but other approaches could use the return value from the upload to associate the upload with future HTTP requests (thereby supporting a sessionless interaction).

        Values for status: "done", "wait", "fail". statusDetail contains the error message or description of the wait condition.

        Show
        Ted Goddard added a comment - - edited One option for ICEmobile-SX return value enhancement is to use JSON encoding rather than URL encoding. Unfortunately, JSON is characterized by an abundance of characters that must all be encoded in URLs (specifically braces, quotes, and commas). URL encoding will be used as the base encoding for ICEmobile-SX return values. By default name=value pairs will be found in the document by id (name is not unique and would require a form to be specified) and their value will be set. If the id (with suffix "-hid" added) is not found, but is valid, a hidden field will be created to store the value. This case where the ID is "invalid" can be used by JavaScript invocations that rely on the callback alone for data transport. In this case the name passed to ICEmobile-SX invocation should be of the form "_result" since underscore is not an allowed character for HTML IDs. [Possible future simplified ajax capability: If an element without a value is found (such as a div or text area) the value will be set to the innerHTML of the element.] Name/value pairs of the form "!name=value" (where the name starts with "!") are reserved and are processed by the hashchange logic for flags and other data values used by the JavaScript API. The safest data transport mechanism is to use the name=value form since this will function even if the browser completely loads the page (thereby losing any in-memory context for JavaScript callbacks). Each native function is defined in the ice.mobi namespace, for instance: ice.mobi.scan("myqr"); will result in the scanned value being stored in the field with name "myqr" and id "myqr-hid" adjacent to the element with id "myqr". ice.mobi.scan("_myqr", mycallback); will result in mycallback(event) where event.command = "scan" event.name = "_myqr" event.value = "scanned text" event.response = null event.preview = null event.status = "done" ice.mobi.camera("_mycam", mycallback); will result in mycallback(event) where event.command = "camera" event.name = "_mycam" event.value = null event.response = "handled by AuxUploadResourceHandler" event.preview = "data:image/png;base64,iVBOR..." event.status = "wait" event.statusDetail = "offline" For bulk upload types such as photo and video, ICEfaces does not return a useful value, but other approaches could use the return value from the upload to associate the upload with future HTTP requests (thereby supporting a sessionless interaction). Values for status: "done", "wait", "fail". statusDetail contains the error message or description of the wait condition.
        Hide
        Ted Goddard added a comment -

        A more detailed variant of the API includes an options value:

        ice.mobi.camera("_mycam", mycallback, {postURL="...",returnURL="...",parameters={name=value,...}}

        Defined options are:

        postURL: the URL to POST the captured data to; if omitted will use the action URL of the containing form
        returnURL: the URL to display in the browser when complete; if omitted will be the current URL with #icemobilesx appended (no fragment will be appended if the URL currently has a fragment set)
        parameters: JSON object of name/value pairs
        JSESSIONID = session ID cookie
        splashURL = the URL of a splash screen image

        Show
        Ted Goddard added a comment - A more detailed variant of the API includes an options value: ice.mobi.camera("_mycam", mycallback, {postURL="...",returnURL="...",parameters={name=value,...}} Defined options are: postURL: the URL to POST the captured data to; if omitted will use the action URL of the containing form returnURL: the URL to display in the browser when complete; if omitted will be the current URL with #icemobilesx appended (no fragment will be appended if the URL currently has a fragment set) parameters: JSON object of name/value pairs JSESSIONID = session ID cookie splashURL = the URL of a splash screen image
        Hide
        Ted Goddard added a comment - - edited

        It may be possible to perform all uploads in the background and return a thumbnail immediately. Server push could be used to update the page. ICEmobile-SX will require a flag to indicate whether a given upload should be performed in the background.

        Show
        Ted Goddard added a comment - - edited It may be possible to perform all uploads in the background and return a thumbnail immediately. Server push could be used to update the page. ICEmobile-SX will require a flag to indicate whether a given upload should be performed in the background.
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #36645 Thu Jul 11 15:10:04 MDT 2013 ted.goddard test page for offline ICEmobile-SX scan (MOBI-827)
        Files Changed
        Commit graph ADD /icemobile/trunk/icemobile/samples/jsp/icemobilespring/src/main/webapp/resources/scan.html
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #36646 Thu Jul 11 15:16:28 MDT 2013 ted.goddard implementation for offline scanning with ICEmobile-SX in innocuous form (MOBI-827)
        Files Changed
        Commit graph MODIFY /icemobile/trunk/icemobile/jsp/src/main/javascript/icemobile.js
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #36658 Thu Jul 11 17:00:51 MDT 2013 ted.goddard allow popstate reloads to coexist with ICEmobile-SX local URL fragment communication (MOBI-827)
        Files Changed
        Commit graph MODIFY /icemobile/trunk/icemobile/samples/jsp/icemobilespring/src/main/webapp/resources/icemobilespring.js
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #36660 Thu Jul 11 17:27:03 MDT 2013 ted.goddard reload ajaxzone when local data is not passed, such as for camera (MOBI-827)
        Files Changed
        Commit graph MODIFY /icemobile/trunk/icemobile/samples/jsp/icemobilespring/src/main/webapp/resources/icemobilespring.js
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #36661 Thu Jul 11 17:28:29 MDT 2013 ted.goddard use common function getDeviceCommand, ICEmobile-SX hash fragment communication now active (MOBI-827)
        Files Changed
        Commit graph MODIFY /icemobile/trunk/icemobile/jsp/src/main/javascript/icemobile.js
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #36662 Thu Jul 11 17:31:09 MDT 2013 ted.goddard reset hash fragment to allow repeated values from ICEmobile-SX (MOBI-827)
        Files Changed
        Commit graph MODIFY /icemobile/trunk/icemobile/jsf/components/component/resources/org.icefaces.component.util/component.js
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #37012 Thu Jul 18 10:00:49 MDT 2013 ted.goddard renaming older jqery mobile camera sample to prepare for updated version (MOBI-827)
        Files Changed
        Commit graph ADD /icemobile/trunk/icemobile/samples/jsp/icemobilespring/src/main/webapp/resources/jqcamera.html
        Commit graph MODIFY /icemobile/trunk/icemobile/samples/jsp/icemobilespring/src/main/webapp/resources/scan.html
        Commit graph DEL /icemobile/trunk/icemobile/samples/jsp/icemobilespring/src/main/webapp/resources/camera.html
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #37024 Thu Jul 18 15:43:53 MDT 2013 ted.goddard camera example using server response via URL for image upload (MOBI-827)
        Files Changed
        Commit graph ADD /icemobile/trunk/icemobile/samples/jsp/icemobilespring/src/main/webapp/resources/camera.html
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #37025 Thu Jul 18 15:44:50 MDT 2013 ted.goddard jackson libraries to allow JSON responses (MOBI-827)
        Files Changed
        Commit graph ADD /icemobile/trunk/icemobile/samples/jsp/icemobilespring/src/main/webapp/WEB-INF/lib/jackson-core-asl-1.8.1.jar
        Commit graph ADD /icemobile/trunk/icemobile/samples/jsp/icemobilespring/src/main/webapp/WEB-INF/lib/jackson-mapper-asl-1.8.1.jar
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #37026 Thu Jul 18 15:49:21 MDT 2013 ted.goddard include response body in reload URL if small (MOBI-827)
        Files Changed
        Commit graph MODIFY /icemobile/trunk/icemobile/client/ios/icemobile/ICEmobile-SX/ViewController.m
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #37027 Thu Jul 18 15:51:10 MDT 2013 ted.goddard controller method for accepting image uploads outside of a session (MOBI-827)
        Files Changed
        Commit graph MODIFY /icemobile/trunk/icemobile/samples/jsp/icemobilespring/src/main/java/org/icemobile/samples/spring/controllers/CameraController.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #37031 Thu Jul 18 17:17:59 MDT 2013 ted.goddard refresh page if response does not contain local data (MOBI-827)
        Files Changed
        Commit graph MODIFY /icemobile/trunk/icemobile/jsp/src/main/javascript/icemobile.js
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #37032 Thu Jul 18 17:19:04 MDT 2013 ted.goddard refresh page if response does not contain local data (MOBI-827)
        Files Changed
        Commit graph MODIFY /icemobile/trunk/icemobile/jsf/components/component/resources/org.icefaces.component.util/component.js
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #37034 Fri Jul 19 14:31:51 MDT 2013 ted.goddard included serialized form with device commands (MOBI-827)
        Files Changed
        Commit graph MODIFY /icemobile/trunk/icemobile/jsp/src/main/javascript/icemobile.js
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #37035 Fri Jul 19 14:33:47 MDT 2013 ted.goddard removed cache setting on jquery.load() since it is misinterpreted as upload data and is causing a POST (MOBI-827)
        Files Changed
        Commit graph MODIFY /icemobile/trunk/icemobile/samples/jsp/icemobilespring/src/main/webapp/resources/icemobilespring.js
        Hide
        Ted Goddard added a comment -

        The ice.mobi.camera still requires an absolute URL, but this is being computed:

        onclick="ice.mobi.camera('_cam',handleCam,

        {postURL:(''+window.location).match(/.*\//) + '../html5cam/'}

        );"

        It would make sense for postURL to be processed for certain patterns: if starting with "." or "/", would be converted to host/URL or relative URL with all others being passed through unchanged. ICEmobile-SX could also work with a relative URL based on the other URLs passed to it, such as the return URL.

        Show
        Ted Goddard added a comment - The ice.mobi.camera still requires an absolute URL, but this is being computed: onclick="ice.mobi.camera('_cam',handleCam, {postURL:(''+window.location).match(/.*\//) + '../html5cam/'} );" It would make sense for postURL to be processed for certain patterns: if starting with "." or "/", would be converted to host/URL or relative URL with all others being passed through unchanged. ICEmobile-SX could also work with a relative URL based on the other URLs passed to it, such as the return URL.
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #37036 Fri Jul 19 15:05:33 MDT 2013 ted.goddard dynamically determine POST URL from HTML page (MOBI-827)
        Files Changed
        Commit graph MODIFY /icemobile/trunk/icemobile/samples/jsp/icemobilespring/src/main/webapp/resources/camera.html
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #37037 Fri Jul 19 17:00:39 MDT 2013 ted.goddard including aug and geospy for JavaScript invocation (MOBI-827)
        Files Changed
        Commit graph MODIFY /icemobile/trunk/icemobile/jsp/src/main/javascript/icemobile.js
        Hide
        Ted Goddard added a comment -

        The invocation URL will be changed to "icemobile:" from "icemobile://" to conform to the URL spec and avoid complications with URL parsing on BB10. "When
        authority is not present, the path cannot begin with two slash
        characters ("//")." http://tools.ietf.org/html/rfc3986#section-3

        Show
        Ted Goddard added a comment - The invocation URL will be changed to "icemobile:" from "icemobile://" to conform to the URL spec and avoid complications with URL parsing on BB10. "When authority is not present, the path cannot begin with two slash characters ("//")." http://tools.ietf.org/html/rfc3986#section-3
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #37310 Tue Aug 06 14:56:07 MDT 2013 ted.goddard remove double slash from icemobile: command URLs (MOBI-827)
        Files Changed
        Commit graph MODIFY /icemobile/trunk/icemobile/jsf/components/tests/mobitest/src/main/webapp/container/camcorderAuxUpload.xhtml
        Commit graph MODIFY /icemobile/trunk/icemobile/jsp/src/main/javascript/icemobile.js
        Commit graph MODIFY /icemobile/trunk/icemobile/client/ios/icemobile/ICEmobile-SX/AppDelegate.m
        Commit graph MODIFY /icemobile/trunk/icemobile/samples/jsp/icemobilespring/src/main/webapp/resources/calgary-gmap.html
        Commit graph MODIFY /icemobile/trunk/icemobile/core/src/main/java/org/icemobile/util/SXUtils.java
        Commit graph MODIFY /icemobile/trunk/icemobile/samples/jsp/icemobilespring/src/main/webapp/resources/aug.html
        Commit graph MODIFY /icemobile/trunk/icemobile/samples/jsp/icemobilespring/src/main/webapp/resources/calgary.html
        Commit graph MODIFY /icemobile/trunk/icemobile/jsf/components/tests/mobitest/src/main/webapp/container/qrAuxUpload.xhtml
        Commit graph MODIFY /icemobile/trunk/icemobile/jsf/components/tests/mobitest/src/main/webapp/container/micAuxUpload.xhtml
        Commit graph MODIFY /icemobile/trunk/icemobile/client/android/sxcore/src/org/icemobile/client/android/sxcore/SxCore.java
        Commit graph MODIFY /icemobile/trunk/icemobile/jsf/components/component/resources/org.icefaces.component.util/component.js
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #37324 Wed Aug 07 09:55:01 MDT 2013 ted.goddard thumbnail added to local browser response (MOBI-827)
        Files Changed
        Commit graph MODIFY /icemobile/trunk/icemobile/client/ios/icemobile/ICEmobile-SX/ViewController.m
        Commit graph MODIFY /icemobile/trunk/icemobile/client/ios/icemobile/ICEmobile-SX/ViewController.h
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #37325 Wed Aug 07 10:36:11 MDT 2013 ted.goddard thumbnail support for local browser response (MOBI-827)
        Files Changed
        Commit graph MODIFY /icemobile/trunk/icemobile/jsp/src/main/javascript/icemobile.js
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #37326 Wed Aug 07 10:36:19 MDT 2013 ted.goddard thumbnail support for local browser response (MOBI-827)
        Files Changed
        Commit graph MODIFY /icemobile/trunk/icemobile/samples/jsp/icemobilespring/src/main/webapp/resources/camera.html
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #37345 Thu Aug 08 16:06:21 MDT 2013 ted.goddard update map markers using ice.ajaxRefresh (MOBI-827)
        Files Changed
        Commit graph MODIFY /icemobile/trunk/icemobile/samples/jsp/icemobilespring/src/main/webapp/resources/geospy.html
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #37348 Thu Aug 08 16:42:30 MDT 2013 ted.goddard push feature for the demo (MOBI-827)
        Files Changed
        Commit graph MODIFY /icemobile/trunk/icemobile/samples/jsp/icemobilespring/src/main/webapp/resources/geospy.html
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #37741 Fri Aug 30 13:18:42 MDT 2013 ted.goddard local communication for cloudPushId and associated demo (MOBI-827)
        Files Changed
        Commit graph MODIFY /icemobile/trunk/icemobile/jsp/src/main/javascript/icemobile.js
        Commit graph ADD /icemobile/trunk/icemobile/samples/jsp/icemobilespring/src/main/webapp/resources/cloudpush.html
        Commit graph MODIFY /icemobile/trunk/icemobile/samples/jsp/icemobilespring/src/main/java/org/icemobile/samples/spring/controllers/NotificationsController.java
        Hide
        Ted Goddard added a comment - - edited

        There are four reserved values currently returned from an ICEmobile-SX interaction:

        r: server response text
        p: preview/thumbnail of captured content (data-url)
        h: URL hash fragment to be restored
        c: cloudPushId

        (this is in addition to returned named parameters for the operation itself)

        Show
        Ted Goddard added a comment - - edited There are four reserved values currently returned from an ICEmobile-SX interaction: r: server response text p: preview/thumbnail of captured content (data-url) h: URL hash fragment to be restored c: cloudPushId (this is in addition to returned named parameters for the operation itself)
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #37742 Fri Aug 30 13:42:02 MDT 2013 ted.goddard improved supression of undefined bridgeit parameters, added support for returned cloudPushId, and defined bridgeit.register for cloud push registration (MOBI-827)
        Files Changed
        Commit graph MODIFY /icemobile/branches/icemobile-bridgeit-transition/icemobile/bridgeit/src/main/javascript/bridgeit.js
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #37744 Fri Aug 30 14:36:53 MDT 2013 ted.goddard (MOBI-827
        Files Changed
        Commit graph MODIFY /icemobile/trunk/icemobile/client/ios/icemobile/ICEmobile-SX/ViewController.m
        Commit graph MODIFY /icemobile/trunk/icemobile/client/ios/icemobile/Shared/NativeInterface.m
        Commit graph MODIFY /icemobile/trunk/icemobile/client/ios/icemobile/ICEmobile-SX/ViewController.h
        Hide
        Ted Goddard added a comment -

        Missing checkin comment on revision 37744 due to premature enter key:

        using self.receivedData for improved stability, allowing empty currentURL for future offline support, returning cloudPushId in local browser response (MOBI-827)

        Show
        Ted Goddard added a comment - Missing checkin comment on revision 37744 due to premature enter key: using self.receivedData for improved stability, allowing empty currentURL for future offline support, returning cloudPushId in local browser response ( MOBI-827 )
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #37749 Fri Aug 30 16:31:59 MDT 2013 ted.goddard candidate code using cloud-push-as-a-service (MOBI-827)
        Files Changed
        Commit graph MODIFY /icemobile/branches/icemobile-bridgeit-transition/icemobile/samples/html5/bridgeit/src/main/webapp/WEB-INF/includes/cloud-push.html
        Hide
        Ted Goddard added a comment -

        The bridgeit demo has been updated to make use of Cloud Push features, however a few aspects are not working:

        • propagation of the Cloud Push ID requires the change to ICEmobile-SX; this is checked in but not available in ICEmobile-SX 1.3
        • ice.push.notify(group, {subject:...,detail:...}

          ); is not yet available

        • to demo cloud push requires either two machines or a delay. It may be possible to send the push when the browser is hidden, or we may want to add a delay parameter to ice.push.notify()
        Show
        Ted Goddard added a comment - The bridgeit demo has been updated to make use of Cloud Push features, however a few aspects are not working: propagation of the Cloud Push ID requires the change to ICEmobile-SX; this is checked in but not available in ICEmobile-SX 1.3 ice.push.notify(group, {subject:...,detail:...} ); is not yet available to demo cloud push requires either two machines or a delay. It may be possible to send the push when the browser is hidden, or we may want to add a delay parameter to ice.push.notify()
        Hide
        Ted Goddard added a comment -

        The following icemobile functionality should likely be added to icepush.js:

        window.addEventListener("pagehide", function () {
        if (ice.push)

        { ice.push.connection.pauseConnection(); }

        }, false);

        window.addEventListener("pageshow", function () {
        if (ice.push)

        { ice.push.connection.resumeConnection(); }

        }, false);

        Show
        Ted Goddard added a comment - The following icemobile functionality should likely be added to icepush.js: window.addEventListener("pagehide", function () { if (ice.push) { ice.push.connection.pauseConnection(); } }, false); window.addEventListener("pageshow", function () { if (ice.push) { ice.push.connection.resumeConnection(); } }, false);
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #37750 Fri Aug 30 16:54:55 MDT 2013 ted.goddard candidate code using cloud-push-as-a-service upon pagehide (MOBI-827)
        Files Changed
        Commit graph MODIFY /icemobile/branches/icemobile-bridgeit-transition/icemobile/samples/html5/bridgeit/src/main/webapp/WEB-INF/includes/cloud-push.html
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #37765 Wed Sep 04 10:26:25 MDT 2013 ted.goddard allow URLs without hash fragments (MOBI-827)
        Files Changed
        Commit graph MODIFY /icemobile/branches/icemobile-bridgeit-transition/icemobile/bridgeit/src/main/javascript/bridgeit.js
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #37787 Thu Sep 05 10:48:15 MDT 2013 ted.goddard allow parameter objects rather as well as url-encoded lists for bridgeit device commands (MOBI-827)
        Files Changed
        Commit graph MODIFY /icemobile/branches/icemobile-bridgeit-transition/icemobile/bridgeit/src/main/javascript/bridgeit.js
        Commit graph MODIFY /icemobile/branches/icemobile-bridgeit-transition/icemobile/samples/html5/bridgeit/src/main/webapp/WEB-INF/includes/arlocations.html
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #37789 Thu Sep 05 12:04:21 MDT 2013 ted.goddard return name/value in devicecommand event for both hidden field and _name variant (MOBI-827)
        Files Changed
        Commit graph MODIFY /icemobile/branches/icemobile-bridgeit-transition/icemobile/samples/html5/bridgeit/src/main/webapp/WEB-INF/includes/scan.html
        Commit graph MODIFY /icemobile/branches/icemobile-bridgeit-transition/icemobile/bridgeit/src/main/javascript/bridgeit.js
        Hide
        Ted Goddard added a comment -

        For example, the following return URL sets the value of scanBtn to "My art ... keeps me sane.", restores the # hash fragment to _scan:

        http://tetra.ice:8080/bridgeit/mobile.html#icemobilesx_scanBtn=My%20art...%20keeps%20me%20sane.&!h=%23_scan

        Show
        Ted Goddard added a comment - For example, the following return URL sets the value of scanBtn to "My art ... keeps me sane.", restores the # hash fragment to _scan: http://tetra.ice:8080/bridgeit/mobile.html#icemobilesx_scanBtn=My%20art...%20keeps%20me%20sane.&!h=%23_scan
        Show
        Ted Goddard added a comment - Example camera response: http://tetra.ice:8080/bridgeit/mobile.html#icemobilesx_!r=%5B%22icemobile-store/a86016c5-6c06-4b5a-ae4e-75557c5c0dac%22%5D&!p=data:image/jpg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/4QBYRXhpZgAATU0AKgAAAAgAAgESAAMAAAABAAEAAIdpAAQAAAABAAAAJgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAQKADAAQAAAABAAAAQAAAAAD/2wBDAAYEBQYFBAYGBQYHBwYIChAKCgkJChQODwwQFxQYGBcUFhYaHSUfGhsjHBYWICwgIyYnKSopGR8tMC0oMCUoKSj/2wBDAQcHBwoIChMKChMoGhYaKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCj/wAARCABAAEADASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwC3aH/R4v8AcH8qtoao2h/0eL/cH8qtI1USWkNWENU0NWIzTAuxmrMZqjGatRmmIuoaso1UozVhDVIDz+0P+jxf7g/lVpGqjat+4i/3B/KrCtWQ2XEarEbVSRqsRtTEX42qzGaoxtVqJqYi8hqdDVRGqdGqkM8+tW/cRf7o/lVlWqlan9xF/uj+VWFNZDZbRqsxtVJDViNqYi9GatxmqEbVajamKxejNWENUo2qyhqkVY8+tj+4i/3R/KrCGqdsf3Ef
        Show
        Ted Goddard added a comment - Sample Augmented Reality response: http://tetra.ice:8080/bridgeit/mobile.html#icemobilesx_!r=%7B%22_loc%22:%5B%22Aug312%22%5D%7D&!h=%23_ar
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #37805 Thu Sep 05 16:40:13 MDT 2013 ted.goddard unpack multiple values from devicecommand response (MOBI-827)
        Files Changed
        Commit graph MODIFY /icemobile/trunk/icemobile/jsf/components/component/resources/org.icefaces.component.util/component.js
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #37806 Thu Sep 05 16:44:45 MDT 2013 ted.goddard unpack multiple values from devicecommand response (MOBI-827)
        Files Changed
        Commit graph MODIFY /icemobile/branches/icemobile-bridgeit-transition/icemobile/jsf/components/component/resources/org.icefaces.component.util/component.js
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #37807 Thu Sep 05 16:48:59 MDT 2013 ted.goddard remove // from command portion of url (MOBI-827)
        Files Changed
        Commit graph MODIFY /icemobile/trunk/icemobile/client/ios/icemobile/ICEmobile-SX/AppDelegate.m
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #37808 Thu Sep 05 16:53:43 MDT 2013 ted.goddard avoid recursion in handleResponse/completePost (MOBI-827)
        Files Changed
        Commit graph MODIFY /icemobile/trunk/icemobile/client/ios/icemobile/ICEmobile-SX/ViewController.m
        Commit graph MODIFY /icemobile/trunk/icemobile/client/ios/icemobile/ICEmobile-SX/ViewController.h
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #37818 Mon Sep 09 12:08:41 MDT 2013 ted.goddard catch malformed upload URLs (MOBI-827)
        Files Changed
        Commit graph MODIFY /icemobile/trunk/icemobile/client/ios/icemobile/ICEmobile-SX/ViewController.m
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #37819 Mon Sep 09 12:14:26 MDT 2013 ted.goddard ensure upload URL is valid and includes http:// (MOBI-827)
        Files Changed
        Commit graph MODIFY /icemobile/branches/icemobile-bridgeit-transition/icemobile/samples/html5/bridgeit/src/main/webapp/javascript/bridgeit-demos.js
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #37821 Mon Sep 09 14:42:19 MDT 2013 ted.goddard allow address book invocation over local browser URL (MOBI-827)
        Files Changed
        Commit graph MODIFY /icemobile/trunk/icemobile/client/ios/icemobile/ICEmobile-SX/ViewController.m
        Commit graph MODIFY /icemobile/trunk/icemobile/client/ios/icemobile/Shared/NativeInterface.m
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #37823 Mon Sep 09 15:42:35 MDT 2013 ted.goddard display contact obtained via local URL mechanism (MOBI-827)
        Files Changed
        Commit graph MODIFY /icemobile/branches/icemobile-bridgeit-transition/icemobile/samples/html5/bridgeit/src/main/webapp/WEB-INF/includes/contact-list.html
        Commit graph MODIFY /icemobile/branches/icemobile-bridgeit-transition/icemobile/bridgeit/src/main/javascript/bridgeit.js
        Hide
        Ted Goddard added a comment -

        Issue filed with iUI and change checked in locallyL

        http://code.google.com/p/iui/issues/detail?id=355

        — samples/html5/bridgeit/src/main/webapp/iui/iui.js (revision 37818)
        +++ samples/html5/bridgeit/src/main/webapp/iui/iui.js (working copy)
        @@ -172,7 +172,10 @@
        nodeId = view;
        node = $(nodeId);
        }

        • if (!node) log("gotoView: node is null");
          + if (!node) { + log("gotoView: node is null"); + return false; + }

          if (!iui.busy)
          {
          iui.busy = true;

        This appears to fix navigation within the BridgeIt demo, but may have other side effects.

        Show
        Ted Goddard added a comment - Issue filed with iUI and change checked in locallyL http://code.google.com/p/iui/issues/detail?id=355 — samples/html5/bridgeit/src/main/webapp/iui/iui.js (revision 37818) +++ samples/html5/bridgeit/src/main/webapp/iui/iui.js (working copy) @@ -172,7 +172,10 @@ nodeId = view; node = $(nodeId); } if (!node) log("gotoView: node is null"); + if (!node) { + log("gotoView: node is null"); + return false; + } if (!iui.busy) { iui.busy = true; This appears to fix navigation within the BridgeIt demo, but may have other side effects.
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #37825 Mon Sep 09 17:22:49 MDT 2013 ted.goddard iUI should not remain busy after deviceCommand (MOBI-827)
        Files Changed
        Commit graph MODIFY /icemobile/branches/icemobile-bridgeit-transition/icemobile/samples/html5/bridgeit/src/main/webapp/iui/iui.js
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #37833 Tue Sep 10 12:25:22 MDT 2013 ted.goddard echo hashcode without changes (MOBI-827)
        Files Changed
        Commit graph MODIFY /icemobile/trunk/icemobile/client/android/sxcore/src/org/icemobile/client/android/sxcore/SxCore.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #37835 Tue Sep 10 13:31:49 MDT 2013 ted.goddard global callback for android (MOBI-827)
        Files Changed
        Commit graph MODIFY /icemobile/branches/icemobile-bridgeit-transition/icemobile/samples/html5/bridgeit/src/main/webapp/WEB-INF/includes/camera.html
        Commit graph MODIFY /icemobile/branches/icemobile-bridgeit-transition/icemobile/bridgeit/src/main/javascript/bridgeit.js
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #37840 Tue Sep 10 15:47:15 MDT 2013 ted.goddard moving init javascript to top to allow android to function on page refresh (MOBI-827)
        Files Changed
        Commit graph MODIFY /icemobile/branches/icemobile-bridgeit-transition/icemobile/samples/html5/bridgeit/src/main/webapp/WEB-INF/includes/mobile.html
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #37841 Tue Sep 10 15:48:10 MDT 2013 ted.goddard preserve full contents of HTTP response for deviceCommand upload (MOBI-827)
        Files Changed
        Commit graph MODIFY /icemobile/trunk/icemobile/client/android/sxcore/src/org/icemobile/client/android/sxcore/SxCore.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #37842 Tue Sep 10 15:50:19 MDT 2013 ted.goddard do not attempt to detect ICEmobile-SX launch on android (MOBI-827)
        Files Changed
        Commit graph MODIFY /icemobile/branches/icemobile-bridgeit-transition/icemobile/bridgeit/src/main/javascript/bridgeit.js
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #37845 Tue Sep 10 17:16:23 MDT 2013 steve.maryka mobi-827: scan codes implemented.
        Files Changed
        Commit graph MODIFY /icemobile/trunk/icemobile/client/android/sxcore/src/org/icemobile/client/android/sxcore/SxCore.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #37852 Wed Sep 11 12:56:14 MDT 2013 steve.maryka mobi-827: Contact list support added.
        Files Changed
        Commit graph MODIFY /icemobile/trunk/icemobile/client/android/integration/contacts/src/org/icemobile/client/android/contacts/ContactListInterface.java
        Commit graph MODIFY /icemobile/trunk/icemobile/client/android/sxcore/src/org/icemobile/client/android/sxcore/SxCore.java
        Hide
        Ted Goddard added a comment -

        Android Chrome loads the device return URL as a new document rather than a #fragment navigation within the existing document (iOS behaviour). This means that JavaScript callbacks registered with the deviceCommand invocation are lost when the page is reloaded.

        Alternatives:

        global callback function that switches based on name of input field.

        bridgeit.addEventListener("load", callback)

        where callback is constructed each time the page is loaded will work in many cases, but may be unpredictable due to missing data from user input or other cases. Ultimately we want to encourage a stateless programming model that makes use of local storage.

        Show
        Ted Goddard added a comment - Android Chrome loads the device return URL as a new document rather than a #fragment navigation within the existing document (iOS behaviour). This means that JavaScript callbacks registered with the deviceCommand invocation are lost when the page is reloaded. Alternatives: global callback function that switches based on name of input field. bridgeit.addEventListener("load", callback) where callback is constructed each time the page is loaded will work in many cases, but may be unpredictable due to missing data from user input or other cases. Ultimately we want to encourage a stateless programming model that makes use of local storage.
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #37873 Thu Sep 12 17:18:37 MDT 2013 ted.goddard escape preview and return hash (MOBI-827)
        Files Changed
        Commit graph MODIFY /icemobile/trunk/icemobile/client/android/sxcore/src/org/icemobile/client/android/sxcore/SxCore.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #37874 Thu Sep 12 17:33:39 MDT 2013 ted.goddard support for named callbacks rather than function instances (MOBI-827)
        Files Changed
        Commit graph MODIFY /icemobile/branches/icemobile-bridgeit-transition/icemobile/samples/html5/bridgeit/src/main/webapp/WEB-INF/includes/scan.html
        Commit graph MODIFY /icemobile/branches/icemobile-bridgeit-transition/icemobile/samples/html5/bridgeit/src/main/webapp/WEB-INF/includes/camera.html
        Commit graph MODIFY /icemobile/branches/icemobile-bridgeit-transition/icemobile/bridgeit/src/main/javascript/bridgeit.js
        Hide
        Ted Goddard added a comment -

        iUI was causing some complication on android: during the page load process, iUI will replace the hashcode after a delay. The variability of this delay could interrupt the processing of the deviceCommand #fragment response.

        Show
        Ted Goddard added a comment - iUI was causing some complication on android: during the page load process, iUI will replace the hashcode after a delay. The variability of this delay could interrupt the processing of the deviceCommand #fragment response.
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #37881 Fri Sep 13 17:09:12 MDT 2013 ted.goddard wait until onload so that android callbacks are ready (MOBI-827)
        Files Changed
        Commit graph MODIFY /icemobile/branches/icemobile-bridgeit-transition/icemobile/bridgeit/src/main/javascript/bridgeit.js
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #38040 Mon Sep 16 14:29:27 MDT 2013 ted.goddard excape ampersands in hash echo reponse (MOBI-827)
        Files Changed
        Commit graph MODIFY /icemobile/trunk/icemobile/client/ios/icemobile/ICEmobile-SX/ViewController.m
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #38049 Mon Sep 16 17:08:47 MDT 2013 ted.goddard restored register function (MOBI-827)
        Files Changed
        Commit graph MODIFY /icemobile/branches/icemobile-bridgeit-transition/icemobile/bridgeit/src/main/javascript/bridgeit.js
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #38216 Tue Sep 17 16:27:07 MDT 2013 ted.goddard support return value from selected AR icon and initialize CookieSyncManager to allow icon downloads without webview (MOBI-827)
        Files Changed
        Commit graph MODIFY /icemobile/trunk/icemobile/client/android/sxcore/src/org/icemobile/client/android/sxcore/SxCore.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #38217 Tue Sep 17 16:32:52 MDT 2013 ted.goddard detect selected AR icon (MOBI-827)
        Files Changed
        Commit graph MODIFY /icemobile/trunk/icemobile/client/android/integration/arview/src/org/icemobile/client/android/arview/ARView.java
        Commit graph MODIFY /icemobile/trunk/icemobile/client/android/integration/arview/src/org/icemobile/client/android/arview/ARViewActivity.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #38218 Tue Sep 17 16:54:28 MDT 2013 ted.goddard restored icon label (MOBI-827)
        Files Changed
        Commit graph MODIFY /icemobile/trunk/icemobile/client/android/integration/arview/src/org/icemobile/client/android/arview/ARView.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #38219 Tue Sep 17 17:12:27 MDT 2013 ted.goddard calculate rotated origin for touch points (MOBI-827)
        Files Changed
        Commit graph MODIFY /icemobile/trunk/icemobile/client/android/integration/arview/src/org/icemobile/client/android/arview/ARView.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #38239 Thu Sep 19 15:13:45 MDT 2013 steve.maryka mobi-827: Added cloud registration support. !c parameter returned on any sx call when cloud credentials are available.
        Files Changed
        Commit graph MODIFY /icemobile/trunk/icemobile/client/android/bridgeit/AndroidManifest.xml
        Commit graph MODIFY /icemobile/trunk/icemobile/client/android/sxcore/src/org/icemobile/client/android/sxcore/SxCore.java
        Hide
        Steve Maryka added a comment -

        Android protocol changes complete. snv 38239.

        Cloud registration returned on any call to sx, provided that the credentials are available.

        Show
        Steve Maryka added a comment - Android protocol changes complete. snv 38239. Cloud registration returned on any call to sx, provided that the credentials are available.
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #38255 Fri Sep 20 16:29:41 MDT 2013 ted.goddard geoJSON for geoSpy (MOBI-827)
        Files Changed
        Commit graph MODIFY /icemobile/trunk/icemobile/client/ios/icemobile/Shared/NativeInterfaceViewController.h
        Commit graph MODIFY /icemobile/trunk/icemobile/client/ios/icemobile/Shared/NativeInterface.m
        Commit graph MODIFY /icemobile/trunk/icemobile/client/ios/icemobile/Shared/NativeInterface.h
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #38264 Mon Sep 23 16:43:37 MDT 2013 ted.goddard immediate return to browser and properties for geoSpy, and improved error alerts (MOBI-827)
        Files Changed
        Commit graph MODIFY /icemobile/trunk/icemobile/client/ios/icemobile/ICEmobile-SX/ViewController.m
        Commit graph MODIFY /icemobile/trunk/icemobile/client/ios/icemobile/Shared/NativeInterfaceViewController.h
        Commit graph MODIFY /icemobile/trunk/icemobile/client/ios/icemobile/Shared/NativeInterface.m
        Commit graph MODIFY /icemobile/trunk/icemobile/client/ios/icemobile/Shared/NativeInterface.h
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #38275 Tue Sep 24 16:08:43 MDT 2013 steve.maryka mobi-827: fixed registration logic. new icons and splash screen. proguard.cfg supports release build.
        Files Changed
        Commit graph MODIFY /icemobile/trunk/icemobile/client/android/bridgeit/res/drawable-ldpi/icon.png
        Commit graph MODIFY /icemobile/trunk/icemobile/client/android/bridgeit/res/drawable-ldpi/background.png
        Commit graph MODIFY /icemobile/trunk/icemobile/client/android/bridgeit/res/drawable-hdpi/icon.png
        Commit graph MODIFY /icemobile/trunk/icemobile/client/android/sxcore/src/org/icemobile/client/android/sxcore/SxCore.java
        Commit graph MODIFY /icemobile/trunk/icemobile/client/android/bridgeit/res/drawable-hdpi/background.png
        Commit graph ADD /icemobile/trunk/icemobile/client/android/bridgeit/proguard.cfg
        Commit graph MODIFY /icemobile/trunk/icemobile/client/android/bridgeit/res/drawable-mdpi/icon.png
        Commit graph MODIFY /icemobile/trunk/icemobile/client/android/bridgeit/res/drawable-mdpi/background.png
        Hide
        Ted Goddard added a comment -

        The CloudPushId is now maintained in local storage so that it is preserved on a page reload. This should be considered for an ICEpush feature rather than being implemented in bridgeit.js.

        Show
        Ted Goddard added a comment - The CloudPushId is now maintained in local storage so that it is preserved on a page reload. This should be considered for an ICEpush feature rather than being implemented in bridgeit.js.
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #38316 Mon Sep 30 13:29:17 MDT 2013 ted.goddard persistent cloud push ID in local storage (MOBI-827)
        Files Changed
        Commit graph MODIFY /icemobile/branches/icemobile-bridgeit-transition/icemobile/bridgeit/src/main/javascript/bridgeit.js
        Hide
        Steve Maryka added a comment -

        To support error code returns the URI syntax will be extended to include the following addition reserve words.

        !s=done|fail|wait
        !sd=status detail message

        It will be necessary for the JavaScript layer to process these additional parameters.

        Show
        Steve Maryka added a comment - To support error code returns the URI syntax will be extended to include the following addition reserve words. !s=done|fail|wait !sd=status detail message It will be necessary for the JavaScript layer to process these additional parameters.
        Hide
        Steve Maryka added a comment -

        Android now supports the return status !s= and !sd= parameters. svn 35848.

        Show
        Steve Maryka added a comment - Android now supports the return status !s= and !sd= parameters. svn 35848.
        Hide
        Ted Goddard added a comment - - edited

        Summary of current protocol parameters in the URL:

        Request from the browser to BridgeIt:

        c: command name with parameters
        u: URL to POST command data
        r: URL to return to in the browser
        p: parameters for POST to server
        o: options affecting overall request processing
        s: splash screen parameters
        h: echo value

        Response from BridgeIt to the browser:

        <id> : result of command associated with id
        !r: server response text
        !p: preview/thumbnail of captured content (data-url)
        !h: echo value of h request parameter
        !c: cloud push ID
        !s: status code
        !sd: status detail

        If request options contains enc=base64, the entire response URL should be encoded as #icemobilesx_<data> where <data> is in Base64 format with "." in place of "/" and "~" in place of "=".

        Show
        Ted Goddard added a comment - - edited Summary of current protocol parameters in the URL: Request from the browser to BridgeIt: c: command name with parameters u: URL to POST command data r: URL to return to in the browser p: parameters for POST to server o: options affecting overall request processing s: splash screen parameters h: echo value Response from BridgeIt to the browser: <id> : result of command associated with id !r: server response text !p: preview/thumbnail of captured content (data-url) !h: echo value of h request parameter !c: cloud push ID !s: status code !sd: status detail If request options contains enc=base64, the entire response URL should be encoded as #icemobilesx_<data> where <data> is in Base64 format with "." in place of "/" and "~" in place of "=".
        Hide
        Ted Goddard added a comment -

        Enhancements are complete.

        Show
        Ted Goddard added a comment - Enhancements are complete.
        Ted Goddard made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]

          People

          • Assignee:
            Ted Goddard
            Reporter:
            Ted Goddard
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: