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

Native Development

Posts: 19
Registered: ‎03-19-2012
My Device: playbook
My Carrier: movistar

APIs to access bar-descriptor.xml?

Hi.. Is there APIs to access bar-descriptor.xml? I'd like to add some parameters for my app. Is the file included in the final .bar?



Posts: 1,807
Registered: ‎04-28-2009
My Device: Z10 (STL100-4)-, Z10 (STL100-3)-, Z30 (STA100-5)-, Passport (SQW100-1)-, PlayBook (16GB)-
My Carrier: Verizon

Re: APIs to access bar-descriptor.xml?

No, an application's directory is read-only. You can't edit the bar-descriptor.xml after exporting a release bar and installing it on a device.
---Spends time in #blackberrydev on freenode (IRC)----
Three simple rules:
1. Please use the search bar before making new posts.
2. "Like" posts that you find helpful.
3. If a solution has been found for your post, mark it as solved.
--I code too much. Well, too bad.
Posts: 19
Registered: ‎03-19-2012
My Device: playbook
My Carrier: movistar

Re: APIs to access bar-descriptor.xml?

Hi thanks for the reply. I actually only need to read the bar-descriptor.xml file, to retrieve parameters that are added from the IDE or whatever they use. So it's probably not even a filesystem read, just access to wherever the data is stored (since I assume the file is read anyways when the app starts). I'm wondering if there's APIs to read those values without having to roll my own xml parser.

New Contributor
Posts: 6
Registered: ‎12-13-2011
My Device: Playbook
My Carrier: .

Re: APIs to access bar-descriptor.xml?

use POSIX file API's and libxml2 (included in NDK)

the bar-descriptor.xml file is located within the application sandbox at:




where $cwd is the current working directory - you can use the function "getcwd()" for that.

you will need to link against libxml2 - then you should have everything you need Smiley Happy

// Aaron Ardiri
Mobile 1UP - mobile games