/ Published in: Java

This is similar to the one for PHP but modified for JAVA.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
if(UserAgent.toLowerCase().replace(' ', '%').matches("\\p{Graph}*" +"(nokia|iphone|android|motorola|^mot-|softbank|foma|docomo|kddi|up.browser|up.link|" +"htc|dopod|blazer|netfront|helio|hosin|huawei|novarra|CoolPad|webos|techfaith|palmsource|" +"blackberry|alcatel|amoi|ktouch|nexian|samsung|^sam-|s[cg]h|^lge|ericsson|philips|sagem|wellcom|bunjalloo|maui|" +"symbian|smartphone|midp|wap|phone|windows ce|iemobile|^spice|^bird|^zte-|longcos|pantech|gionee|^sie-|portalmmm|" +"jigs browser|hiptop|^ucweb|^benq|haier|^lct|operas*mobi|opera*mini|320x320|240x320|176x220)" +"\\p{Graph}*")){ } else{ }
Comments
