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.

Keeping Hardware Alive

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-18-2007, 06:39 PM
Junior Member
 
Join Date: Dec 2007
Posts: 17
Awards Showcase
Beta Tester 
Total Awards: 1
Default Keeping Hardware Alive

Hi

Erel you mentioned hardware.keepalive
Is this a device setting or something that can be done in the program?

Regards
--Cor
Reply With Quote
  #2 (permalink)  
Old 12-18-2007, 07:00 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,726
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

See the example in the manual: http://www.basic4ppc.com/help/hardware/keepalive.htm
KeepAlive resets the device's idle timer.
It should be called periodically.
Reply With Quote
  #3 (permalink)  
Old 03-11-2010, 05:04 AM
Junior Member
 
Join Date: Mar 2010
Posts: 28
Default Keep alive error message

i have tried to use the keepalive exactly as the example in the Basic4ppc documentation, but unfortunately i keep receive an error after 5 second from running the exe file in my PPC (LG Incite), i believe the error message show right after the hardware1.keepalive command handling, any help will be highly appreciated
Reply With Quote
  #4 (permalink)  
Old 03-11-2010, 09:44 AM
klaus's Avatar
Basic4ppc Expert
 
Join Date: Oct 2007
Location: Fully, Switzerland
Posts: 4,463
Awards Showcase
Forum Contributer Beta Tester Competition Winner 
Total Awards: 3
Default

What error do you get ?

Best regards.
__________________
Klaus
Switzerland

Beginner's Guide / User's Guide
Reply With Quote
  #5 (permalink)  
Old 03-21-2010, 06:04 AM
Junior Member
 
Join Date: Mar 2010
Posts: 28
Default KeepAlive error

please see attached image for full error description
Thank you very much in advance for your help
Reply With Quote
  #6 (permalink)  
Old 03-21-2010, 09:32 AM
specci48's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: Germany
Posts: 1,057
Awards Showcase
Beta Tester Forum Contributer 
Total Awards: 2
Default

You are trying to run this program on your desktop!

Excerpt from the help file of the hardware.dll:

This library is only functional on the device.
If you like to build the application on the desktop you can use the HardwareDesktop.dll file.
It is a shallow copy of the Hardware library (without any functionality).


So the error in your screenshot is not that one you'll get on your device.


specci48

Last edited by specci48 : 03-21-2010 at 09:34 AM.
Reply With Quote
  #7 (permalink)  
Old 03-21-2010, 11:10 AM
Basic4ppc Veteran
 
Join Date: May 2008
Location: Newcastle Upon Tyne - England
Posts: 271
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Ah, you're getting there. From your screen shot, I see you have the help file for the Hardware library open. See the line:

Hardware1.New1

This initialises the hardware object. I think you need to read the Libraries Tutorial.

To get you started very quickly, in the IDE, use 'Tools>Components' and add the Hardware.dll to the Device side and the HardwareDesktop.dll to the Desktop side. Then create your object. To do this, its 'Tools>Add object' and you will see 'HardWare'. Call it 'HardWare1'

Now in your AppStart sub, add a line Hardware1.New1 before your timer enabling and you should be up and running. But I must stress you should have a read of the tutorial, because the more you get into Basic4PPC - the more you will experience the need for libraries.
Reply With Quote
  #8 (permalink)  
Old 03-23-2010, 01:45 AM
Junior Member
 
Join Date: Mar 2010
Posts: 28
Default KeepAlive error

Thank you everybody for your replies, unfortunately all what you have mentioned was already done:

Dear specci48, I never tried to run the exe from my PC, I have ran the file from PPC (LG Incite) as I mentioned before, and the Hardware.dll included in the same directory as the exe

Dear Zenerdiode, I’m not a new Basic4PPC user, actually I have already done what you have recommended, please see the new attached image

Any new ideas folks … thank you in advance
Reply With Quote
  #9 (permalink)  
Old 03-23-2010, 01:51 AM
Junior Member
 
Join Date: Mar 2010
Posts: 28
Default KeepAlive error

here is what i have tried so far, please take a look and let me know what do you think ...

Thank you
Reply With Quote
  #10 (permalink)  
Old 03-23-2010, 08:50 AM
klaus's Avatar
Basic4ppc Expert
 
Join Date: Oct 2007
Location: Fully, Switzerland
Posts: 4,463
Awards Showcase
Forum Contributer Beta Tester Competition Winner 
Total Awards: 3
Default

You haven't initialized the Harware1 object ?!
You are missing the line in red!

Code:
<font face="Courier New"><font size="2"><font color="#0000ff"><font face="Courier New"><font size="2"><font color="#0000ff">
<font size=
"2"><font face="Courier New"><font color="#0000ff">Sub </font></font></font></font></font></font></font></font></font><font face="Courier New"><font size="2"><font face="Courier New"><font size="2">App_Start</font></font>
<font size=
"2"><font face="Courier New"> <font color="red">Hardware1.New1</font></font></font>
<font size=
"2"><font face="Courier New"> Form1.show</font></font>
<font size=
"2"><font face="Courier New"> Timer1.Enabled = </font></font></font></font><font face="Courier New"><font size="2"><font color="#800080"><font face="Courier New"><font size="2"><font color="#800080"><font face="Courier New"><font size="2"><font color="#800080">True</font></font></font>
</font></font></font></font></font></font><font face=
"Courier New"><font size="2"><font color="#0000ff"><font face="Courier New"><font size="2"><font color="#0000ff"><font face="Courier New"><font size="2"><font color="#0000ff">End Sub</font></font></font>
 
</font></font></font></font></font></font><font face=
"Courier New"><font size="2"><font color="#0000ff"><font face="Courier New"><font size="2"><font color="#0000ff"><font face="Courier New"><font size="2"><font color="#0000ff">Sub </font></font></font></font></font></font></font></font></font><font face="Courier New"><font size="2"><font face="Courier New"><font size="2">Timer1_Tick</font></font>
<font size=
"2"><font face="Courier New"> Hardware1.KeepAlive </font></font>
</font></font><font face=
"Courier New"><font size="2"><font color="#0000ff"><font face="Courier New"><font size="2"><font color="#0000ff"><font face="Courier New"><font size="2"><font color="#0000ff">End Sub</font></font></font>
</font></font></font></font></font></font>
Best regards.
__________________
Klaus
Switzerland

Beginner's Guide / User's Guide
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
Hardware library - V3.41 Erel Official Updates 0 07-13-2008 03:15 PM
Keeping a table cell highlighted (highlit?) Offbeatmammal Questions (Windows Mobile) 5 06-15-2008 01:33 AM
Hardware library - V3.3 Erel Official Updates 0 03-01-2008 04:16 PM
Hardware.DLL Bobbes German Forum 9 11-18-2007 03:17 PM
About Hardware.dll JJM Questions (Windows Mobile) 4 07-10-2007 08:57 PM


All times are GMT. The time now is 01:39 AM.


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