Windows Mobile is standardised but Windows CE is not so the manufacturer can implement whatever elements of the full OS that they choose. In your case they seem to have not included that functionality. The use of SHIdleTimerReset() is "To prevent the shell from reverting to the Home screen and locking the device, an application should call this function periodically" Does your device have a Home screen? If not then that is why that call is not present.
KeepAlive also calls SystemIdleTimerReset() - "This function resets a system timer that controls whether or not the device will automatically go into a suspended state."
If you are optimised compiling then you could try modifying Hardware.cs in the libraries folder by commenting out the call to SHIdleTimerReset() and leaving the call to SystemIdleTimerReset() and see if that does what you need.
B4X:
public void KeepAlive()
{
[COLOR="Green"]//SHIdleTimerReset();
[/COLOR] SystemIdleTimerReset();
}
I modified the Hardware.cs file according to your suggestion.
I no longer get an error message. but, unfortunately, the device still go into suspend state (Screen turn white after a few minutes)
Can you advice a different way to stop suspend state via basic4PPC?