Я отправляю push-уведомление пользователям, которые при нажатии на него открывают приложение.
Моя проблема в том, что, когда приложение уже открыто, нажатие на уведомление снова запустит приложение.
Мне нужно только запустить приложение, если оно еще не запущено.
В уведомлении используется ожидающее намерение:
PendingIntent contentIntent = PendingIntent.getActivity(this, 0, new Intent(this, Splash.class), 0);
Я видел сообщения, которые говорят:
<activity
android:name=".Splash"
android:launchMode="singleTask"
но дело в том, что в моем запущенном приложении работает другая активность, а затем всплытие, которое завершается через 7 секунд после запуска приложения, поэтому, когда приложение работает, Splash не является текущей деятельностью.