Modify "android:launchMode="singleTop" in AndroidManifest

When I click on the Launch icon for my app, the app restarts instead of reopening - it looks like this SO thread solves it: android - App completely restarting when launched by icon press in launcher - Stack Overflow

Is there any way to adjust this setting with detaching?

yeah. if you detach, you can modify the Android manifest.

If you meant, “without detaching”, I don’t think so, but I don’t think it should restart all the time when you tap on the launcher icon. do you have any other clues as to why it might be happening? someone on that s.o. thread mentioned that restarting their device made the issue go away?

Sorry, yes, mission critical typo :slight_smile:

Is there a way to modify this without detaching? Restarting the device isn’t helping, sadly, no.

Hi, we’d need some more information to figure out what’s going on. What device and OS are you using? And is this a standalone app or in the Expo app?

hi, i’am facing the same issue for my standalone app.

It seems to be device independent. I can reproduce this behavior as described on genymotion and my HTC 10 (Android 7.1).

i don’t know if it helps but my app is called LAPPENBOARD and it’s available on Expo, Google Play Store and Apple App Store.

My Environment:
OS: macOS Sierra 10.12.6
Node: 10.5.0
Yarn: 1.7.0
npm: 6.1.0
Watchman: 4.9.0
Xcode: Xcode 9.2 Build version 9C40b
Android Studio: 3.1 AI-173.4720617

Packages: (wanted => installed)
expo: ^28.0.0 => 28.0.0
react: 16.3.1 => 16.3.1
react-native: => 0.55.4

App target: Android Standalone

I’ve been testing a little more, and restarting the app does appear to “fix” the behavior. I coulda sworn I’d still seen it after cycling the power on my device (and hard closing the app), but maybe I’m just getting senile over here. So YES, in my case, restarting the app or device makes the behavior go away.

This is happening on a standalone app, also in the app store:

OS: macOS Sierra 10.12.6
Node: 8.10.0
npm: 6.1.0
expo: 28.0.0
react: 16.4.1
Device: Samsung Galaxy S8
Android Version: 8.0.0
App target: Android Standalone

I have now tested this with the sample “Tab Navigation” template app that Expo generates (completely unmodified) and the problem exists there as well, so it doesn’t appear to be any of our own JS code / settings.

Ticketed here:

Would be great to get a fix for this into SDK 29 :crossed_fingers:

Edit: Just to clarify, this is not detached, just a plain standalone build.

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.