WordPress.org

Support

Support » Plugins and Hacks » Mobile Client Detection Plugin » [Resolved] [Plugin: Mobile Client Detection Plugin] Fix: Android 4.0 phones detected as tablets

[Resolved] [Plugin: Mobile Client Detection Plugin] Fix: Android 4.0 phones detected as tablets

Viewing 7 replies - 1 through 7 (of 7 total)
  • By which I meant http://pastebin.com/4rurT079, obviously.

    Hi LawnGnome,

    Thanks for the patch. Being a PHP novice, I can’t quite see where to paste your fix.

    I’m assuming it’ll need to overwrite some of the code in mobile_client_detection.php, but I’m too worried about breaking it to overwrite any of the code. Could you tell me whereabouts it needs placing, please?

    Thanks.

    ransom1337

    @ransom1337

    Does anyone have any help for this, please? 🙂

    Plugin Author syslogic

    @syslogic

    great patch – how about droid tablets then? 🙂

    there is no way to measure the screen resolution with PHP.

    just use the other mode + JavaScript to see of it’s a phone or tablet.

    Plugin Author syslogic

    @syslogic

    I won’t apply that patch, because it’s not better in any way.
    Why should I fix one thing that will break another more likely thing?
    that’s ridiculous. JB/ICS is per default a tablet built and rarely available on phones.

    Please just use JavaScript for detection of the screen resolution. Way to much processing for serving pages in real-time… sure i could preg_match for any f* device – but I just don’t care.

    This plugin is just a proof of concept how to hook into the template engine properly.

    Plugin Author syslogic

    @syslogic

    Sure it’s a little generalized to say Android 4 is a tablet –
    but in 80% of the cases this might be a hit – the other 20% are rather a minority 🙂

    This is a theme developer tool, for more precise detection one should use a custom browsecap.ini … or switch mobile clients by .htaccess already.

    By JS one can easily calculate available screen an it’s aspect ratio.

    There’s not too many plugins around capable of pushing content through a few different themes – at the same time … which is the main application.

    Besides a better patch might be to change the regex to include the required 1 device (that pattern just matches my devices, feel free to modify it according to your environment).

    Plugin Author syslogic

    @syslogic

    Probably it’s even crap to differ between tablet and phone on the server-side – since once it’s clear that it’s rather a touch-device,
    one can load some JS framework to handle it. no matter if phone or tablet.
    just for example (very outdated version of jQuery mobile, but it can at least list the posts): http://mobile.codefx.biz – quite the same on phone and tablet (even if the content isn’t too readable, of course)

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘[Resolved] [Plugin: Mobile Client Detection Plugin] Fix: Android 4.0 phones detected as tablets’ is closed to new replies.
Skip to toolbar