I am developing an Alarm application, when the alarm fires up it launches a full screen intent with foreground service.
If the user goes to home, then tries to open the app I want him to get redirected to the foreground service full screen intent.
The application is multi-module, The foreground service exists in scheduler module and I am trying to mutate the Main Activity in the UI.
I tried checking if the service is already running and then launch a startActivity with an intent to the foreground service using the main activity context. However, It throws the following exception
android.content.ActivityNotFoundException: Unable to find explicit activity class
Replace that with a
startActivity()call to the activity that you want to show. TheIntentyou pass tostartActivity()needs to point to the activity. That is because you are trying to start an activity. The fact that this activity also happens to be used by a full-screenIntentfor a foreground serviceNotificationdoes not matter.