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


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
Developer
Posts: 354
Registered: ‎06-05-2013
My Device: Blackberry Z10
My Carrier: Vodafone

Re: Static map API

yes he is not adding ";deviceside=false;ConnectionType=< >" at the end of url
Contributor
Posts: 45
Registered: ‎07-09-2013
My Device: Blackberry 9220
My Carrier: Airtel

Re: Static map API

I am using below that code.I got class cast exception....Pls suggest me how to view google map in blackberry application?

 

 

httpConn =(HttpsConnection)Connector.open("http://maps.googleapis.com/maps/api/staticmap?center=New+York,NY&zoom=13&size=100x100&key=AIzaSyCZ69... );
int rc = httpConn.getResponseCode();
Dialog.alert("response:" + rc );
if (rc != HttpsConnection.HTTP_OK) {
Dialog.alert("HTTP response code: " + rc);
}
InputStream input = httpConn.openInputStream();
byte[] dataArray = IOUtilities.streamToBytes(input);
googleImage = Bitmap.createBitmapFromBytes(dataArray, 0, -1, 1);
BitmapField bmf= new BitmapField(googleImage);
add(bmf);
}
catch (IOException e)
{
e.printStackTrace();
}

Contributor
Posts: 45
Registered: ‎07-09-2013
My Device: Blackberry 9220
My Carrier: Airtel

Re: Static map API

I am using this code .But I got Application registery error.Please tell me how to solve that?

 

 

String a="http://maps.googleapis.com/maps/api/staticmap?center=New+York,NY&zoom=13&size=100x100&key=AIzaSyCZ69...
VerticalFieldManager manager = new VerticalFieldManager(VerticalFieldManager.VERTICAL_SCROLL);
BrowserField browserField = new BrowserField();
browserField.requestContent(a);
manager.add(browserField);
add(manager);

Developer
Posts: 354
Registered: ‎06-05-2013
My Device: Blackberry Z10
My Carrier: Vodafone

Re: Static map API

at end of url add this ;deviceside=false
Contributor
Posts: 21
Registered: ‎07-10-2013
My Device: Blackberry simlator 9220
My Carrier: Airtel

Re: Static map API

Its not working....

Contributor
Posts: 45
Registered: ‎07-09-2013
My Device: Blackberry 9220
My Carrier: Airtel

Re: Static map API

Am using that..that time also is not working

Developer
Posts: 354
Registered: ‎06-05-2013
My Device: Blackberry Z10
My Carrier: Vodafone

Re: Static map API

[ Edited ]

add ;deviceside=false;ConnectionType={Removed}

 

 

Developer
Posts: 354
Registered: ‎06-05-2013
My Device: Blackberry Z10
My Carrier: Vodafone

Re: Static map API

[ Edited ]

use hyphen ( -) instead of ( _ ) in {Removed}

 

 

Highlighted
Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: Static map API

[ Edited ]

Just to coonfirm, to use BIS-B you need to have been approved by BlackBerry.  One of the conditions of approval is that you do not publically disclose how you use BIS-B. 

 

There is more here:

http://developer.blackberry.com/java/documentation/intro_networking_1984362_11.html

 

To get access to BIS-B, you can apply for PUSH, as documented in the page above. 

 

Now getting back to this problem.

 

@developer_aman_arora.  Not trying to be rude, but I suggest you stop providing "quick fix" solutions to these (and other) questions and instead concentrate on resolving your own problems, such as this one:

http://supportforums.blackberry.com/t5/Java-Development/Encryption-Decryption-in-Blackberry/m-p/2462...

 

@sparon - there are no quick fix solutions to networking on the BlackBerry.  You need to do some research and understand the problem yourself.  Don't cut and paste in other people's code - in this area it will go wrong and it will cause you grief.  There is a lot of very dodgy BlackBerry networking code out there that will only work in specific circumstances. 

 

See my previous post for how I recommend you proceed.