Welcome to the Official BlackBerry® Support Community Forums. This is your resource to discuss support topics with your peers, and learn from each other. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Web and WebWorks Development

Reply
Developer
Aepfel
Posts: 22
Registered: 11-18-2009
Accepted Solution

GIFs, Maps and other Features

[ Edited ]

Hi All,

 

I'm just about to start developing a Widget for BlackBerry.BeforeI put too much effort in finding some things myself, I was hoping you might answer me some questions:

 

1. Do Widgets support animated gifs? (I ran a first prototype on blackberry 9500 simulator which doesn't animate )

 

2. Did someone build a Widget with a maps? Is it possible to view the blackberry map !within! a Widget (like iPhone Apps showing the integrated Google map)  or is it only possible to open the map application with invoke() ?

If  not , did someone try to run any dynamic map(JavaScript)  API in a Widget (like Googles or Yahoos)? Does it work or is it more wise to rely on static maps?

 

3. As far as I understood, Widgets will run on phones with OS 5.0 Version. Can someone tell me when phones with this OS version will be available on US and on EU market?

 

4. I have issues with the Blackberry simulator. Everytime I override a Widget with a new version, I get a null pointer exception. (JVM Error 104). Is there a work around or do I have to reset the simulator everytime before I upload my widget?

 

 

#Blackberry 9500 Simulator

#Windows XP Pro

Please use plain text.
BlackBerry Development Advisor
tneil
Posts: 3,555
Registered: 10-16-2008
My Carrier: Rogers

Re: GIFs, Maps and other Features

I'll do my best to answer your questions

 

1. Do Widgets support animated gifs? (I ran a first prototype on blackberry 9500 simulator which doesn't animate )

Yes they should work. We have found that with the beta, some simulators/devices display them fine while others do not.  We are trying to get to the bottom of the issue.

 

 

2. Did someone build a Widget with a maps? Is it possible to view the blackberry map !within! a Widget (like iPhone Apps showing the integrated Google map)  or is it only possible to open the map application with invoke() ?

If  not , did someone try to run any dynamic map(JavaScript)  API in a Widget (like Googles or Yahoos)? Does it work or is it more wise to rely on static maps?

At the moment there is no way to embed BlackBerry maps into your HTML content.  I would suggest using Google Static maps as an alternative for an embedded view.  As you stated, Invoke is another option

 

 

3. As far as I understood, Widgets will run on phones with OS 5.0 Version. Can someone tell me when phones with this OS version will be available on US and on EU market?

The list of existing in-market devices that will receive OS 5.0 has not been published.  You can always check out some of the outside blogs to get an idea of rumors of what devices would be receiving this upgrade. :smileyhappy:

 

4. I have issues with the Blackberry simulator. Everytime I override a Widget with a new version, I get a null pointer exception. (JVM Error 104). Is there a work around or do I have to reset the simulator everytime before I upload my widget?

Typically resetting the simulator is your best bet.  However, what I do when I am building a widget is load all the content for my widget from a web server I have locally running on my machine.  I do this by setting the start page to be the URL of the page on my web server. That way I only ever have to compile a new widget when I make changes in my configuration document.  Then when I want to deploy to a real device, I change the location of the start page to be local and re-package my widget.

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Please use plain text.
Developer
Aepfel
Posts: 22
Registered: 11-18-2009

Re: GIFs, Maps and other Features

Thank you a lot. I think your answer to question no 4 sounds like a really good idea, but it does not work for me.

 

I defined the start page of the Widget in the config.xml like that:

 

 

 

'<content src="http://123.123.123.123/WidgetFolder/index.html" />'

 

 

 

And I get this error: "Could not select proper Transport Descriptor for: http://.../index.html"

 

I can open the Widget URL in the simulators browser though (but of course I can't use Widget API then).

 

Any hints?

Please use plain text.
BlackBerry Development Advisor
tneil
Posts: 3,555
Registered: 10-16-2008
My Carrier: Rogers

Re: GIFs, Maps and other Features

Did you add the domain of your start page in the white list <access> element..

 

For example using your IP:

 

<access uri="http://123.123.123.123" subdomains="true"/>

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Please use plain text.
Developer
Aepfel
Posts: 22
Registered: 11-18-2009

Re: GIFs, Maps and other Features

[ Edited ]

Yeah I have used the wildcard anyway but even with the specific domain it doesn't work.

 

EDIT: haha...ok. With my local IP it does work. It does not with my local computers hostname.

 

Thank you! I come to a point where working on the Widget gets fun =)

Please use plain text.
Developer
davidmccormack
Posts: 168
Registered: 11-01-2008
My Carrier: Meteor (Ireland)

Re: GIFs, Maps and other Features

Wow! Your 4th point there is a top tip - extremely useful! Speeds up the edit, build, test cycle dramatically by taking out the build stage completely. Thanks!

 

Q: Will this continue to be supported when the Widget API comes out of beta? If so, it offers an interesting deployment model whereby all that gets installed on the end user's device is the config.xml and everything else is dynamically downloaded on-the-fly from an app vendor's server. This means you never have users on outdated versions, etc. Very cool indeed.

Please use plain text.
BlackBerry Development Advisor
tneil
Posts: 3,555
Registered: 10-16-2008
My Carrier: Rogers

Re: GIFs, Maps and other Features

[ Edited ]

Q: Will this continue to be supported when the Widget API comes out of beta? If so, it offers an interesting deployment model whereby all that gets installed on the end user's device is the config.xml and everything else is dynamically downloaded on-the-fly from an app vendor's server. This means you never have users on outdated versions, etc. Very cool indeed

 

Absolutely this will still be supported.  We want to give you the flexibility to put your logic and content wherever you want.  If you want it all local, package it in the widget archive.  If you want it all remote, then just have your config point to a remote site.  You can then also blend what you want local and remote.  

 

It all then becomes up to you on what works best for your application experience for online/offline and load time and network latency.

 

You can even have remote pages that pull in local images, css and JavaScript files... For example, I could serve up a page from my website that has an image tag in it like this:

 

<img src="local:///myimages/myimage.png"/>

 Or a script tag that looks like this:

 

<script type="text/javascript" src="local:///myscripts/script.js"></script>

 

 

The same would hold true for CSS and other types of content.  That way if you have common images/js/css across your application, you can put it all local in the widget, and only serve up the HTML content from the server.

 

It provides for a pretty flexible architecture.

 

Hopefully that gives you some more ideas of some cool combinations :smileyhappy:

 

 

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Please use plain text.