0

I have been working on porting my lwuit app to Blackberry. It works fine except that when tested in Bold 9900 Blackberry, touch event is not happening. The buttons, list etc gets focus but touch event is not triggered. I am using Blackberry JDE 5.0 and LWUIT 1.5-->UI_RIM_Touch.jar from the SVN to deploy my app. Where am I going wrong?

  • Which touch BlackBerry models did you test with? – Michael Donohue May 19 '13 at 19:17
  • Blackberry bold 9900. Its not pure touch. its half touch half qwerty. It had worked well with my another blackberry (curve) which was pure touch – Parvathy Mohan May 20 '13 at 04:44
  • "curve" covers a few models - which model number are you talking about? I'm trying to separate 'touch' issues from 9900 specific issues here - did you test against a few other touch devices before deciding that the 9900 is the problem? – Michael Donohue May 20 '13 at 05:39
  • Hi, I have actually tested only in 2 blackberry models, one being 9380 curve-pure touch (and in this, my app works well) and blackberry bold 9900 (in this, my app works[i.e. using key events] except for touch events trigger). I am new to this, but I have a feeling its related to some jde version issue. I was using BB JDE 4.7 before and saw in a site that the support for touch is moved to BB JDE 5.0 . So I installed 5.0 but still touch event not triggered. Please help – Parvathy Mohan May 20 '13 at 05:46
  • What kind of events are you talking about? Could you post a sample showing how do you handle these events? What does `Canvas. hasPointerEvents()` return for the 9900? – Mister Smith May 20 '13 at 08:12
  • Hi, any type of event, event a button click, focus comes but the action event of button is not trigerred. I will check with hasPointerEvents and revert – Parvathy Mohan May 20 '13 at 17:16
  • I am using lwuit, so dont have hasPointerEvents(), bt instead tried Display.getInstance().isTouchDevice() and I am getting it as true. Any ideas? – Parvathy Mohan May 20 '13 at 18:44
  • 1
    LWUIT for RIM was discontinued by Oracle, from your comments I gather you are using a MIDlet which is suboptimal for RIM. Currently my best (albeit non-objective) recommendation is that you migrate to Codename One which is actually supported unlike LWUIT. – Shai Almog Jun 13 '13 at 11:45
  • Thanks Shai for your comment.. – Parvathy Mohan Jun 30 '13 at 18:00

1 Answers1

1

You need to work with preprocessor statements - this code work with simulator.

In additional you need to do two things:

  1. press right click on your project->Properties->Ablities->Add-> in ability name insert name like touch.

  2. in code, in case that you want that your device react specific to touch you need to do something like that:

//#ifdef touch
    .....
 //#else
//#    .....
//#endif
blay
  • 464
  • 9
  • 23
  • Hi, I am not clear about this. I am using eclipse and bb-ant-tool. Along with LWUIT 1.5 UI_RIM_Touch.jar. I am building the project using bb-ant-tool and it created jar first and then convert to cod files. – Parvathy Mohan May 20 '13 at 05:58
  • In this code we test our code on emulator 9900 to check the app.Also we work with NetBeans but i does not think that it be diffrent. – blay May 20 '13 at 06:14
  • I have used UI_RIM_Touch.jar. So do you think, we need any other settings to make it touch? because it was working well in blackberry curve 9380. – Parvathy Mohan May 20 '13 at 07:05