×

Discussion Board

Results 1 to 7 of 7
  1. #1
    Registered User
    Join Date
    Feb 2010
    Posts
    18

    Custom item trivial question

    Hi guys,

    I've written a basic messaging application (sends and receives text messages to/from a server, over UDP/HTTP) based solely on the high level GUI items (Forms, Lists etc) which works quite well.

    Now I want to implement a "Panic Button" feature where if the user presses and holds and key for longer then X seconds then a distress (panic) message is sent to the server.

    I know I can't handle low level events such as keyPress/release within the high level GUI so I thought to implement a CustomItem as an item inside some of the Forms/Lists. But it now occurs to me that ALL keyboard events will be trapped by this custom item so I will have to handle myself the writing of messages, commands etc.

    Am I right? If so, does that mean I have to re write the WHOLE application?
    And if I do, what tool to use? Polish or LWUIT? My app is very simple in concept.

    Any suggestions or criticism welcome...

  2. #2
    Registered User
    Join Date
    Oct 2009
    Location
    Noida
    Posts
    941

    Re: Custom item trivial question

    But it now occurs to me that ALL keyboard events will be trapped by this custom item
    This is true only if the custom item is in focus, else when other items on the form are in focus, all command actions will work as is.

    You can try LWUIT, here you can overwrite the keypress get it in LWUIT form also.

    thanks,
    Ekta

  3. #3
    Registered User
    Join Date
    Feb 2010
    Posts
    18

    Re: Custom item trivial question

    Quote Originally Posted by ektasrv View Post
    This is true only if the custom item is in focus, else when other items on the form are in focus, all command actions will work as is.

    thanks,
    Ekta

    Hi Ekta,

    But that is the whole point: the Custom Item MUST be in focus since a "panic button" must be available at all times.

    I think I'm in for another "learning experience" :-)

    If someone can point me at a decent code example of how to handle keystrokes and simple screen items (Form + text field equivalent) in canvas class, thanks in advance.

  4. #4
    Super Contributor
    Join Date
    Apr 2007
    Posts
    2,708

    Re: Custom item trivial question

    I think that if you want a "panic button" application you would be better off implementing it in C++/Symbian...
    For example on most devices you won't be bale to run the app in the background, you won't be able to intercept keys whilst running in the background, you won't be bale to start up the app automagically.. Sure these things are available on a limited number of newer devices...
    My opinion is that you can be able to create such an app, but most probably it will mean you will have to adapt it to the many limitations of the platform, thus making it much less user-friednly than you might expect it to be and maybe even illogical to the user...
    To be honest, if someone would tell me about a panic button on my device, I would expect I push a button on my device and an alarm goes off somewhere... I would never have or take the time to start an app up, see if it runs (and obviously the attacker or hwatever with me), then finally press the button :P

  5. #5
    Registered User
    Join Date
    Feb 2010
    Posts
    18

    Re: Custom item trivial question

    Good advice Tiger, thanks.

    My specific case is a bit easier since I am thinking about an application targeted at corporate clients where I can safely assume only 1 or 2 models of phones (cheap Nokia models) will be used by the client. BUT that means S40 and no background running.

    As always, got to think it through.

    The issue here is that I manage J2ME but C++ means starting from scratch for me. We'll see.

  6. #6
    Registered User
    Join Date
    Feb 2010
    Posts
    18

    Re: Custom item trivial question

    Uppps,

    Told you I was new to this...

    I just found out there is NO c++ in S40 phones...
    J2ME only :-(

    So back to canvas and all it's wonders.

  7. #7
    Super Contributor
    Join Date
    Apr 2007
    Posts
    2,708

    Re: Custom item trivial question

    Yup,
    I'm sorry :P
    C++/Symbian combo is a S60-specific combo...

    Anyways, if it's for corporate clients then maybe you dont need any background running and so on, if you not only deliver the software but also give some course on how to use the app (and maybe even hand out short and concise "how-to-operate-software" papers) and make them aware of several things (for example the app has to be running, and never-ever push the red button!) it should be ok

Similar Threads

  1. custom "Setting Item List" scenario
    By TAHIR in forum Symbian User Interface
    Replies: 3
    Last Post: 2010-03-29, 05:07
  2. Theme based frame and center for latched item in custom listbox
    By astarter in forum Symbian User Interface
    Replies: 0
    Last Post: 2010-03-07, 09:54
  3. Can custom Item be placed on a Canvas?
    By KevinBoyd in forum Mobile Java General
    Replies: 2
    Last Post: 2009-09-07, 17:48
  4. Replies: 2
    Last Post: 2009-06-10, 16:52
  5. how to get the position of a cascaded item in a menu?
    By GeKI in forum Symbian User Interface
    Replies: 1
    Last Post: 2006-05-18, 15:47

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×