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
Contributor
Posts: 27
Registered: ‎07-01-2011
My Device: 9800

Re: App doesn't save permissions when User Prompted application permissions are "Saved"

In my app I set the following permission:

ApplicationPermissions.PERMISSION_SERVER_NETWORK

Developer
Posts: 19,612
Registered: ‎07-14-2008
My Device: Not Specified

Re: App doesn't save permissions when User Prompted application permissions are "Saved"

This is asking for permission to connect to your server via the BES/MDS.  You can also ask for connection via BIS-B, WAP or Direct TCP using

PERMISSION_INTERNET

or WiFi using

PERMISSION_WIFI

 

Review the ApplicationPermissions for more. 

 

Perhaps this is how the other applications are connecting.  Please check the Permissions set for these applications and let us know if this is the case. 

Contributor
Posts: 27
Registered: ‎07-01-2011
My Device: 9800

Re: App doesn't save permissions when User Prompted application permissions are "Saved"

I already have these permissions:

PERMISSION_INTERNET

PERMISSION_WIFI

PERMISSION_SERVER_NETWORK 

Developer
Posts: 19,612
Registered: ‎07-14-2008
My Device: Not Specified

Re: App doesn't save permissions when User Prompted application permissions are "Saved"

Sorry, I am not clear what you are telling us or why this differs from your previous post.  Can you calrify this?

 

If you ask for the three and don't get the SERVER_NETWORK, then your app can continue, but you can't use "deviceside=false" as a connection String.  You have to use something else, like interface=wifi.

Contributor
Posts: 27
Registered: ‎07-01-2011
My Device: 9800

Re: App doesn't save permissions when User Prompted application permissions are "Saved"

The main problem is that App doesn't start after click on "save button".

Developer
Posts: 19,612
Registered: ‎07-14-2008
My Device: Not Specified

Re: App doesn't save permissions when User Prompted application permissions are "Saved"

The fact that it goes in a loop continually asking the user for permissions is almost certainly something in your code, where you have a method that won't let the app continue until it has the permissions you want.  have a look at the code in your app that triggers this permission screen. 

Contributor
Posts: 27
Registered: ‎07-01-2011
My Device: 9800

Re: App doesn't save permissions when User Prompted application permissions are "Saved"

[ Edited ]

It issue was resolved.
I have added the code:

 

 

 if ((CoverageInfo.getCoverageStatus() \& CoverageInfo.COVERAGE_BIS_B) == CoverageInfo.COVERAGE_BIS_B) {
connSuffix = \";deviceside=false; ConnectionType = mds-publi\"; 
return connSuffix;
}

 

for the connection string.
and:

 

ApplicationPermissions permRequest = new ApplicationPermissions();
permRequest.addPermission(ApplicationPermissions.PERMISSION_FILE_API);
permRequest.addPermission(ApplicationPermissions.PERMISSION_INTERNET);
permRequest.addPermission(ApplicationPermissions.PERMISSION_SERVER_NETWORK);
permissionsOk = apm.invokePermissionsRequest(permRequest);

  Even if I get permissionsOk is false I launch the app.