Archive for July, 2011

Download the Live API Demo Pages!

Hi, folks –

Numerous people have written me asking if they could download the Live API Demo pages we’ve posted over at Hand Interactive. They wanted to be able to see the API calls in context within real HTML code.

Well, I had some free time today so I whipped up a suitable export of the web pages for general consumption. (In other words, I fixed all the relative links, removed the Google usage tracking codes, removed the server-side includes, etc., etc.)

Download the MobileESP Live API Demo Pages for PHP & JavaScript.

CAVEATS

There are a few important caveats to using the downloadable Live API Demo Pages…

  • Please keep in mind that it’s not the cleanest of HTML code since it was originally created for my internal use only.
  • The web page is based on a free web design template I downloaded from DCarter Design. Please visit the DCarter Design site for more information on re-using their design template resources, including the style sheets, image resources, etc.
  • Due to the effort involved in updating the regular Live API Demo pages and then porting those updates to the cleaned up, downloadable file set, I can’t guarantee that the downloaded Live API Demo pages will be 100% up to date with the latest API changes. But that’s okay. It’ll still be good enough for you to review the techniques we used and figure out how to apply them to your own needs.

API SAMPLE FILES

We’ve also prepared a couple of extremely basic samples which you can download to study and learn more about how easy it is to integrate MobileESP into your web site. This blog post explains a little more about the downloadable samples.

 

Comments (1)

Download New PHP & JavaScript Samples!

Hi, folks –

A few people have asked for simple examples using MobileESP. I’m most familiar with PHP and JavaScript, so I whipped up a few super basic samples.

These examples illustrate how easy it is to include MobileESP code in your web page, do a quick detect, then do something interesting. For example, some of the things you might want to do include:

  • Turn on & off features.
  • Optimize pictures, videos, and other multimedia content for a specific platform. For example, dynamically replace a Flash video with an H.234 video file for iOS devices.
  • Show a platform-specific notice or ad. For example, “You’re on a Windows Phone 7 device? Download our new app!”
  • Redirect a device to an alternate version of the web page.

The PHP and JavaScript examles follow the same user flow. Both examples are extremely simple and have a very basic setup: The user browses to a landing page that does a basic device detection. Then…

  • If it’s an iPhone Tier device (including iPod Touch, Android, WebOS, etc.), it’ll redirect to a basic web page saying, “iPhone Tier.”
  • If it’s any other mobile device (including BlackBerries, Windows Phone 7, PalmOS, and most feature phones), it’ll redirect to a web page saying, “Generic Mobile Page.”
  • All other devices will fall through the above filters to land on a page saying, “Hi! I’m a Desktop page!”

Download the MobileESP samples for PHP & JavaScript.

See a live demo of the MobileESP samples in action.

 

Comments (3)

Updated: Added Support for WebOS Tablet Detection

Hi, folks –

I updated the code libraries to include support for detecting the new WebOS tablet called the HP TouchPad. The new method is called DetectWebOSTablet(). This method has been added to: PHP, JavaScript, Java, and both ASP.NET bases.

I also updated the DetectTierTablet() method to include support for the WebOS tablets.

Thank you also to the multiple folks who wrote me about the syntax error in the detectTierRichCss() method in the Java library. Sorry about that!

As always, please help me check for errors & bugs. I can do a light test of the PHP and JavaScript code libraries, but I don’t have access to servers to check the ASP.NET or Java code libraries. Please let me know if you find something. Much obliged!

- Anthony

Comments