1. Superfly_FR's Avatar
    Hi folks.
    I've been trying to figure how to set an acceptable linking procedure within a web page.
    It has been quite tricky, since you cannot actually detect if BBM Channels are installed on a device from within the browser.
    (believe me, I've tried ... many, many workarounds lol).

    So, after an usuccesful day of attempts, I changed the approach and used the basic HTML failover.
    In short, I'm creating via JS an object which data is the link to the Channel. It will be recognized on devices with BBMChannels installed (bc protocol is installed on the system) while ignored on non compliant devices.

    Basically, it's a combo, as it will open the channel (you have to accept on a BBM Channel powered device) and display a page provided by channelpin.com which displays the appropriate tag.

    This is the page code (script embbeded for ease, should be external if you're a best practices fan)

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
        <head>
            <script type="text/javascript">
            // THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY 
            // KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
            // IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
            // PARTICULAR PURPOSE.
            // Author: Superfly_FR AKA Antoine Bapst
            // Date: 2013-12-01
            // Summary: Open a new window with tag barcode, courtesy to www.channelpin.com (not affiliated with the author)
            // AND will launch the channel on BBMChannel ready devices.
            // Version: 1.1 beta
            // Disclaimer: this script has been tested with latest versions of FF/IE/Chrome/Safari in windows8 environment 
            // and BlackBerry(R) 10 devices running BBMChannel ver 10.2.25.101
            // Licence: free to use and distribute without restriction. Please include this header.
            
            function showChannel(channelPIN){
                fullBBM = "bbmc:"+channelPIN;
                fullURL =  "http://channelpin.com/"+channelPIN;
                bbmCall = document.createElement("object");
                bbmCall.data = fullBBM;
                placeHolder = document.getElementById('bbmcCallAnchor');
                // write the objet to the page : fires BBMC
                bbmcDiv = document.body.insertBefore(bbmCall,placeHolder);
                // we don't want the object to mess the layout (can't be done in the object instanciation, IE no go)
                bbmcDiv.style.height = 0; 
                bbmcDiv.style.width = 0;
               // load channelpin
                window.open(fullURL,'_blank');
                }
            </script>
        </head>
        <body>
            BBMC test<br>
            <input type="Button" ID="bbmcLink" onclick="showChannel('C00035FA6')" value="Hey ! visit my BBM Channel !">
            <div ID="bbmcCallAnchor"></div><!-- The bbmCall objet will be inserted above this DIV -->
        </body>
    </html>
    The above page is live here : http://www.2bo.com/bbmchannels/bbmc.htm
    Can you guys (and gals !) give it a try, both on your computers and devices and report if you encounter a problem ?

    Thanks a lot !
    SF

    P.S: keep in mind that we want to be cross platform and "update-hassle-free" here, so OS/navigator/device detection is not a valid option
    3_M4N likes this.
    12-02-13 10:55 AM
  2. chevpower394's Avatar
    Gets as far as channel does not exist. In BBM

    Posted Via CB10 - Q10SQN100-1/10.2.0.1803
    Superfly_FR likes this.
    12-02-13 11:28 AM
  3. Superfly_FR's Avatar
    Gets as far as channel does not exist. In BBM

    Posted Via CB10 - Q10SQN100-1/10.2.0.1803
    Thank you
    Could you please try to find manually the channel C00035FA6 and see if it's available for you ?
    12-02-13 12:06 PM
  4. JCangoku's Avatar
    Hi Antoine !
    This ok for me. Works fine here in France at least !
    Superfly_FR likes this.
    12-03-13 04:25 AM
  5. chevpower394's Avatar
    Thank you
    Could you please try to find manually the channel C00035FA6 and see if it's available for you ?
    Yes, seems to work clicking on the link that appears in my reply with quote

    Posted Via CB10 - Q10SQN100-1/10.2.0.1803
    12-03-13 05:05 AM
  6. chevpower394's Avatar
    Actually everything seems to be working now including the original post. Nice work

    Posted Via CB10 - Q10SQN100-1/10.2.0.1803
    Superfly_FR likes this.
    12-03-13 05:06 AM
  7. Superfly_FR's Avatar
    Actually everything seems to be working now including the original post. Nice work

    Posted Via CB10 - Q10SQN100-1/10.2.0.1803
    I'm out of button, so ... thanks !
    12-03-13 05:52 AM

Similar Threads

  1. How safe is it to buy Z10 on Amazon/Ebay
    By wincyUt in forum BlackBerry Z10
    Replies: 39
    Last Post: 06-02-14, 05:01 PM
  2. Replies: 10
    Last Post: 12-18-13, 09:41 AM
  3. Do you use a screen protector on your Q10?
    By Chase_Manley in forum BlackBerry Q10
    Replies: 23
    Last Post: 12-03-13, 05:07 AM
  4. How do you store games data in the phone?
    By WanShark69 in forum PlayBook Apps & Games
    Replies: 4
    Last Post: 12-02-13, 11:41 AM
  5. An Open Letter to Customers (from BlackBerry)
    By FryBerry in forum General BlackBerry News, Discussion & Rumors
    Replies: 3
    Last Post: 12-02-13, 10:47 AM
LINK TO POST COPIED TO CLIPBOARD