android-workmanager

How to Pass POJO class in Work manager in android?

ぐ巨炮叔叔 提交于 2021-02-18 09:58:46
问题 How can we pass Serializable object in work manager by setData method of work manager? Is there any way to process with Work manager by passing object? WorkManager is a library used to enqueue work that is guaranteed to execute after its constraints are met. WorkManager allows observation of work status and the ability to create complex chains of work. Map<String, Object> map = new HashMap<>(); AddressBookData addressBookData = new AddressBookData(); addressBookData.setThreadId(001); map.put(

How can a closed application perform periodic work with WorkManager on Android 10?

岁酱吖の 提交于 2021-02-11 12:47:33
问题 I have asked a question about periodic work here: How can a closed application receive periodic broadcasts?. The answer has been to use WorkManager and this has been a great solution on Android 9. On another device using Android 10 the solution of this former question does not work anymore. This seems to be a common problem. The question here has been upvoted a lot, but its single answer is not accepted and it also didn't help me: WorkManager not working when app killed in Android 10 although

Work manager periodic job not working on chinese ROMs once app is force closed

故事扮演 提交于 2021-02-10 23:44:35
问题 I have tried stack overflow but people only added Android documentation which says it'll work but it doesn't i have also raised an issue in google's issue tracker here. I have tested on Android versions: 6, 7, 8 and work manager 1.0.0-alpha11, 1.0.0-alpha12 If anyone has found any solution for running periodic job please comment it'll be a great help. Thanks 回答1: This is a known issue and, as commented in this other bug on Google's issuetracker, there's not much that WorkManager can do in

Work manager periodic job not working on chinese ROMs once app is force closed

走远了吗. 提交于 2021-02-10 23:39:47
问题 I have tried stack overflow but people only added Android documentation which says it'll work but it doesn't i have also raised an issue in google's issue tracker here. I have tested on Android versions: 6, 7, 8 and work manager 1.0.0-alpha11, 1.0.0-alpha12 If anyone has found any solution for running periodic job please comment it'll be a great help. Thanks 回答1: This is a known issue and, as commented in this other bug on Google's issuetracker, there's not much that WorkManager can do in

ClassNotFoundException: “androidx.work.impl.WorkManagerInitializer”

谁说我不能喝 提交于 2021-02-08 19:59:35
问题 A new exception appeared on some devices after upgrading Google AdMob Ads library version 19.4.0 to 19.5.0: Caused by java.lang.ClassNotFoundException Didn't find class "androidx.work.impl.WorkManagerInitializer" on path: ... dalvik.system.BaseDexClassLoader.findClass (BaseDexClassLoader.java:196) androidx.core.app.CoreComponentFactory.instantiateProvider (CoreComponentFactory.java) android.app.ActivityThread.installProvider (ActivityThread.java:7213) android.app.ActivityThread

WorkManager not working when app killed in Android 10 although working fine till version 9 (Pie)

点点圈 提交于 2021-02-07 06:34:22
问题 I figured out this issue when I wasnt getting the notification through workmanager when the app was killed from background tasks in Android 10. It is working fine for all the android version till Andorid 9. To test this, I run the app simultaneously on both 9 and 10 versions. Is someone else also facing this issue? I searched the web but no support solution for Andorid 10 based issue. Note: As soon as the app is opened and the workmanager is triggered, I get the notification in 10 but not

WorkManager not working when app killed in Android 10 although working fine till version 9 (Pie)

白昼怎懂夜的黑 提交于 2021-02-07 06:32:36
问题 I figured out this issue when I wasnt getting the notification through workmanager when the app was killed from background tasks in Android 10. It is working fine for all the android version till Andorid 9. To test this, I run the app simultaneously on both 9 and 10 versions. Is someone else also facing this issue? I searched the web but no support solution for Andorid 10 based issue. Note: As soon as the app is opened and the workmanager is triggered, I get the notification in 10 but not

WorkManager not working when app killed in Android 10 although working fine till version 9 (Pie)

主宰稳场 提交于 2021-02-07 06:32:16
问题 I figured out this issue when I wasnt getting the notification through workmanager when the app was killed from background tasks in Android 10. It is working fine for all the android version till Andorid 9. To test this, I run the app simultaneously on both 9 and 10 versions. Is someone else also facing this issue? I searched the web but no support solution for Andorid 10 based issue. Note: As soon as the app is opened and the workmanager is triggered, I get the notification in 10 but not

workmanager listener called immediately

青春壹個敷衍的年華 提交于 2021-02-06 09:21:07
问题 I need to have a callback upon Work completion from WorkManager (android.arch.work:work-runtime-ktx:1.0.0-alpha11). Yet the listener I'm adding is called immediately after work is scheduled. Here's what I do: val work = OneTimeWorkRequestBuilder<UploadWorker>() .setConstraints(constraints) .setBackoffCriteria(BackoffPolicy.EXPONENTIAL, 1, TimeUnit.MINUTES) .setInputData(inputData) .build() workManager.beginUniqueWork(INSURANCE_UPLOAD_WORKER, ExistingWorkPolicy.REPLACE, work) .enqueue().result

Unique periodic work stop executing after a while

匆匆过客 提交于 2021-01-29 09:37:25
问题 I've implemented a Unique Periodic Work with WorkManager API in my app. The work has to check every 30min an online resource and show a notification if there are some unread notifications. Yes, I need a periodic work because the resource is a IMAP server, and thus I cannot use FCM notifications. However the job is correctly scheduled as I can see with dumpsys jobscheduler , but after a while the job sto executing. When I run dumpsys jobscheduler I read something like this: JOB #u0a360/7: