This question already has an answer here:
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?
This question already has an answer here:
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?
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
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.