09-24-2008 03:34 AM
I developed an application whose code has been signed. i loaded it to device and then gave permissions via settings->advanced->applications->myApplication->P
09-24-2008 02:54 PM
Are you referring to the screen that prompts you to allow the connection? This prompt is from the firewall, which can be enabled or disabled under Options, (Security Options), Firewall. Note that this setting is locked as enabled by default for BlackBerry Enterprise Server users.
09-25-2008 06:12 PM
Is there a way to programatically check to see if the firewall is enabled?
I'm using the ApplicationPermissionsManager to ask for various permissions the first time my app launches. It seems that on devices where the firewall is enabled, I need to ask for the PERMISSION_INTERNAL_CONNECTIONS in order to write files using the FileConnection API. I've found that I cannot just blanket ask for this permission, as some devices will never save it.
09-26-2008 10:35 AM - edited 09-26-2008 10:35 AM
Can you elaborate on this?
I've found that I cannot just blanket ask for this permission, as some devices will never save it.
There are no APIs that allow you to directly query if the firewall is enabled.
09-26-2008 01:03 PM
I use the FileConnection API to save some data and write some log files in our application. On a device configured for a BES, I found that I have to request the PERMISSION_INTERNAL_CONNECTIONS in order to do this. Otherwise the user gets a prompt, "The application has requested a file connection to ///store/home/user/appname/". We use HTTPS web calls as well as bluetooth, so to make the user experience better, I added logic at startup to check the application permissions, and if we did not have what we need, to use the ApplicationPermissionsManager to ask for them.
My original implementation asked for PERMISSION_INTERNAL_CONNECTIONS, but on one specific device, and O2 8800 (126.96.36.199), this permission never gets saved, so our app would end up prompting the user every time the application was run.
To work around this one problem, I added logic that only asks for the PERMISSION_INTERNAL_CONNECTIONS if the Desktop IPPP service book is found. Some other posts in the forums indicate that this is a way to determine if the device is capable of making and MDS connection.
Now we come to the firewall issue. With the firewall turned on, my application needs to ask for internal connections in order to access the FileConnection API, so my thought was to check if the firewall is enabled. Even if we could check for the firewall, I don't think this will work as I've found some devices that will still prompt for "The application has requested a file connection to ///store/home/user/appname/" when the firewall is enabled, even after I ask for and save the internal connections permission. The device was a Verizon 8830 (188.8.131.52, 184.108.40.206).
At the end of the day, I don't want our users to have to deal with all of these prompts for accessing things. Even with code signing and using the ApplicationPermissionsManager, we're still discovering situations where our users will still be presented with various kinds of RIM dialogs. Most of the time these will generate a support call, which is not ideal for my company or the user.
When the firewall is enabled, I've encountered two other prompts:
1. "The application has requested a file connection to listen to messages" -- I'm not sure what is prompting this. I need to look into it more. But it does not appear to go away even when asking for every available permission.
2. "The application has attempted to open a connection to a location inside the firewall and outside the firewall which is not allowed by your IT policy". With the firewall turned on, our app cannot make any HTTP/S or Bluetooth connection. This prompt appears and then our action fails with a java.lang.SecurityException: Permission denied.
09-26-2008 02:14 PM
Are you creating a MIDlet or BlackBerry CLDC application? Please see this post for information on prompts that apply to MIDlets.
This link explains your second prompt.
Support - The application has attempted to open a connection to a location inside the firewall and outside the firewall.
Article Number: DB-00104
10-23-2008 07:53 PM
Our application is a Blackberry CLDC application.
We have worked around the firewall issue by having customers disable it.
I came across another situation today where a customer's phone had "Media Access" set to Deny (when checked under Settings-->Options-->Advanced Options-->Applications-->Modules-->Our App). The phone was an 8130 (220.127.116.11, 18.104.22.168). I use the Alert class to vibrate the device in a couple situations, and this was not working.
Our application is used by consumers who may or may not be part of a corporate network. We build against the 4.2.1 RIM API's. Our application uses HttpConnection to make some web service calls over the BIS network, it uses the JSR82 bluetooth API's, it uses the FileConnection API to write data to device memory and/or SDCard. These seem to be the things that cause permissions prompts. Today was the first time I've seen the Media Access one.
The ideal user experience would be that our users do not have to deal with any security prompts at all. I don't think this is viable, so the second most ideal user experience is to have a single prompt the first time the application launches that will request all the permissions needed. So far, this seems to work in most cases but not all.
Is there a way to accomplish this?
It seems that the ApplicationsPermissions API does not allow me to request all the permissions that may or may not be needed. I don't see a constant that looks like it would grant the Media Access one (at least from the ApplicationPermissions.PERMISSION_*** constants). And as answered above in this thread, there is no way to deal with the firewall.
10-24-2008 09:28 AM
ApplicationPermissions.PERMISSION_MEDIA is the one you are looking for to enable media access.
There is no way to programmatically change the firewall setting.