Now many developers have started learning Windows Phone 7. If you haven't started yet, you can refer to this article to Download Windows Phone Developer Tools Beta and the corresponding training kit. For developers who cannot get Windows Phone 7 now, using the simulator provided by Windows Phone developer tools for development is a convenient alternative. However, simulators also have some limitations. For example, the performance cannot be consistent with that of real devices, the real mobile network cannot be accessed, and the GPS data and sensor data cannot be obtained. Now, some foreign developers have solved the problem of analog data of GPS and accelerometer.
Simulation of GPS, Keyboardp provides a solution. He uses a common winform program to access Bing map and publish the GPS data in the map in the form of the WCF Service, then access the WCF Service in the Windows Phone 7 program to obtain the simulated GPS data.
Interested friends can download their code for research. Of course, you can also take a look at the following video for a simple understanding.
ForAcceleration Sensor Simulation. After all, unlike the above program, you can access Bing through browser controls to obtain the coordinates. Therefore, the solution of Prabhu Kumar is to use a real hd2 to obtain the data of the accelerometer, and then send the data back to the WCF Service. At the same time, the Windows Phone 7 program obtains the value of the accelerometer through the WCF Service. Of course, Microsoft did not provide the acceleration sensor API on Windows Mobile, and HTC did not disclose the API. However, this is hard to beat everyone's wisdom. Prabhu Kumar also provides an article about HTC's acceleration sensor on Windows Mobile. The principle is very simple, and the operation is very troublesome. Well, let's take a look at the video first:
How is it? Interesting implementation. If you are interested, set up your Windows Phone 7 development environment:
1. Build a development environment for Windows Phone 7
2. No device? No GPS? No matter! -(With code !)
3. HTC hd2, accelerometer and Windows Phone 7-source code