1

Does anybody know how to 1) Detect if a web page is being opened/requested on an Android phone, and 2) Find the name/URL of that Webpage? Thanks so much for any help.

UPDATE: The detection needs to be done on the phone.

GNP284
  • 31
  • 6

1 Answers1

0

I am assuming this (detection) happens on your server (backend) website? If this is an ASP.Net site, you can start by querying the user agent. For example:

userAgent = Request.UserAgent;
if (userAgent.IndexOf("Android ") > -1) 
{
  // The browser is Android.
}
alpinescrambler
  • 1,934
  • 16
  • 26