ICEmobile
  1. ICEmobile
  2. MOBI-869

Restore URL hash fragment when returning from ICEmobile-SX

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: BridgeIt 1.0
    • Fix Version/s: BridgeIt 1.0
    • Component/s: Containers
    • Labels:
      None
    • Environment:
      HTML5, BridgeIt

      Description

      When ICEmobile-SX/BridgeIt returns control to the browser, the URL fragment previously in place must be restored. For instance, if the user is on the page

      http://host.com/myapp.html#camera

      the same URL (including #camera) must be set.

        Activity

        Ted Goddard created issue -
        Hide
        Ted Goddard added a comment -

        The difficulty arises because ICEmobile-SX also uses the #fragment for returning values to the browser. This is implemented by passing a parameter "h" containing the hash fragment to be restored to ICEmobile-SX and having ICEmobile-SX echo this parameter in the URL response as a value for "!h".

        Show
        Ted Goddard added a comment - The difficulty arises because ICEmobile-SX also uses the #fragment for returning values to the browser. This is implemented by passing a parameter "h" containing the hash fragment to be restored to ICEmobile-SX and having ICEmobile-SX echo this parameter in the URL response as a value for "!h".
        Hide
        Ted Goddard added a comment -

        Implementation for Android is simply to extract "h" from the parameters, store it, and echo back as "!h" if set.

        Show
        Ted Goddard added a comment - Implementation for Android is simply to extract "h" from the parameters, store it, and echo back as "!h" if set.
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #37449 Tue Aug 20 10:27:32 MDT 2013 ted.goddard detect h parameter and echo as exclamation h (MOBI-869)
        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/AppDelegate.m
        Commit graph MODIFY /icemobile/trunk/icemobile/client/ios/icemobile/ICEmobile-SX/ViewController.h
        Hide
        Ted Goddard added a comment -

        As an intermediate implementation choice, the previous hash fragment was to be appended to #icemobilesx as #icemobilesx_encodedfragment_, however this still required changes to the ICEmobile-SX app, so an explicit parameter is being used instead.
        This would have required escaping underscores within the encoded fragment as follows:

        function underscoreEscape(str)

        { str = escape(str); str = str.replace(/_/g, '%5F'); return str; }
        Show
        Ted Goddard added a comment - As an intermediate implementation choice, the previous hash fragment was to be appended to #icemobilesx as #icemobilesx_encodedfragment_, however this still required changes to the ICEmobile-SX app, so an explicit parameter is being used instead. This would have required escaping underscores within the encoded fragment as follows: function underscoreEscape(str) { str = escape(str); str = str.replace(/_/g, '%5F'); return str; }
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #37450 Tue Aug 20 10:40:28 MDT 2013 ted.goddard restore previous hash fragment if provided (MOBI-869)
        Files Changed
        Commit graph MODIFY /icemobile/trunk/icemobile/bridgeit/src/main/javascript/bridgeit.js
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #37455 Tue Aug 20 13:38:56 MDT 2013 ted.goddard apply image thumbnail if provided (MOBI-869)
        Files Changed
        Commit graph MODIFY /icemobile/trunk/icemobile/samples/html5/bridgeit-showcase/src/main/webapp/WEB-INF/includes/camera.html
        Ted Goddard made changes -
        Field Original Value New Value
        Assignee Steve Maryka [ steve.maryka ] Ted Goddard [ ted.goddard ]
        Ted Goddard made changes -
        Fix Version/s Bridge-it 1.0 [ 11172 ]
        Hide
        Ted Goddard added a comment -

        Fragment is restored, however the application developer must be aware that BridgeIt commands are recorded in the browser history and can be replayed with JavaScript history APIs.

        Show
        Ted Goddard added a comment - Fragment is restored, however the application developer must be aware that BridgeIt commands are recorded in the browser history and can be replayed with JavaScript history APIs.
        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:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: