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
PDeRidder
Posts: 10
Registered: ‎03-21-2012
My Device: none

Getting foreground from other app

Hello,

My application is an automated installer which launches another "third-party" app (black box) and configures it by sending keystrokes (I know this is not "nice" but that's all we found).

This part works. However, between keystrokes sequences, I have to give some time for the 3P application to execute the configuration activities and I have to forsee some extra delay to make sure it is ready for the next keystrokes.

In order to avoid that the end-user interacting (which he is not supposed to do), I want to get foreground for my installer between keystrokes and let the 3P app work in the background.

 

The following code has been used repeatedly to request foreground:

                ApplicationManager.getApplicationManager().requestForeground(pid);
where pid is the process ID of the installer app.

 

The debug log shows:

AM: Foreground is requested: Installer(307)

and no such message for the 3P app.

 

But the 3P app keeps the foreground :smileysad:

Does anyone have an idea what goes wrong ?

 

This development is done on BB9800, but should be able to run on OS5.0, OS6.0 and OS7.0.

 

Thanks beforehand !

 

Philippe

Please use plain text.
Contributor
PDeRidder
Posts: 10
Registered: ‎03-21-2012
My Device: none

Re: Getting foreground from other app

Does anyone have an idea ?

 

Thanks beforehand !

 

Please use plain text.