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
Posts: 46
Registered: ‎07-12-2008
My Device: Not Specified

Re: Application Permissions

PERMISSION_MEDIA does not show up....I'm targeting 4.2.1, so I'm guessing this was new in 4.3.0 (I see it in the 4.3 javadocs but not 4.2.1).  Is it possible to request this permission from a 4.2.1 app?

 

I'm still interested in solving this problem in the general case:  Given a RIM CLDC application, how can I programatically ensure the user only sees one permissions popup?

 

The technique I've used up until now has been trail and error:  When I encounter a permissions popup, I hunt it down and try to ask for its permissions.  Ideally I could programatically determine which API's my application needs to ask permission for, and then ask for those permissions.

 

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

Re: Application Permissions

PERMISSION_MEDIA was added in version 4.3.0 of the BlackBerry API set.

 

The ApplicationPermissionsManager can be used to query the permissions available to your application.  Based on this you can decide if your application requires further permissions and request the additional ones that are required.

 

Version 4.5.0 of the BlackBerry API does prompt a user to grant an application trusted access if it does not have the permissions it requires.  If they choose yes, the required permissions should be enabled without any actions by the application.  So this should make it easier for users in the future.

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: 46
Registered: ‎07-12-2008
My Device: Not Specified

Re: Application Permissions

With the 4.5 API, will this trusted access prompt always be shown when an application is installed?  Or is it similar to the ApplicationPermissionsManager where I have to pop it up from my application?

 

 

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

Re: Application Permissions

It is shown when the application first runs, which could be right after installation if it is an auto-start application.  It is shown automatically and no action is required by an application.
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: 46
Registered: ‎07-12-2008
My Device: Not Specified

Re: Application Permissions

I've been doing some testing against the Bold simulator that comes with JDE 4.6, with security enabled, and I'm not getting the "Would you like to trust this app?" prompt.  I've compiled & signed my app, and I'm loading into the simulator via the Simulator File-->Load Java Program menu option.

 

My app tries to read the device phone number and at that point I get a popup specifically for the phone number.  This is the type of thing I'm trying to avoid with either the 4.5 "Would you like to trust this app" prompt or the pre 4.5 ApplicationPermissions prompt.

 

Is there something in the jad file that will trigger "Would you like to trust this app?" upon app installation?  Or maybe my simulator isn't configured correctly?

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

Re: Application Permissions

Loading an application in this way may not trigger the prompt.  It should be similar to loading an application using javaloader on a real BlackBerry device, which shouldn't result in a prompt either if you are loading the cod files directly.  You can install the application "OTA" using the BlackBerry Browser of the BlackBerry Simulator and you should receive the prompt.

 

Installing using any non javaloader method should let you see the prompt, however please note that the BlackBerry Simulator does not support loading an application using the Application Loader wizard of Desktop Manager.

 

How To - Load applications onto a BlackBerry smartphone
Article Number: DB-00041

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

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: 46
Registered: ‎07-12-2008
My Device: Not Specified

Re: Application Permissions

I've tested on a real Bold (4.6.0.162, platform 4.0.0.155) with an OTA install and I'm still not seeing this prompt.  I wiped the handheld before installing my app.  Our application reads the phone number and when this occurs I get the individual prompt for that.

 

Developer
Posts: 204
Registered: ‎07-09-2009
My Device: Not Specified

Re: Application Permissions

My app checks for available space on all filesystems, and it is asking for permission multiple times even though I check "don't ask for file" and "don't ask for File Connection" the first time.

 

I do a file registry root enumeration followed by a FileConnection on each root just to check free space.  On my phone there are two roots, "SDCard" and "store", and it asked me for permission 2 or 3 times the first time I ran the app, and then once when I javaloaded a new version, and then not at all for subsequent runs.

 

How can I get it to ask just once?

 

 

Question 2:

 

I am building with 4.2.1 for best compatibility, but that PERMISSIONS_MEDIA isn't until 4.3, right?  Will I be OK without that permission if all I'm doing is checking filesytem sizes?

 

I'd appreciate clarification on the difference between _MEDIA and _FILE permissions.  If I am writing or accessing NON-media files on the media card, is that governed by _FILE or _MEDIA, or both?  And if I'm writing or accessing media files on internal store, is that governed by _FILE, _MEDIA, or both?

 

 

Thank you!

 

 

Highlighted
New Member
Posts: 1
Registered: ‎08-07-2012
My Device: blackberry 9000
My Carrier: Globe

Re: Application Permissions

[ Edited ]

how can i stop the notification "the application has attepted to open a connection to location inside and outside the firewall which is not allowed by ur IT policy"  to pop out coz i cant go to settings