http-browserdetect icon indicating copy to clipboard operation
http-browserdetect copied to clipboard

Would like a phone() method

Open instadrew opened this issue 12 years ago • 2 comments

I have started using HTTP::BrowserDetect and have noticed that it currently has the methods mobile(), tablet(), and robot(), but not phone(). I'm wondering if there are any plans to add such a method. Right now, I'm just doing:

return ($browser->mobile && ! $browser->tablet && ! $browser->robot) ? 1 : 0;

but a provided method would be great, if that's possible.

instadrew avatar Jul 03 '13 14:07 instadrew

@oalders @dougwilson Any thoughts on this? From what I understood of #38 and #90, there should be at least interesting to document on the POD something like "what's the best way to tell if it's a phone?" pointing to either this solution or maybe something regarding os() or device().

garu avatar Jul 29 '15 17:07 garu

@garu Either a doc patch or a patch with a new method would be good to have here. I think it comes up often enough to merit that.

oalders avatar Jul 29 '15 18:07 oalders