user3682770
user3682770

Reputation: 125

The App stops when in background mode

My app stops when I leave it. I don't know why. Infact I know that the default action is to Keep it running. Maybe could be the nfc plugin tha i use in it? Where can i control the native code for this behaviour?

Upvotes: 0

Views: 217

Answers (2)

user3682770
user3682770

Reputation: 125

I have found the solution: add to

AndroidManifest.xml

activity this :

android:launchMode="singleTask"

Upvotes: 0

marcus m
marcus m

Reputation: 83

in AndroidManifest.xml add configChanges parameter like this:

    <activity
        android:configChanges="orientation|keyboardHidden|screenSize"
        android:name=".YourActivity"
        ...
        />

Then activity will not be recreated every time on resume.

Upvotes: 1

Related Questions