Pregunta

well guys, i am part of one team. (I dont have the project yet, i am new).

They did a application using gps, problem is it fail sometimes... why? they think gps fails because users has the device in "energy saving" mode; then the device hibernates after 5 minutes if they dont use it.

GPS brings sometimes bad coordinates (for example coordinate shows users is on "SEA" or in "Japan". I repeat, My partners thinks problem is because device is in "energy saving" mode. how can i change this configuration with C# while application is running (maybe back old configuration when application has been closed).

I am using this library.

using Microsoft.WindowsMobile.Samples.Location;

I can't check if it works because now i dont have a device, and i my computer doesn't have GPS, do you have any idea for i can check the application?. i am using

 `"Windows Mobile 6.0 SDK"`
¿Fue útil?

Solución

You can install networking functionality while using the Microsoft Device Emulator. This blog explains how to setup network functionality on Windows 7. Follow the official documentation if you're not using Windows 7.

You can emulate GPS functionality using the FakeGPS program supplied by Microsoft. If you want anything close to real data you'll need a text file containing raw NMEA to feed into FakeGPS. You can simply record bytes passed through the GPS COM port to a file to generate a NMEA file. If fake GPS doesn't like your file then remove the non-standard NMEA lines and try again.

You should do some research on Windows Mobile Power Management first to understand the problem. The quickest hack is to simply call SystemIdleTimerReset() more frequently than the battery idle timeout (use SystemParametersInfo() and SPI_GETBATTERYIDLETIMEOUT) to prevent the device from sleeping. This will decrease the battery life of the device! There are other more elegant solutions available such as using the Power Management API.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top