Map API

Nutiteq Maps Lib SDK enables developing advanced mobile mapping applications.
Platforms: Android, RIM BlackBerry, Java ME (J2ME)
Download maps API SDK »
Untitled Document

Products

» View demos
» Downloads

Latest news

Last at Tue, 6 Dec 2011 18:37:53
Topic: New BlackBerry sample app
See more news »

BlackBerry MapScreen disables DEFAULT_CLOSE action

2 replies [Last post]
nextbusinfosys
User offline. Last seen 2 years 16 weeks ago. Offline
Joined: 07/07/2009

I have had some success at integrating the map library but I cannot seem to figure out why the default close action is disabled. If I open the menu I can select "Full Menu" and then click "Close", but the default (ESC key) close action doesn't work.

I also tried super(DEFAULT_CLOSE) in the example MapScreen constructor but that didn't help.

Anyone know how to enable the standard BlackBerry escape-key close ?

Thanks for any advice.

jaak
User offline. Last seen 1 day 11 hours ago. Offline
Joined: 06/19/2008

Maybe adding this method helps:

    public boolean onClose() {
        map.stopMapping();
        Dialog.alert("Goodbye!");
        System.exit(0);
        return true;
    }

It works fine for me without this DEFAULT_CLOSE parameter for super() call.

Your issue could be also if you catch keyDown/keyUp events in your code, and return true, which means that you will catch all keys, including ESC keypresses (also green/red buttons etc). You may want to return "super.keyDown(keycode, time)" instead.

/JaakL

nextbusinfosys
User offline. Last seen 2 years 16 weeks ago. Offline
Joined: 07/07/2009

Thanks - I already had that method but I needed to pass along the overridden keyUp/keyDown methods to the super.