Hi, folks —
Summer is here! And the mobile device avalanche is just about ready to begin in earnest…
There were a few outstanding things that needed to be taken care of, especially some refactoring among the Android detection methods. These were significant changes, so please be sure to review your implementation before upgrading to the latest version!
Here’s a summary of the important code updates. Check the Change Log in the source code for a longer description.
- DetectIos(): This is a brand new function for all libraries. Returns TRUE for iPhones, iPod Touches, and iPads. The other platforms have a generic check available rather than by screen size class, so I thought it was good to add this in.
- DetectAndroid(): The purpose of this function has been changed. Now, this method returns TRUE for *any* Android device: phone, multi-media player, tablet, or Google TV. Updated in all libraries.
- DetectAndroidPhone(): This is a brand new function for all libraries. Its equivalent in the iOS world is DetectIphoneOrIpod(). This method ought to return TRUE for the smaller form factor devices (generally 7″ and less) such as phones and multi-media players (e.g., Samsung Galaxy Player, HTC Flyer). The logic follows Google’s recommendation of checking for the presence of both “Android” and “mobile” in the user agent string.
- DetectAndroidTablet(): This function has been updated in all libraries. The logic follows Google’s recommendation of checking for the presence of both “Android” but not “mobile” in the user agent string.
- The various BlackBerry functions: I noted in the code explicitly which ones should return TRUE for the PlayBook and which shouldn’t.
- HTC Flyer: HTC has released their new 7″ Android tablet. My testing device was purchased at Best Buy last week. The device keeps reporting itself as a desktop Mac — it doesn’t even include the word “Android” in the user agent string. So I added some special checks in the Android methods for this device to ensure it’s detected properly.