Android Question Move App in the Statusbar to foreground

Tempomaster

Active Member
Licensed User
Longtime User
Hello,

I have provided my first app with B4A ("TempoMaster") as a beta version in the Play Store for testing:

https://play.google.com/store/apps/...ster_pro&ah=IRv6S7dKXzsYbZ-edQI-_IjwnDA&hl=de

The test has been running for a while. The app runs without major problems. For the display of the overlay I use the excellent library of Frédéric Leneuf-Magaud. The app runs as a service. The setup menu can be started as an activity before starting the display.

Now many testers have expressed the wish to be able to call the setup directly from the overlay display. I tried this now to solve. By a longclick on the sign the service is terminated and the activity started. After the settings the activity is terminated and the service is restarted. This works flawlessly.

Now to my problem. The additional running app is moved into the statusbar, when the Setup from "Tempomaster" is starting. It runs smoothly. However, it must be move back into the foreground manually. I would like to automate this process. Unfortunately I have found no solutions for this.

Alternatively, I could also program the setup menu as an overlay. I would like to avoid this. For a solution approach I would be very grateful.

Best regards,
Gunnar
 
Last edited:

Tempomaster

Active Member
Licensed User
Longtime User
Hello,

I have searched and found in the forum:

First get in my sevice the app in the foreground:

https://www.b4x.com/android/forum/threads/get-the-currently-running-activity.39387/#post-234022

After finishing the setup menu in my own activity, bring the other app from the background into the foreground:
https://www.b4x.com/android/forum/threads/start-app-from-service-module.82211/

This works very well for many apps. In a few, problems occur (e.g., Map Factor Navigator when exit the app).

My thanks goes to the two helpers.


Best regards,
Gunnar
 
Upvote 0
Top