# Android mobile device detection is too broad

**URL:** <https://meta.discourse.org/t/android-mobile-device-detection-is-too-broad/41349>\
**Category:** Feature\
**Created:** [21 Marzo 2016, 3:59am UTC](https://meta.discourse.org/t/android-mobile-device-detection-is-too-broad/41349 "2016-03-21T03:59:09Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)\
**Post date:** [26 Marzo 2016, 9:16am UTC](https://meta.discourse.org/t/android-mobile-device-detection-is-too-broad/41349/5 "2016-03-26T09:16:10Z")

</div>

All right, I’ve changed it to

```plaintext
user_agent =~ /Mobile/ && !(user_agent =~ /iPad/)

```

Let’s just say it’s a mobile device if it is telling us it is one:

`Mobile`

---

_[View the full topic](https://meta.discourse.org/t/android-mobile-device-detection-is-too-broad/41349)._
