Skip to content
This repository has been archived by the owner on Jun 20, 2023. It is now read-only.

PeriodicWorkRequest not running as expected #200

Open
jrahma opened this issue Aug 25, 2019 · 4 comments
Open

PeriodicWorkRequest not running as expected #200

jrahma opened this issue Aug 25, 2019 · 4 comments

Comments

@jrahma
Copy link

jrahma commented Aug 25, 2019

Hi,

In the attached sample, I have created a PeriodicWorkRequest to be running every 30 minutes

I have logged the DoWork in my AppCenter Analytics and I am getting the DoWork when I start the app but not every 30 minutes. For example, today I started the app and I got the DoWork logged but after that and until now (more than 2 hours) nothing is logged.

AppCenter

LocalNotifications.zip

Thanks,
Jassim

@jonathanpeppers jonathanpeppers transferred this issue from dotnet/android Aug 28, 2019
@ndastur
Copy link

ndastur commented Sep 12, 2019

This is a function of the Android operating system. The time you specify is a minimum. The OS decides when to exec your task. All part of better battery management etc.

@jrahma
Copy link
Author

jrahma commented Sep 13, 2019

@ndastur How?!

it's called background worker which means it should run in the background not just when I open the app

@ndastur
Copy link

ndastur commented Sep 13, 2019

@jrahma just trying to be helpful. It does work in the background. Read the Android documentation and you'll get a better understanding of how Android does background work now. It might help to post some of your sample code. Without that, we don't know how you have implemented the Worker. I can let you know that I have successfully set up periodic tasks in Xamarin and it works as expected.

@jrahma
Copy link
Author

jrahma commented Sep 13, 2019

@ndastur sample was already attached in my issue

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

No branches or pull requests

2 participants