1

I didn't find any similar posts when searching previous questions.

I am developing a game in MIDP for Blackberry Storms. I am using a BlackBerryGameCanvas and using the callback function touchEvent. As an argument, I'm getting an instance of TouchEvent But I want to listen for a TouchGesture like Swipe. But after doing swipe in simulator touch screen I am getting null as result:

public void touchEvent(TouchEvent message) {
    TouchGesturenow = message.getGesture();

    //always getting null as a result

    //according to API when user does not perform any gesture 
    //operation then it would return null otherwise reference 
    //but here I have performed a swipe gesture then also it is returning null.

}

If it is not possible at all then I have to use

getMovePoints(int touch, int[] x, int[] y, int[] time) ..and some calculation .

Can anybody confirm for me: does Swipe TouchGesture not work with Blackberry Storm?

gnat
  • 6,213
  • 108
  • 53
  • 73

1 Answers1

0

Per answer in other SO discussion, simulation of swipe gestures for BB Storm seems to be quite complicated: Blackberry Storm Emulator - TouchGesture events not firing, how to get a Swipe to work?.

Most likely reason for getting null (meaning "this event is not a gesture" per BlackBerry API) is that you just didn't do swipe in simulator touch screen well enough for emulator to recognize it as swipe.


I am developing a game in MIDP for Blackberry Storms.

For the sake of precision - TouchGesture has nothing to do with MIDP - there's simply no such thing in MIDP 2 API. Nor there is touchEvent in MIDP API.

All the API and features you use appear BlackBerry-specific: BlackBerryGameCanvas, TouchEvent etc. Again, this issue in general has nothing to do with MIDP .

Community
  • 1
  • 1
gnat
  • 6,213
  • 108
  • 53
  • 73