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
Developer
Posts: 56
Registered: ‎01-11-2009
My Device: Not Specified
Accepted Solution

Mapfield hangs if BB Maps not installed

 

I thought that I would try this as a new thread:

 

I have verified that there is a dependency between the MapField class and the BB Maps application.

 

If BB Maps is uninstalled, then Mapfield constructor hangs and vice versa.

I have done this experiment on the Storm under 4.7 and the 8330 under 4.5. 

I found this problem originally on the AT&T Bold since it comes without BB Maps installed.

 

This is a HUGE software architecture problem in my opinion.

 

More information anyone?

What is the work-around? - make all of our users install BB Maps?

 

I would appreciate any comments or verifications.

 

Olaf

 

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

Re: Mapfield hangs if BB Maps not installed

You can programmatically detect if BB Maps is installed, or not.

 

We actually support both BB Maps and Google maps, since some folks cannot get BB Maps installed on their device (carrier restriction).

 

You detect the presence of the program like this:

 

        m_googleHandle = CodeModuleManager.getModuleHandle("GoogleMaps");
        m_bbHandle = CodeModuleManager.getModuleHandle("net_rim_bb_lbs");

If the handle is > 0, the app is installed.

 

Developer
Posts: 56
Registered: ‎01-11-2009
My Device: Not Specified

Re: Mapfield hangs if BB Maps not installed

Hi RexDoug...

 

Three interesting points about your reply:

1. I take it as an implicit verification of what I found.

2. You are supporting Google Maps - I didn't know that there was a Java API for Google Maps (Android excepted).

How? Am I missing something?

3. If neither BB Maps or Google Maps are missing do you ask the user of your app to install one of them?

 

Actually 4:

4. What carriers and how do they restrict BB Maps? For example, AT&T Bold does not come with BB Maps but I installed on the device successfully.

 

Olaf

 

 

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

Re: Mapfield hangs if BB Maps not installed

There is no actual BB API for Google maps - I launch the program using ApplicationManager.

 

There is a hack to execute Google MAps here:

 

http://www.blackberryforums.com/developer-forum/143263-heres-how-start-google-maps-landmark.html?hig...

 

If neither are installed, we put up a dialog instructing the user to install one or the other.

 

You may be able to install BB Maps on the AT&T device, but in my experience the AT&T theme still hides the icon and restricts the app from being started by the user (although you can still use the MapField if you are on 4.6 or higher).

 

Developer
Posts: 56
Registered: ‎01-11-2009
My Device: Not Specified

Re: Mapfield hangs if BB Maps not installed

Thanks RexDoug...

 

I do appreciate the voice of experience.

 

Olaf 

Developer
Posts: 56
Registered: ‎01-11-2009
My Device: Not Specified

Re: Mapfield hangs if BB Maps not installed

One more thought on the subject:

 

Is it possible to build your own app with the missing module (obtained from a BB Maps app)?

 

 

Developer
Posts: 56
Registered: ‎01-11-2009
My Device: Not Specified

Re: Mapfield hangs if BB Maps not installed

Does anyone have knowledge of this situation being raised to RIM's issue tracker?

 

The basic issue of a class in the SDK being dependent on the presence of an application for proper execution is a mistake.