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
Highlighted
Developer
Posts: 37
Registered: ‎07-17-2008
My Device: Not Specified
Accepted Solution

Configuration file

Guys, I need to pick your brain if you don't mind.

 

We have an application that connects to a specific server. The server information is configurable but the user must do it inside the application. The IT team wants to deploy the application OTA without the need to ask the user to change the server or without having to configure that themselves. My question is, do you know of a way we can make the information configurable so it changes when the user install the application? Something similar to a .ini file that has the server information and that gets installed with the application. The IT team will not have access to the code hence they cannot recompile the application with the new server information. The ".ini" file would be the best option because the IT team would just need to change it but I am not sure if this is feasible. 

 

Thank you 

BlackBerry Development Advisor
Posts: 15,724
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: Configuration file

There are a number of ways this can be done, here are some examples.

 

1.  If you are installing using the browser and are using BlackBerry handheld software version 4.3.0+, you can add custom attributes to your jad file.

 

How To - Programmatically read the attributes of a JAD file
Article Number: DB-00638

http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800708/800646/How_To_...

 

2.  You could email configuration information to the user.  The application could be listening for a specially crafted email message (certain subject, body, etc.) and read the configuration information from it.

 

3.  If the BlackBerry handhelds have micro SD cards, the configuration information could be copied/stored/read from the micro SD card.

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Developer
Posts: 37
Registered: ‎07-17-2008
My Device: Not Specified

Re: Configuration file

Very interesting. Good stuff, Mark.

 

Thank you 

New Developer
Posts: 47
Registered: ‎07-17-2008
My Device: Not Specified

Re: Configuration file

What are the options if the application is deployed using BES
BlackBerry Development Advisor
Posts: 15,724
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: Configuration file

Options 2 and 3 are valid for pushing applications from a BlackBerry Enterprise Server. 

 

The use of the JAD file (option 1) is designed for when the user installs the application using the BlackBerry Browser.

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
New Developer
Posts: 47
Registered: ‎07-17-2008
My Device: Not Specified

Re: Configuration file

[ Edited ]

Can I ask a follwup question

This option for deployment on BES seem to be a bit complex, if the configuration changes.

Is there a simpler way to push a config file into BB using BES and read the file when the app. is launched (instead of sending through mail)?

For ex.

The app deployed in BB using BES neeeds a 'webservices URL + some additional info'. which may differ from deployment to deployment

 

 

 

Message Edited by kenendykumar on 08-21-2008 12:36 PM
BlackBerry Development Advisor
Posts: 15,724
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: Configuration file

You could also create a server side application that pushes the conifguration information to your BlackBerry application.  Have a look at the httppushdemo client and server samples included with the BlackBerry JDE for an example.

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
New Developer
Posts: 96
Registered: ‎07-26-2008
My Device: Not Specified

Re: Configuration file

For BES deployments, you may consider the use of IT Policies.  It seems to me that if you create a custom IT policy on the BES, and then have your app on the device look for properties in that policy - you could read the server connection settings from that policy.

 

On the deployment side, your BES admin would create/update that policy and push it out to the users who get the application.

 

If the device doesnt find the policy it reverts to its default behaviour of prompting the user.

 

( I havent tried it yet - but it is on my list of things to try to automate deployment)

 

 

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

Re: Configuration file

The approach suggested by ennova2005 was also recommended by one of the speakers at DevCon 2008.

 

Note that when I tried to use custom IT Policies in our pre 4.1 BES configuration, the custom IT Policies, with the exception of the Boolean ones, did not make it to the device.  But everyone is using BES 4.1 now aren't they!

New Contributor
Posts: 2
Registered: ‎06-24-2010
My Device: 1
My Carrier: 2

Re: Configuration file

Any chance of a code example of how you read the it policy? I haven't been able to figure that out?