Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
New Developer
Posts: 8
Registered: ‎02-20-2009
My Device: Not Specified

Blackberry storm Invoke Maps not working

Hi,

 

I hope someone can help me with a problem on a storm.

 

I have an application which was developed using JDE 4.2 which launches maps using the Invoke api.  I have code signed it and installed OTA to blackberry Pearl and to Bold and it works perfectly on both devices.  The application does not work however on Blackberry Storm and I need to get it to work.  I tried to debug the problem using JDE 4.7with the storm simulator and get the same problem as on the actual storm device i.e. the launch maps bit is not working.  When I debug, I get as far as the Invoke line in the code where the MapsArguement is correctly formatted.

 

I tried the sample code that comes with the 4.7 JDE (i.e. blackberrymapsdemo) and I used both the Mapview and the location document calls to the Maps application.  Same result ... the sample code does not launch the Maps application properly.  Instead, I get lines and lines of "Source code is not available" and the processing appears to stop at line 680 in Calling Method Invoke.invokeApplication(int,ApplicatioArguements).  The Exception thrown detail message is "Could not start internal application".

 

 

The code looks like this:

 

String location = "<lbs>" + " <location lat='"+String.valueOf((int)lat)+"' lon='"+String.valueOf((int)lon)+"' label='" + ticode +"' description=''/>" + "</lbs>";                   

 

Invoke.invokeApplication(Invoke.APP_TYPE_MAPS, new MapsArguments(MapsArguments.ARG_LOCATION_DOCUMENT, location));

 

This code works just fine on bold & Pearl but not on Storm. Can someone please help me understand what is going on?

 

Thank you

 

Adrian

Developer
Posts: 4,764
Registered: ‎07-21-2008
My Device: Not Specified

Re: Blackberry storm Invoke Maps not working

This is a known problem with OS 4.7.0.65 and 4.7.0.75 - you cannot invoke Maps without getting this exception.

 

Don't know of this has been fixed or not, maybe one of the RIM guys can comment.

 

Our work-around (for the time being) is to install Google Maps and call this instead.

 

 

 

New Developer
Posts: 8
Registered: ‎02-20-2009
My Device: Not Specified

Re: Blackberry storm Invoke Maps not working

Thank you for your reply.  I have not looked at Google maps but I will now.

 

Adrian

 

New Developer
Posts: 8
Registered: ‎02-20-2009
My Device: Not Specified

Re: Blackberry storm Invoke Maps not working

OK - as blackberry storm seems to have a problem with its blackberry maps api, on Rex Doug's advice I decided to have a look at Google maps.  Installed it ok and got code to launch Google maps from my blackberry application and display a location with a pin and label etc.  

 

The code I used was worked out from

http://www.blackberryforums.com/developer-forum/143263-here-s-how-start-google-maps-landmark.html. 

Many thanks to RemyJ for this. The format of the calls to the google maps application is like this:

 

http://gmm/x?action=LOCN&a=@latlon:35.0000,-105,0000&title=something&description=something

 

Having got this far, I though my problems were solved.  Simple matter now to just find the other actions to format other calls and I'm done. Hah ... more fool me.  Seems like this api information is one of the best kept secrets on the web ... the details on this "google maps for blackberry" api are not available anywhere. 

 

But with the info above it ought to be possible for someone with knowledge of google maps to figure out some other possible action types via a trail and error process. Anyone got any suggestions as to what calls might work?  e.g.

http://gmm/x?action=DEST  or maybe http://gmm/x?action=PATH.

 

I'm a bit of a novice when it comes to blackberry app development - when I build and run and test on simulator, the simulator takes 3-5 minutes to load.  Is there a way to halt the simulator, change source code, build and run again with the simulator shutting down (1 min) and restarting (3-5 mins).  Trying to figure out api calls when every code change takes this amount of time is very frustrating.

 

Any help would be much appreciated on either of these two issues.

Thanks

Adrian

 

 

Developer
Posts: 37
Registered: ‎04-02-2009
My Device: Not Specified

Re: Blackberry storm Invoke Maps not working

 I am facing a problem with the Google maps on Blackberry Storm. I am getting ArrayIndexOutOfBoundsException when I invoked

http://gmm/x?actition=LOCN&a=@latlon:35.0000,-105.0000&title=mytitle&description=mydesc

 

I have google maps 3.0.2 on the device.

I am struck. any help is greatly appreciated

 

Zorro 

Developer
Posts: 177
Registered: ‎01-21-2009
My Device: 9900
My Carrier: Vodafone

Re: Blackberry storm Invoke Maps not working

@ Zorrorulz:

 

I have also encountered this problem. I was able to track it down to a bug in Google's code with respect to how they do things in their paint method. It appears that when you launch google maps in this manner, they assign a seperate object to it rather than inserting it into an array of pin objects. For some reason they track the number of items they need to paint instead of just calling array.length. Go figure. Thus when they try to index into their pin array it throws an ArrayIndexOutOfBoundsException. This in turn causes the paint routine to prematurly exit before the top layer is painted ( +/-  touch buttons, left right touch buttons ). The exception is caught before the dispatch level on the actual device, but you will see the top layer missing. Of course if you click on where the top layer items are supposed to be, you will still get the resulting actions (zoom in, zoom out etc). 

 

Unforunately there's not really anything you can do. 

 

 

Developer
Posts: 37
Registered: ‎04-02-2009
My Device: Not Specified

Re: Blackberry storm Invoke Maps not working

Huh.. Thats weird.

 

I cant get the BlackBerry Maps to work on Storm and the google maps also isnt functioning with LAT and LNG params.

Is there a way that we can invoke maps on BlackBerry Storm

 

I am struck 

New Developer
Posts: 8
Registered: ‎02-20-2009
My Device: Not Specified

Re: Blackberry storm Invoke Maps not working

 

Invoking Blackberry maps from my application on the BB Storm issue was resolved for mewhen I upgraded the OS to this one:

 

9500_omadrmEFIGS_Dutch_PBr4.7.0_rel153_PL4.0.0.136_A4.7.0.109.exe

 

Regards

 

Adrian

Developer
Posts: 37
Registered: ‎04-02-2009
My Device: Not Specified

Re: Blackberry storm Invoke Maps not working

Thanks Adrian. Can we test this on simulator before loading to the actual device???

If so, i would appreciate if you can tell me how to go about it? 

Highlighted
Developer
Posts: 56
Registered: ‎07-14-2008
My Device: Not Specified

Re: Blackberry storm Invoke Maps not working

I've been able to avoid the error in 3.0.2 by removing the "@latlon:" tag, as in:

 


uepd.append("a", l.getLatitude()+","+l.getLongitude());

 

The other option is to put in the actual address, as in:

 

uepd.append("a", "1600 Pennsylvania Avenue, Washington DC");