How do I check whether the user agent is from the mobile app or mobile web?

你离开我真会死。 提交于 2019-12-12 02:15:20

问题


How do I identify if an ad was rendered from within the mobile application or rendered on a mobile web browser.

What kind of alternatives exist?

a. Can I distinguish traffic from app or mobile web based on the user agent.

Sample user agent(s) are here as follows, but I am unable to distinguish

Mozilla/5.0 (iPhone; CPU iPhone OS 7_1_1 like Mac OS X) AppleWebKit/537.51.2 (KHTML, like Gecko) Mobile/11D201

b. I also referred from here which discussed same problem.

来源:https://stackoverflow.com/questions/26750657/how-do-i-check-whether-the-user-agent-is-from-the-mobile-app-or-mobile-web

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!