07-16-2008 07:48 PM
In our MIDlet, I call ApplicationPermissionsManager.invokePermissionsReq
When the permission dialog is displayed, and the user presses the END (Hangup) button. The ribbon screen is displayed. If the user attempts to launch the MIDlet again, nothing happens. It looks like it's because the But it looks like ApplicationPermissionsManager.invokePermissionsReq
Is it possible to programmatically dismiss or foreground the permission dialog?
Thanks,
Larry
07-17-2008 12:34 AM
This could surely stand to be cleaned up, but here's what I got:
First, kick off a thread to run your invokePermissionsRequest request. This will keep it from blocking your app.
Second, put the following in your UiApplication's "activate" method:
ApplicationDescriptor[] ad = appMgr.getVisibleApplications(); for (int i = 0; i < ad.length; i++) { if (ad[i].getModuleName().equals("net_rim_bb_applicat
ion_permissions_proxy")) { try { appMgr.runApplication(ad[i]); } catch (ApplicationManagerException ignore) { } } }
I'm not sure why the application doesn't come back to life when you click it again, but the above code will at least cause the Permissions Manager to put itself back up when you try to relaunch the app. I don't know of a way to dismiss the Permissions Manager (short of possibly using key injection, but my goal is to go through life never having used that method). It seems to be a fully fledged process and killing processes is something I've never figured out.
07-17-2008 11:50 AM
07-17-2008 09:42 PM
It's a Sprint 8130 v4.3.0.71 (Platform 3.1.0.37), but I can dupe this in other BBs as well.
07-17-2008 09:57 PM
I tried the fix you suggested, but still no luck. :-(
This is a MIDlet, so UiApplication.activate() doesn't apply. I added your code in the equivalent method MIDlet.startApp(). But when I try to launch the app after pressing Hangup in the Permissions dialog, the startApp() method doesn't get called at all. I don't understand why it would still block, since I'm now calling invokePermissionsRequest() in a thread.
07-18-2008 10:17 AM
I have been able to reproduce this issue and will direct it to our development team. The problem is that MIDlet is waiting for control to return to it from the screen that allows the user to select the permissions. Once the user dismisses that screen control returns to the MIDlet.
The problem is that the permissions screen is not shown when the user clicks on the MIDlet icon (after pressing the End key). As a work around they can use the Alt+Escape shortcut to task switch into the permissions screen. Once that is closed they should see the MIDlet again.