0

I have website that is optimized for mobile. And I have some content which will work only for Android phones, so I don't want to show it on iOS or other devices. I want to show it only on Android phones.

Like this:

if(mobile is = Android) show this content

elseif
    this content

I have been searching for months now but could not find anything, I want to use it into my Android app for sharing content on WhatsApp.
Also tried mobiledetect but don't know why it doesn't work. tried more options from google search but nothing seems to be work

Ninder Chand
  • 389
  • 1
  • 5
  • 15
  • 1
    Don't device sniff... use feature sniffing instead. – evolutionxbox Mar 20 '17 at 14:20
  • See here: http://stackoverflow.com/questions/21757105/javascript-how-to-check-user-agent-for-mobile-tablet – G0dsquad Mar 20 '17 at 14:21
  • For PHP (wordpress) , see this http://stackoverflow.com/questions/10243841/how-to-get-user-agent-in-php – Tareq Mar 20 '17 at 14:22
  • Welcome to Stack Overflow! I've edited your question. The question itself is pretty clear, which is good. You may want to tell us what other things you've tried, apart from mobiledetect. That will prevent other people from suggesting the solutions you've already tried. Good luck! – S.L. Barth is on codidact.com Mar 23 '17 at 12:56

0 Answers0