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

        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);
        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); }
        Hide
        Ted Goddard added a comment -

        Verified fixed.

        Show
        Ted Goddard added a comment - Verified fixed.

          People

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

            Dates

            • Created:
              Updated:
              Resolved: