Android Question Running Third-Party Apps in Sequence via FCM on Android in Enterprise Environment

ykucuk

Well-Known Member
Licensed User
Longtime User
Hello,

I am developing an internal Android application for enterprise use that will not be uploaded to Google Play. The goal is to sequentially call third-party apps at specific intervals, keeping my app in the background.

Here's the scenario:

  1. My app is active and in the foreground.
  2. I send an FCM notification to the app containing the package name of a third-party app, and then launch that app using an intent.
  3. After a certain period, I send another FCM notification with a new package name to open a different third-party app.
The issue arises after launching the first third-party app: my app moves to the background, and even though it receives the next FCM notification, it is unable to bring the new app to the foreground. I understand that many actions like this have been restricted for security reasons in recent Android versions (as of 2024), but since this is for internal use, I am hoping there might be a workaround or best practice.

Is there a way for my app to bring itself back to the foreground after receiving an FCM notification or to handle sequential app launching when it’s running in the background? How can I ensure that my app continues to launch third-party apps even when it’s not in the foreground?

Any advice or best practices for handling this use case in an enterprise environment would be greatly appreciated.
 
Top