-
-
Notifications
You must be signed in to change notification settings - Fork 121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
It runs tasks in background or even app is closed only for max 30 secs #235
Comments
Yes same i am facing now |
yes facing the same even manually changing service type to dataSync it works properly for android 14 version but not on android lower version device the app get freeze mode i think so 2024-08-05 17:54:15.093 2098-3020 ColorHansManager system_serverIpkg:com.myApp,state: M -> F |
What your code is working for latest Android and not for lower devices |
For this you have to EXISTING CODE
UPDATED ONE
|
|
The answer by deban07 and rajkumarthirumalai worked perfectly with version 4.0.1 |
@deban07 @AyyazAnjum @deban07 @rajkumarthirumalai @MalekZishan still crashing on my side |
wlh mak mnayk sa7by it works 3alkher |
Which android version you are using and mention the React Native version also. |
@deban07 i have stopped using this package usage and used native foreground service from android 1.create a java serviceFile import android.app.Notification; public class BackgroundService extends Service {
}`
3.now comes the module import android.content.Intent; public class BackgroundServiceModule extends ReactContextBaseJavaModule {
}`
import com.facebook.react.ReactPackage; import java.util.ArrayList; public class BackgroundServicePackage implements ReactPackage {
}` 5.Finally at our jsx : const { BackgroundService } = NativeModules; // Start the service // Stop the service |
i am facing this bug now in the ios platform, there is a solution for this or not yet |
When my app is in background or is killed from background my function runs for only short period of time like 10 to 20 secs only for android 12+
but for android below 12+ it is working fine...
The text was updated successfully, but these errors were encountered: