In a salesforce application we have a requirement to invoke the visual force pages based on the user is logged in from mobile or desktop. How can I identify if a user is logged in from mobile or desktop?

  • Name > Setup > Mange Users > Login History go there and check is this what you need – highfive Sep 25 '14 at 5:33
  • In what context do you need to know? Is it code, for debugging, or some other reason? – Daniel Hoechst Sep 25 '14 at 5:48
  • I need to change the behaviour of my application around it,so yes around code – Manuj Sep 25 '14 at 5:49
  • Question doesn't contain enough information to answer it properly. – Ashwani Sep 25 '14 at 6:03
  • Manuj, what everyone is trying to say is that with so little information in your question, it's hard to really know what answer you're looking for. Would you be able to provide more detail in your question as to what you're trying to do and where in your code this information is needed and what type of code we're talking about (apex vs javascript etc). – Samuel De Rycke Sep 25 '14 at 7:23

You should be able to use most of the generic practices from standard web development to determine this (mobile apps will display web content using a mobile browser component).

You can see a great list of options on the main StackOverflow site here where you can pick the best for your situation.

Not the answer you're looking for? Browse other questions tagged or ask your own question.