3 Replies Latest reply on Apr 25, 2011 1:44 PM by TOverturf

    Android Flash Detection

    Dan74 Level 1

      Hi gang,

       

      I've set up a page with a swf and the HTML has the standard flash detection that displays the adobe "Get Flash Player" graphic and points to adobe to get it. This works fine on browsers. Even works fine on iPadPodPhones (at least the detection does, the flash of course does not Dang it!!!). But on the two Android devices I've tested, all i get is the standard blue brick with question marks.

       

      How can I get flash detection working on Android?

       

      Thanks

      Dan P.

        • 1. Re: Android Flash Detection
          TOverturf Level 1

          Can show us the html? But this should work

           

          <script type="text/javascript"> // <![CDATA[
               if ( (navigator.userAgent.indexOf('Android') != -1) ) {
                    code to execute if Android
               } // ]]>
          </script

          • 2. Re: Android Flash Detection
            Dan74 Level 1

            So my HTML is below. Just to be clear, I'm pretty far out of my comfort zone with this. I'm not quite sure where / how it's appropriate for me to implement the code in your response in my code below. Any help appreciated.

             

            ------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------ ------------

            <!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" lang="en" xml:lang="en">
                <head>
                    <title>attribute_blocks_mobile</title>
                    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
                    <style type="text/css" media="screen">
                    html, body { height:100%; background-color: #ffffff;}
                    body { margin:0; padding:0; overflow:hidden; }
                    #flashContent { width:100%; height:100%; }
                    </style>

             

                </head>
            <center>
                <body>
                    <div id="flashContent">
                        <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="750" height="470" id="attribute_blocks_mobile" align="middle">
                            <param name="movie" value="attribute_blocks_mobile.swf" />
                            <param name="quality" value="high" />
                            <param name="bgcolor" value="#ffffff" />
                            <param name="play" value="true" />
                            <param name="loop" value="true" />
                            <param name="wmode" value="window" />
                            <param name="scale" value="showall" />
                            <param name="menu" value="true" />
                            <param name="devicefont" value="false" />
                            <param name="salign" value="" />
                            <param name="allowScriptAccess" value="sameDomain" />
                            <!--[if !IE]>-->
                            <object type="application/x-shockwave-flash" data="attribute_blocks_mobile.swf" width="750" height="470">
                                <param name="movie" value="attribute_blocks_mobile.swf" />
                                <param name="quality" value="high" />
                                <param name="bgcolor" value="#ffffff" />
                                <param name="play" value="true" />
                                <param name="loop" value="true" />
                                <param name="wmode" value="window" />
                                <param name="scale" value="showall" />
                                <param name="menu" value="true" />
                                <param name="devicefont" value="false" />
                                <param name="salign" value="" />
                                <param name="allowScriptAccess" value="sameDomain" />
                            <!--<![endif]-->

             

                            <a href="http://www.adobe.com/go/getflash">
                                <Font face="Arial" size="3"><br><br>
                                You need to download the flash player to see this content</font>
                            </a>

             

                            <!--[if !IE]>-->
                            </object>
                            <!--<![endif]-->

             

                        </object>
                    </div>
                </body>
            </center>
            </html>

            • 3. Re: Android Flash Detection
              TOverturf Level 1

              Try this, but you initial code should work fine. Maybe its your phone.



              <!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" lang="en" xml:lang="en">
                  <head>
                      <title>attribute_blocks_mobile</title>
                      <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
                      <style type="text/css" media="screen">
                      html, body { height:100%; background-color: #ffffff;}
                      body { margin:0; padding:0; overflow:hidden; }
                      #flashContent { width:100%; height:100%; }
                      </style>

               

                  </head>
              <center>
                  <body>
                      <div id="flashContent">
                          <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="750" height="470" id="attribute_blocks_mobile" align="middle">
                              <param name="movie" value="attribute_blocks_mobile.swf" />
                              <param name="quality" value="high" />
                              <param name="bgcolor" value="#ffffff" />
                              <param name="play" value="true" />
                              <param name="loop" value="true" />
                              <param name="wmode" value="window" />
                              <param name="scale" value="showall" />
                              <param name="menu" value="true" />
                              <param name="devicefont" value="false" />
                              <param name="salign" value="" />
                              <param name="allowScriptAccess" value="sameDomain" />
                              <!--[if !IE]>-->
                              <object type="application/x-shockwave-flash" data="attribute_blocks_mobile.swf" width="750" height="470">
                                  <param name="movie" value="attribute_blocks_mobile.swf" />
                                  <param name="quality" value="high" />
                                  <param name="bgcolor" value="#ffffff" />
                                  <param name="play" value="true" />
                                  <param name="loop" value="true" />
                                  <param name="wmode" value="window" />
                                  <param name="scale" value="showall" />
                                  <param name="menu" value="true" />
                                  <param name="devicefont" value="false" />
                                  <param name="salign" value="" />
                                  <param name="allowScriptAccess" value="sameDomain" />
                              <!--<![endif]-->

                                   <script type="text/javascript"> // <![CDATA[

                                  if ( (navigator.userAgent.indexOf('Android') != -1) ) {
                                  <a href="http://www.adobe.com/go/getflash">
                                  <Font face="Arial" size="3"><br><br>
                                  You need to download the flash player to see this content</font>
                                   </a>                     } // ]]>                     </script
                              <a href="
              http://www.adobe.com/go/getflash">
                                  <Font face="Arial" size="3"><br><br>
                                  You need to download the flash player to see this content</font>
                              </a>

               

                              <!--[if !IE]>-->
                              </object>
                              <!--<![endif]-->

               

                          </object>
                      </div>
                  </body>
              </center>
              </html>