Rapsssito / react-native-background-actions

React Native background service library for running background tasks forever in Android & iOS.
MIT License
818 stars 117 forks source link

background service is not running anymore when app minimized #202

Closed juntiapps closed 4 months ago

juntiapps commented 11 months ago

background task is not running anymore when app minimized. it still running in emulator. but not running in real device. RN 0.72, device poco x3

onderbakirtas commented 11 months ago

Bump message for issue, affects me as well.

React Native 0.72, Samsung Galaxy S23

Sahilcf commented 10 months ago

Same here React native 0.72, Redme Note 10 pro

alan-nugraha commented 10 months ago

same issue, on android 12

apapalillo commented 10 months ago

Hi, I've spent hours debugging why the service didn't start after upgrading React Native.

In the end, I've figured out that I needed to add an exclusion in the proguard file:

# React Native Background Actions
-keep public class com.asterinet.react.bgactions.** {*;}

Hope this works for you too.

Rapsssito commented 4 months ago

This is common, as the OS has absolute control over the background processes of the device. See https://github.com/Rapsssito/react-native-background-actions/issues/22#issuecomment-628737527