ICEpush
  1. ICEpush
  2. PUSH-397

Provide a way for web apps to prompt users to enable cloud push as necessary

    Details

    • Type: New Feature New Feature
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: EE-4.0.0.GA
    • Fix Version/s: EE-4.2.0.GA
    • Component/s: Push Server
    • Labels:
      None
    • Environment:
      supported browsers

      Description

      Provide a way for web apps to prompt users to enable cloud push as necessary. This can be flexibly achieved by providing a registration function for callbacks that are invoked when the device ID (AKA notify-back-URI) is missing from the local storage but the bridgeit functionality is present.

      To enable cloud push notifications the callback implementation will switch to BridgeIt to retrieve the deviceID and then returns, the DeviceID is stored in the browsers local storage for that browser.

        Activity

        Hide
        Mircea Toma added a comment -

        Introduce ice.push.onMissingNotifyBackURI function that can be used to register callbacks that need to be notified when deviceID is missing.

        Show
        Mircea Toma added a comment - Introduce ice.push.onMissingNotifyBackURI function that can be used to register callbacks that need to be notified when deviceID is missing.
        Hide
        Ken Fyten added a comment -

        Please add a simple example implementation of the onMissingNotifyBackURI callback that uses the mobi:cloudPush component in a dialog or something to prompt the user to init cloud push.

        Show
        Ken Fyten added a comment - Please add a simple example implementation of the onMissingNotifyBackURI callback that uses the mobi:cloudPush component in a dialog or something to prompt the user to init cloud push.
        Hide
        Mircea Toma added a comment - - edited

        The registration.xhtml page in cloudPush application can be changed to show the mobi:cloudPush button only when the deviceId is missing:

        Here's the relevant code:

        ...
        <span id="cloud-push-button" style="display: none" onclick="this.style.cssText='display:none;';document.getElementById('links').style.cssText='display:block;';" class="mobi-center-cloudpush">
            <mobi:cloudPush id="cloudPushButton" />
        </span>
        
        <script type="text/javascript">
            ice.push.onMissingNotifyBackURI(function() {
                document.getElementById("cloud-push-button").style.cssText='display: block';
            });
        </script>
        ...
        
        Show
        Mircea Toma added a comment - - edited The registration.xhtml page in cloudPush application can be changed to show the mobi:cloudPush button only when the deviceId is missing: Here's the relevant code: ... <span id= "cloud-push-button" style= "display: none" onclick= " this .style.cssText='display:none;';document.getElementById('links').style.cssText='display:block;';" class= "mobi-center-cloudpush" > <mobi:cloudPush id= "cloudPushButton" /> </span> <script type= "text/javascript" > ice.push.onMissingNotifyBackURI(function() { document.getElementById( "cloud-push-button" ).style.cssText='display: block'; }); </script> ...
        Hide
        Liana Munroe added a comment -

        ICEfaces EE-4.1 448640, Tomcat 7 / 8, all browsers.
        Console error when accessing ace showcase or the mobile tab in ace showcase. Not an issue with ICEfaces 4 trunk
        ReferenceError: bridgeit is not defined
        http://localhost:8080/showcase/javax.faces.resource/coalesced.js.jsf?ln=ice.core&dgst=rjid49
        Line 2224

        Show
        Liana Munroe added a comment - ICEfaces EE-4.1 448640, Tomcat 7 / 8, all browsers. Console error when accessing ace showcase or the mobile tab in ace showcase. Not an issue with ICEfaces 4 trunk ReferenceError: bridgeit is not defined http://localhost:8080/showcase/javax.faces.resource/coalesced.js.jsf?ln=ice.core&dgst=rjid49 Line 2224
        Hide
        Mircea Toma added a comment -

        Commit #48643 for PUSH-398 has solved the error described above.

        Show
        Mircea Toma added a comment - Commit #48643 for PUSH-398 has solved the error described above.
        Hide
        Liana Munroe added a comment -

        Verified console error resolved ICEfaces EE-4 r48645. Tomcat 8, FF 43, IE 11, 10, Chrome 50.

        Show
        Liana Munroe added a comment - Verified console error resolved ICEfaces EE-4 r48645. Tomcat 8, FF 43, IE 11, 10, Chrome 50.

          People

          • Assignee:
            Mircea Toma
            Reporter:
            Mircea Toma
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: