To add to what Brended said - in the MVC development model was the content management part and web site presenation part separated. You need to keep in mind that you have two separate apps; admin app vs. front end app and they each have their own, separate context available. That being said, in your front end app you can use standard MVC5 features to detect devices. You do not need to rely on Kentico macros or API that much anymore when it comes to some general things like this one.