Thanks for your reply! Since I use Natively to build mobile apps, I used their plugin to do the device detection. I figured it out!