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
MobileMetta
Posts: 10
Registered: ‎01-22-2013
My Device: Torch 9800
Accepted Solution

Trusted Application Status

Hello,

 

Is there any way to determine if the end-user has granted "Trusted Application Status"?

 

My application is set to auto-start and thus is automatically started when it is installed.  The problem is that some of the code will throw an exception if the end-user has not granted "Trusted Application Status" and the exception can actually prevent them from seeing the grant "Trusted Application Status" dialog box.

 

Let us suppose that I modify the code so it does not attempt to use these features until the end-user has confirmed acceptance of the EULA and Terms of Use -- who says that they actually granted "Trusted Application Status" prior to accepting the EULA and Terms of Use?

 

Currently, I think I need to move privileged code so it is not executed until the EULA is accepted and try to catch any exceptions that are thrown.

If anyone understands privileged code and the autostart process -- I would appreciate hearing your comments on how best to handle this situation.

 

Sincerely, Christopher

Please use plain text.
Developer
peter_strange
Posts: 19,608
Registered: ‎07-14-2008
My Device: Not Specified

Re: Trusted Application Status

I am not aware of a way of detecting trusted application status.  Moreover the user might not grant this status anyway, so if they reject this, then  what is your application going to do?

 

As I understand it, trusted application is just a collection of permissions that are normally requested by application programs (Location, Internet etc).  Doing this once in a formal BB specific way means most applications don't have to worry about putting up their own screens for permissions and means most users see a consistency in the way permissions are asked for.  That is all it does. 

 

I suggest that you do not run the autostarted processing until the user has in fact been through a 'setup' which involves accepting terms and conditions.  Moreover in that setup you could check for permissions and request the permissions that you require.  Typically you will probably find that the user has given trusted status and the permissions you want are already given, in which case you don't have to ask the user anything.  

 

The ApplicationPermissions demo code will help with this, but in fact I don't like the approach it uses.  I personally put up a screen that tells the user I am going to ask for permissions if I have not been given them, then try to request permissions. 

 

Hope this helps. 

Please use plain text.
Contributor
MobileMetta
Posts: 10
Registered: ‎01-22-2013
My Device: Torch 9800

Re: Trusted Application Status

Thank you very much for your feedback, peter_strange.

 

Actually, I have an exception that occurs specifically during BlackBerry Desktop Software installation:

 

Uncaught exception: Application net_rim_bb_trust_application_manager (344) is not responding: process terminated.

 

It is really annoying, because I do not know what is causing it.

 

Everything works fine in Eclipse IDE.

 

BlackBerry API 5.0

BlackBerry Device: Torch 9800

 

I still need to debug my latest code changes on the device and will certainly do so today.

 

However, I was hoping for a "This is how you write a permissioned autostart BlackBerry program" type of example, and well, I would really like to thank you for the pointer to the "ApplicationPermissions" demo code!

 

Sincerely,

Christopher

 

Please use plain text.
Developer
simon_hain
Posts: 16,207
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport

Re: Trusted Application Status

please open a new thread for a new question, and mark this one as resolved if your issue is solved.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Please use plain text.