Function to get 'user agent' data

There is any function for get 'user agent' data as we can seen on Current User Activity page?
We have a use case to save users device details when they submit a form. Thanks before.

OriginalPostID-180908

OriginalPostID-180908

  Discussion posts and replies are publicly visible