ICEmobile
  1. ICEmobile
  2. MOBI-781

ICEmobile-SX on android creates multiple tabs

    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: JSP, Spring
    • Labels:
      None
    • Environment:
      ICEmobile, Android Chrome

      Description

      When using ICEmobile-SX on Android, multiple tabs may appear in the browser. This is most easily reproduced in icemobilespring. On the camera page, if the text field "name" is left blank, an extra tab is not created, but if a name is filled in, the extra tab will appear upon return from ICEmobile-SX.

        Activity

        Ted Goddard created issue -
        Ted Goddard made changes -
        Field Original Value New Value
        Assignee Judy Guglielmin [ judy.guglielmin ] Ted Goddard [ ted.goddard ]
        Ted Goddard made changes -
        Fix Version/s 1.4 Beta [ 10874 ]
        Hide
        Ted Goddard added a comment -

        Additional strategies for ICEmobile-SX need to be investigated. For instance, Chrome is likely attempting to ensure that user submitted data isn't lost. To handle this, it may be possible for ICEmobile-SX components to trigger a form submit to the server, then cause the ICEmobile-SX action to occur from the returned page.

        (The disadvantage of this is that it will not work offline.)

        Show
        Ted Goddard added a comment - Additional strategies for ICEmobile-SX need to be investigated. For instance, Chrome is likely attempting to ensure that user submitted data isn't lost. To handle this, it may be possible for ICEmobile-SX components to trigger a form submit to the server, then cause the ICEmobile-SX action to occur from the returned page. (The disadvantage of this is that it will not work offline.)
        Hide
        Ted Goddard added a comment -

        Placing the input text outside the form also results in the creation of a new tab.

        Show
        Ted Goddard added a comment - Placing the input text outside the form also results in the creation of a new tab.
        Hide
        Ted Goddard added a comment -

        Setting image dimensions in mobileshowcase also results in a new tab being created. This means that an ajax update to the form does not convince Chrome that the user data on the page has been submitted.

        Show
        Ted Goddard added a comment - Setting image dimensions in mobileshowcase also results in a new tab being created. This means that an ajax update to the form does not convince Chrome that the user data on the page has been submitted.
        Hide
        Ted Goddard added a comment -

        As advised by stack overflow for ICS versions of Android, the following was tried, but did not help:

        browserIntent.setFlags(Intent.FLAG_FROM_BACKGROUND | Intent.FLAG_ACTIVITY_REORDER_TO_FRONT | Intent.FLAG_ACTIVITY_NEW_TASK);

        Show
        Ted Goddard added a comment - As advised by stack overflow for ICS versions of Android, the following was tried, but did not help: browserIntent.setFlags(Intent.FLAG_FROM_BACKGROUND | Intent.FLAG_ACTIVITY_REORDER_TO_FRONT | Intent.FLAG_ACTIVITY_NEW_TASK);
        Steve Maryka made changes -
        Fix Version/s Bridge-it 1.0 [ 11172 ]
        Fix Version/s 1.4 Beta [ 10874 ]
        Hide
        Steve Maryka added a comment -

        The solution attempted above was actually for the stock android browser, not Chrome. I have done some additional googling, but have not unearthed any new findings. I searched the chromium project source code as well, but could not find any intent processing logic related to creation of new tabs. I don't thing the production activity lives in the open source, as I could only find test shell activities.

        We should enter an issue with the chromium project.

        https://code.google.com/p/chromium/issues

        Show
        Steve Maryka added a comment - The solution attempted above was actually for the stock android browser, not Chrome. I have done some additional googling, but have not unearthed any new findings. I searched the chromium project source code as well, but could not find any intent processing logic related to creation of new tabs. I don't thing the production activity lives in the open source, as I could only find test shell activities. We should enter an issue with the chromium project. https://code.google.com/p/chromium/issues
        Hide
        Ted Goddard added a comment -
        Show
        Ted Goddard added a comment - Issue reported: https://code.google.com/p/chromium/issues/detail?id=262242
        Hide
        Steve Maryka added a comment - - edited

        svn 38248: The following code works on Chrome and Android stock browser to eliminate extra tabs and page reloads. It does not work for Firefox (known issue).

        final ResolveInfo res = getPackageManager().resolveActivity(browserIntent,PackageManager.MATCH_DEFAULT_ONLY);
        if (res.activityInfo != null)

        { Log.d(LOG_TAG,"defaultPackage: "+res.activityInfo.packageName); String browserPackageName = res.activityInfo.packageName; browserIntent.putExtra( Browser.EXTRA_APPLICATION_ID, browserPackageName); }
        Show
        Steve Maryka added a comment - - edited svn 38248: The following code works on Chrome and Android stock browser to eliminate extra tabs and page reloads. It does not work for Firefox (known issue). final ResolveInfo res = getPackageManager().resolveActivity(browserIntent,PackageManager.MATCH_DEFAULT_ONLY); if (res.activityInfo != null) { Log.d(LOG_TAG,"defaultPackage: "+res.activityInfo.packageName); String browserPackageName = res.activityInfo.packageName; browserIntent.putExtra( Browser.EXTRA_APPLICATION_ID, browserPackageName); }
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #38248 Fri Sep 20 14:13:47 MDT 2013 steve.maryka mobi-781: Changed value in intent to match browser package. BridgeIt examples no longer create new tabs, or cause a full page reload.
        Files Changed
        Commit graph MODIFY /icemobile/trunk/icemobile/client/android/sxcore/src/org/icemobile/client/android/sxcore/SxCore.java
        Hide
        Ted Goddard added a comment -

        Verified fixed.

        Show
        Ted Goddard added a comment - Verified fixed.
        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: