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

Native Development

Reply
Developer
step_jac
Posts: 89
Registered: ‎05-31-2012
My Device: BlackBerry Playbook
My Carrier: Bell
Accepted Solution

App Version info at runtime?

Hello BB NDK Forums,

 

After much scouring the NDK headers and docs, I haven't been able to find a way to query app version information at runtime. Does such a facility exist currently? Parsing the App's manifest seems like an alternative but not ideal.

 

Thanks!

 

Stephane

Please use plain text.
Developer
peter9477
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: App Version info at runtime?

There is no supported API to do this yet, so for now parsing the app/META-INF/MANIFEST.MF file is definitely the way to go. The system retrieves the info from there anyway, so you might think of it as just "going straight to the source".

Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Please use plain text.
Developer
alopix
Posts: 381
Registered: ‎04-10-2011
My Device: Z10 LE & PlayBook

Re: App Version info at runtime?

Would be really neat if they added such APIs. Was looking for them yesterday and it's possible with the other SDKs (at least WebWorks and Adobe AIR).
-----------------------------------------------------------------------------
Check out my apps in the BlackBerry World
Visit my developer blogs /dev/alopix and /home/alopix
BBM Channel: C0047B612
Please use plain text.
Developer
peter9477
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: App Version info at runtime?

I'm pretty sure AIR parses its own application.xml file, and I suspect WebWorks does the same.

There is actually likely to be such an API, with info richer than what those two provide right now, but from what I can see of it (undocumented for now) it's very much in flux, so there's no point discussion that just yet.

Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Please use plain text.
Developer
alopix
Posts: 381
Registered: ‎04-10-2011
My Device: Z10 LE & PlayBook

Re: App Version info at runtime?

They do parse the config file, but nevertheless, an official API is needed and RIM should know that devs want them (even though they probably already planed it :smileywink:
-----------------------------------------------------------------------------
Check out my apps in the BlackBerry World
Visit my developer blogs /dev/alopix and /home/alopix
BBM Channel: C0047B612
Please use plain text.
Contributor
xoorath
Posts: 13
Registered: ‎04-11-2012
My Device: Blackberry Playbook, Blackberry 10 Dev Alpha
My Carrier: None

Re: App Version info at runtime?

peter9477, your post already helped me. I needed this information as well.

+1
Please use plain text.