smartphones kiosk application catching ALL hardkeys and specialkeys and disabling T9

UTISS.DEV01

Member
Licensed User
Hi,
I use smartphones (now HP iPaq 514) and i need to develop a 'kiosk' application able to:
A.) catch ALL hardkeys and specialkeys
B.) disable T9 in numeric pad.
The goal is to obtain a 'smartphone kiosk' application - see http://www.b4x.com/forum/code-samples-tips/500-creating-kiosk-applications.html - able to get input only from numeric pad numbers disabling T9.

I derive a my 'smartphone kiosk' application from previous link, but:
1.) if I don't try to catch hardkeys activating <<For i = 0 to ArrayLen(keys())-1>> loop statements, my 'smartphone kiosk' application "blocks" itself at last statement <<hk.New2("Form1",True,keys(),False)>>.
2.) if I try to catch hardkeys activating <<For i = 0 to ArrayLen(keys())-1>> loop statements, my 'smartphone kiosk' application "blocks" itself at instruction <<For i = 0 to ArrayLen(keys())-1>>.

May you help me?

Thanks,
UTISS.DEV01
 

Attachments

  • hkKiosk.sbp
    2.6 KB · Views: 169

Erel

B4X founder
Staff member
Licensed User
Longtime User
The purpose of the registry section is to read the keys values.
Unfortunately not all devices store those values in the registry.
I recommend you to download phm registry: PHM Registry Editor : Smartphone Edition (there is also a non smartphone version).
With this tool see the actual keys that are available on your device.

You will probably not be able to catch all keys of the smartphone.
Maybe as an alternative you could use another background program which always test if the required application is visible and if not it launches it (which will bring it to the front).
 

UTISS.DEV01

Member
Licensed User
Thanks Erel,
unfortunately PHM Registry Editor Smartphone Edition can't be installed in HP iPaq 514.
May you indicate me an BASIC4PPC source code example about "a background program which always test if the required application is visible and if not it launches it (which will bring it to the front)"?

UTISS.DEV01
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
B4X:
Sub Globals
    'Declare the global variables here.
End Sub

Sub App_Start
    Form1.Show
    SysState.New1("ActiveApplication")
    Hardware.ShowTodayScreen 'Hide this application
End Sub

Sub SysState_StateChanged
    Shell("\YourApplication.exe","")
End Sub
SysState - SystemState object - http://www.b4x.com/forum/additional-libraries/3346-systemstate-library-wm-5-0-later.html
Hardware - Hardware object

Every time that the current application changes this code will launch yourApplication.exe. If it is already running then it will just become visible.
 
Top