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
malcolm
Posts: 41
Registered: ‎08-01-2008
My Device: Not Specified

Any way to reference constants in newer version of the OS without loosing backwards compatibility?

I'd like to keep my app building and running on everything from 4.3 upwards. The new permissions that have been added in 4.6 mean this is kind of tough - I'd like the part of my code that requests relevant permissions to check which version it is running on and request, say, ApplicationPermissions.SCREENSHOT on <= 4.5 and ApplicationPermissions.RECORDING on >=4.6. However obviously when I compile in the 4.3 JDE the RECORDING constant is unknown, and when I compile in the 4.6 JDE I lose compatibility with earlier devices.

 

Is there any way to compile and ship a single build of the application which will do what I want? If not, what are the likely detrimental effects of continuing to use/request the deprecated constants in versions 4.6 and above? Shipping different versions of the software is a huge pain.