Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Questions (Windows Mobile)
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Questions (Windows Mobile) Post any question regarding Basic4ppc.

Turn off screen and lock device

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-08-2009, 11:13 AM
Junior Member
 
Join Date: Jul 2009
Posts: 11
Default Turn off screen and lock device

Hi

Is it possible to just turn off the screen of the device and lock the buttons without sending the device to suspend?

I'm monitoring GPS location and sending this information to a server. When the device goes to suspend the GPS-Device is turned off and the data connection is disconnected. This is bad as I won't send any localisation data any more. The solution would be to keep the device active, but as the device will be most of the time in a pocket, it consumes too much power to keep the display active. Also the buttons can accidentally been hit.

What I'd like to achieve is to catch the press of the power button but do not send the device to suspend, but turn off the screen and lock the buttons. Another press to the power button should re-enable buttons and screen.

Is this possible?

Thanks!
Thomas
Reply With Quote
  #2 (permalink)  
Old 07-09-2009, 06:53 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 13,162
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

You can use the Hardware library to catch the key events and just don't do anything.
Also see KeepAlive in this library, which prevents the device from suspending.
see this thread for a custom library which allows turning the screen off: http://www.basic4ppc.com/forum/quest...creen-off.html
It is not possible to capture the power button.
__________________
Basic4android documentation
Reply With Quote
  #3 (permalink)  
Old 08-02-2009, 05:43 PM
schimanski's Avatar
Basic4ppc Veteran
 
Join Date: Oct 2007
Location: Germany
Posts: 289
Default

Hello Hitec!

Do you found an answer for this problem? I have tried anything, that Erel says, but the PDA always stops working. When I use the pachpower.dll, hardware.keepalive doesn't prevent, that the pocket-pc is suspending. I have a similar application, that sends the GPS-data to a server and I also have the same problems.

Thanks for answer....
__________________
schimanski
--------------------------------------
Device: Motorola Defy, Samsung Galaxy Tab P1000
Dekstop: Asus Eee PC
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Turn off the Device Georg Questions (Windows Mobile) 1 07-07-2009 11:30 PM
Device IDE Form Designer : Controls can move off screen. pdablue Bug Reports 1 06-09-2009 09:22 AM
Device Lock brunoisa0 Questions (Windows Mobile) 5 03-06-2009 04:19 PM
A problem with the GPSDriver when turn off the screen schimanski Questions (Windows Mobile) 9 02-21-2009 03:38 PM
Help ! How to close the device screen ? mixter Questions (Windows Mobile) 1 11-02-2008 08:23 AM


All times are GMT. The time now is 03:55 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0