4 Replies Latest reply on Sep 4, 2008 4:58 AM by (ramnishkalsi)

    How do I detect if adobe digital edition is present on client machine or not ?


      I am working on a project, whihc involves finding out if the client machine has adobe digital edition Ver. 1.5 installed.

      I went through the Installer SDK, and the examples that come with it, especially ade_detect_layers.htm, however, I cant figure out the variable which will signify the presence of ADE.

      By the looks of it, G_nADEInstalled variable should have it, but it always 0, no matter if the ADE is installed or not.

      The ade_web_library.swf does reflect the state of ADE, i.e. if ADE is present, it displays - Launch, and if ADE is not present, is displays - INSTALL. However, I want the state information in a javascript variable.

      Anybody got any ideas ?

        • 1. Re: How do I detect if adobe digital edition is present on client machine or not ?
          HI. For future questions with the Launcher/Installer SDK, please return to the Devnet site http://www.adobe.com/devnet/digitalpublishing/
          and use the link for Developer Center Feedback Form to send us questions. We will use this feedback to improve the documentation.

          Regarding G_nADEInstalled, if you review the main controlling JS file, ADEBadgeLauncher.js, and the function setG_nADEInstalled(), you will see in the comment that this is controlled by the SWF Flashvar io_sendADEInstalled. So your implementation needs to set the "sendADEInstalled" flashvar true.

          Be careful that you have only a single instance of the SWF using "sendADEInstalled" = true in your setup.

          If you carefully review the ade_detect_divlayers.htm example you see that the detection DIV sections are controlled by instance of the SWFObject, from DigitalEditionsDetection.js. This is the single instance that is using "sendADEInstalled" true.

          Only when ADE is detected does the function ShowADE_DivLayer() reveal the ADE_ShowContentDiv DIV section where there are "normal" instance of the SWF that are not trying to detect, they set "sendADEInstalled" false.

          I hope this helps some. We will try to update the commenting and examples to make things a little clearer in a future release of the Launcher/Installer SDK files.
          • 2. Re: How do I detect if adobe digital edition is present on client machine or not ?
            Level 1
            Thanks for the reply. Yes, I did set that variable to true.

            I actually made a totally new htm file, which only had appropriate functions, and the callbacks, and I did a javascript alert for variables before actually invoking the swfobject, and the variable is indeed true.

            One thing I did notice was the stress on THE INSTANCE of the flash object in the SDK comments. I am not a flash expert, so not sure about that.

            My question is: If i send that variable as true, and only instantiate one flash object, with sendADEInstalled true, the javascript callback should be invoked by the flash object, and should alert anything I put in. Is that correct.

            I suppose, a simple how-to with 'only' this callback mechanism for flash-dummies would be really helpful. Many people would want to take advantage of the callback, and use custom methods to get people install ADE, rather than using flash badge.

            • 3. Re: How do I detect if adobe digital edition is present on client machine or not ?
              I have the same problem as you do.
              I need to check with the client machine whether ADE is installed or not.
              I went though the sdk samples, they work fine.
              But I am not able to understand what is happening inside there.
              Any help in understanding the samples would be of great use for my project.

              • 4. Re: How do I detect if adobe digital edition is present on client machine or not ?
                Level 1
                You should be able to detect ADE using the following mechanism.

                Resources required:

                The 4 files above are provided by Adobe. It might be worth copying the
                swf file in your web app, as I had some issues initially with using
                adobe-hosted swf.
                Apart from that, you need some new javascript functions:

                Call the below function inline from the page, where you want to detect the ADE.
                The second function below is the callback which is used by Adobe SWF.

                I hope this makes things clear. It might be worth getting this working
                on a local apache server before integrating with a web application.
                And, check on both IE and firefox.


                //Called inline from the page to detect ADE, and hide/show the layer
                for installing the button..
                function detectADE(swfPath) {
                ADE_Detect_doOnLoad('', false, false, swfPath);

                //This is a callback function invoked after the function
                ADE_Detect_doOnLoad() has finished.
                function setG_nADEInstalled(IS_INSTALLED) {

                var obj = document.getElementById('ADE_ShowContentDiv');
                if (IS_INSTALLED == '1') {
                if (obj != null && typeof(obj.style)!= "undefined"){
                //document.getElementById('ADE_ShowContentDiv').style.visibility = "hidden";