Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Your application may need to function slightly different based on the type of device the user has.  With that in mind, the ability to detect the device type in your program can be very useful.  Fortunately, this can be accomplished by simply interrogating the User Agent property or environment variable.  The following examples illustrate how to detect an Android device using different languages.  Other device types can be detected in a similar manner.

...