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
PaoloLim
Posts: 21
Registered: ‎07-16-2008
Accepted Solution

External file/source for an application's config?

[ Edited ]

Hello, I am in need of guidance.  My application on the device is simple: it dials out feature codes that will be handled by a server.  Currently, all the feature codes are hard coded in the app. I would like a way to make it so that these codes can be updated on the fly without having to recompile, re-sign and redistribute the entire app.  What would be the best way to get this done and what apis should I look into?

 

Edit: Developing for Blackberry Handheld Software 4.1 with JDE 4.1 for 7000 series.

Message Edited by PaoloLim on 07-28-2008 09:42 AM
Please use plain text.
Developer
kzettel
Posts: 120
Registered: ‎07-16-2008

Re: External file/source for an application's config?

I would suggest using a web interface to download the file from you web server and then parse the response into your properties.  An example of this is in the HttpConnection APIs and alse in the knowledge base article How to establish an Http Connection. Depending on your app you may want to still bundle a default properties file or you may want to create some sort of setup wizard which downloads the most up-to-date file when the application is first started.
Kurt Zettel | Chief Architect | Metova
www.metova.com
Please use plain text.
Developer
PaoloLim
Posts: 21
Registered: ‎07-16-2008

Re: External file/source for an application's config?

Thank you for your reply Kurt,

 

I am wondering though, will this method have any restrictions to it from IT policies or anything to do with BES, something out of the users' hands?  There have been a few things I haven't been able to implement due to those, and I would like to avoid things that have such constraints. 

Please use plain text.
Developer
kzettel
Posts: 120
Registered: ‎07-16-2008

Re: External file/source for an application's config?

This method could have restrictions and will most likely have a security prompt the first time it makes an http connection.  A BES admin could restrict download abilities or add firewall constraints which would restrict this. 

 

Alternatively, if you want to avoid http and already have a mailing list you could mail the configuration out and have a message listener which updates your config.  This would require that your application be signed and it also could be restricted by a BES admin or permissions and could have a security prompt if a device is configured to prompt for message connections.

 

Basically, if you want to get third party data, a BES admin could restrict it.  There isn't really a way around that if you want your application to have up-to-date data. 

 

Kurt Zettel | Chief Architect | Metova
www.metova.com
Please use plain text.