You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Use a unique work to avoid multiple workers.
workManager.enqueueUniquePeriodicWork(
PROVIDE_KEY_WORK_NAME,
ExistingPeriodicWorkPolicy.KEEP,
workRequest
)
Android版のバックグラウンド処理(WorkManager)において
ExistingPeriodicWorkPolicyにExistingPeriodicWorkPolicy.Replaceの値を指定しています。cocoa/Covid19Radar/Xamarin.ExposureNotification/ExposureNotification.android.cs
Lines 147 to 149 in 20f3e8c
これはGoogleが提供しているドキュメントExposure Notifications implementation guideに基づいた記述と推測しますが、当該ドキュメントは2020年9月に更新されており、現在はExistingPeriodicWorkPolicyには
ExistingPeriodicWorkPolicy.KEEPを指定するように記述が変更されています。ドキュメントの更新履歴によれば、
ExistingPeriodicWorkPolicy.Replaceを指定した場合、WorkManagerがシステムのJobSchedulerにジョブを追加しない問題が起こることがある。とのことです。最新のドキュメントの内容に基づいて、当該部分を
ExistingPeriodicWorkPolicy.KEEPに変更することを強くお勧めします。