Skip to content
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

Background service is not working #85

Open
donny08 opened this issue Jan 27, 2021 · 11 comments
Open

Background service is not working #85

donny08 opened this issue Jan 27, 2021 · 11 comments

Comments

@donny08
Copy link

donny08 commented Jan 27, 2021

I have setup a task to run when application goes background. Unfortunately, its not working for me. Please find the below code

import BackgroundTask from 'react-native-background-task'
import { Vibration } from 'react-native';

BackgroundTask.define(() => {
  Vibration.vibrate(3000);
  BackgroundTask.finish()
});

const App = () => {
    React.useEffect(() => {
       BackgroundTask.schedule({ period: 60 }); 
    });
}

Any help on this.

@mosishon
Copy link

mosishon commented Jul 8, 2021

same issue here

@Jefferson-Bueno-Da-Silva

here too

@Raniakhalifa
Copy link

same issue , any updates?

@titanve
Copy link

titanve commented Jul 25, 2021

I think that the 'issue' is that this package is not maintained anymore.

@vestronv
Copy link

vestronv commented Sep 2, 2021

@donny08 I think you can't update every 1 minute(as you have given period: 60) minimum time required is 15 minutes ie. period : 900

@corasphinx
Copy link

It's too difficult to use react-native-background-task for iOS.
It doesn't work absolutely. Never!

@corasphinx
Copy link

@vestronv Does it work on your end?

@tgreco
Copy link

tgreco commented Sep 17, 2021

It is not working for me on Android.

@afzalali27
Copy link

Not work at all. even crashing the build on first launch

@ZohaibAhmad786
Copy link

not working at all, i have assigned period time to 900 but still same.

@h1nson
Copy link

h1nson commented Apr 30, 2024

welcome join the club.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests