How to use Hardware based Compass in Windows Phone 7 without Compass API
Microsoft hasn't provided API for accessing compass present in Windows Phone 7 device. For this reason getting compass value is difficult (not impossible, describing below) on smartphones running Windows Phone 7. Fortunately, HTC released HTC Compass application few days back at Windows Phone Marketplace, that application uses an obscure way of accessing compass hardware from HTC Phone. Since I'm working on an application called ThirdEye along with my team Team Rapture, where compass is very much necessary, we were hunting the internet for any solution if the compass is possible to be accessed thought API is not present at this period of time. Finally, I succeed. Here are the steps I followed to get the value of compass in Windows Phone 7. I tested the code in HTC HD7 and it worked fine.
25 Hidden but Advanced Tools in Windows
To use these tools, goto Start menu & select "Run" (or press
Winkey+R), type in the bold texts and press Enter (unnecessary explanation!)