04-09-2013 08:42 PM
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.
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.
Solved! Go to Solution.
04-10-2013 04:51 AM
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.
04-10-2013 08:29 AM
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!
04-10-2013 08:56 AM