WordPress.org

Ready to get started?Download WordPress

Forums

Mobile Client Detection Plugin
[resolved] Mobile Client Detection Plug-in and Android Tablets (7 posts)

  1. Mystech
    Member
    Posted 2 years ago #

    Can this plugin detect/differentiate between Android phones and tablets? I've been disappointed with similar plugin's inability to distinguish between at small format Android phone and a 10" Android tablet for purposes of delivering a customized theme or css.

    http://wordpress.org/extend/plugins/mobile-client-detection-plugin/

  2. syslogic
    Member
    Plugin Author

    Posted 2 years ago #

    Hopefully getting a Asus Transformer Prime soon, so I can test :)
    Probably it can be separated by the version of Android running...
    Since they are phone only / tablet only - know what I mean?

  3. syslogic
    Member
    Plugin Author

    Posted 2 years ago #

    I will consider your request, since it makes sense to separate that. Thanks. (Just might take a while - a list which versions are for phones and for tablets would be helpful)... current only got 1 Froyo here to test.

    Could you please post me the user agent string of your tablet??

  4. syslogic
    Member
    Plugin Author

    Posted 2 years ago #

    I just added version detection for Android ... for the first digit only.
    Android v3.0 / v4.0 now (should) return tablet when $general_only=true.
    Please leave feedback.

  5. syslogic
    Member
    Plugin Author

    Posted 2 years ago #

    Well, now it says "Android (Phone)" or "Android (Tablet)" in footer debug output. Currently only can verify 50% - but I guess it should just work :)
    You could check output there: codefx.biz
    It's still in early stages of development - the next stage will be control panel & alternate file-names according to returned vars (as option).

  6. Mystech
    Member
    Posted 2 years ago #

    Thanks for answering my question! I also use an Asus Transformer tablet (original, not the new Prime). My string is:

    Mozilla/5.0 (Linux; U; Android 3.2.1; en-us; Transformer TF101 Build/HTK75) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13

  7. syslogic
    Member
    Plugin Author

    Posted 2 years ago #

    That matches 'android 3' - improved the reg-ex patern, so that it matches the first digit of the Android version. Phone running android 3 might fail. Once the template hooks are in place it should look for files named like that: index-android-3.php / index-tablet.php
    (that's is what I currently work on).

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic