How to detect WP App, is running on Emulator or real Phone Device

In this post I am going to show you how to detect, whether your application is running on real (Windows Phone) device or WP Emulator. While working on, one of service wanted to know whether service is invoking from the real device or not.

It was really quick and easy to know, whether app is running on real device or emulator. Microsoft Widows Phone SDK has a strong collection of API in Microsoft.Phone namespace.

Here is code snippet for the same:

image

Download Code here

Happy Coding Thumbs up

Advertisements

About Pavan Pareta

My name is Pavan Pareta, I enjoy computers and general technology. I am more interested in the areas of Computer Security, Programming and developing innovative s/w for Windows Mobile and Windows Phone 7. I like MS Technology and support open-source software, because I believe it plays a major role in knowledge sharing and exchange of ideas, which effectively leads to better software. Additionally, I am a follower of the KISS (Keep It Simple Stupid) philosophy. I Love C#.NET and recently I am fall in love with Silverlight :) Introduce to my machine My main workstation is a Intel Pentium Core Duo and my primary operating system is Windows 7.
This entry was posted in Windows Phone, Windows Phone 7. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s