android-workmanager

Insert on Room DB does not trigger Observer on Activity

丶灬走出姿态 提交于 2020-04-17 22:14:22
问题 In my activity i have an Observer that observes this query @Query("""Select *, (Select account_id from accounts where account_id = from_account_id) as contact_account_id, (Select first_name from accounts where account_id = from_account_id) as contact_first_name, (Select last_name from accounts where account_id = from_account_id) as contact_last_name from messages inner join messageQueue on messages.client_message_id = messagequeue.client_message_id where ((msg_type = 1 and body <> "") or msg

Insert on Room DB does not trigger Observer on Activity

我的未来我决定 提交于 2020-04-17 22:14:01
问题 In my activity i have an Observer that observes this query @Query("""Select *, (Select account_id from accounts where account_id = from_account_id) as contact_account_id, (Select first_name from accounts where account_id = from_account_id) as contact_first_name, (Select last_name from accounts where account_id = from_account_id) as contact_last_name from messages inner join messageQueue on messages.client_message_id = messagequeue.client_message_id where ((msg_type = 1 and body <> "") or msg

Android WorkManager not starting the worker

时光总嘲笑我的痴心妄想 提交于 2020-04-17 20:04:39
问题 I want to download certain files from the server at the start of the app .So I tried using Work Manager which gets enqueued from my custom Application class.But the Worker class is not getting triggered and the state is only ENQUEUED and not going to RUNNING .Below is my code: Application class: @Override public void onCreate() { Constraints constraints = new Constraints.Builder() .setRequiredNetworkType(NetworkType.CONNECTED) //.setRequiresStorageNotLow(true) //.setRequiresBatteryNotLow(true

Android WorkManager not starting the worker

六眼飞鱼酱① 提交于 2020-04-17 20:04:36
问题 I want to download certain files from the server at the start of the app .So I tried using Work Manager which gets enqueued from my custom Application class.But the Worker class is not getting triggered and the state is only ENQUEUED and not going to RUNNING .Below is my code: Application class: @Override public void onCreate() { Constraints constraints = new Constraints.Builder() .setRequiredNetworkType(NetworkType.CONNECTED) //.setRequiresStorageNotLow(true) //.setRequiresBatteryNotLow(true

Firebase Event Listener inside Android Worker

末鹿安然 提交于 2020-04-11 07:09:05
问题 I am trying to implement a Worker from Android WorkManager with an Event listener for Firebase database reference. It works fine if the app is in foreground/background. But once I close the app and the worker runs the event listener is not triggering, As far as I can tell I am not getting any error messages related to this in log. Here is a sample code: class FirebaseWorker(context: Context, params: WorkerParameters) : Worker(context, params) { override fun doWork(): Result { val

Firebase Event Listener inside Android Worker

懵懂的女人 提交于 2020-04-11 07:06:41
问题 I am trying to implement a Worker from Android WorkManager with an Event listener for Firebase database reference. It works fine if the app is in foreground/background. But once I close the app and the worker runs the event listener is not triggering, As far as I can tell I am not getting any error messages related to this in log. Here is a sample code: class FirebaseWorker(context: Context, params: WorkerParameters) : Worker(context, params) { override fun doWork(): Result { val

Firebase Event Listener inside Android Worker

匆匆过客 提交于 2020-04-11 07:06:14
问题 I am trying to implement a Worker from Android WorkManager with an Event listener for Firebase database reference. It works fine if the app is in foreground/background. But once I close the app and the worker runs the event listener is not triggering, As far as I can tell I am not getting any error messages related to this in log. Here is a sample code: class FirebaseWorker(context: Context, params: WorkerParameters) : Worker(context, params) { override fun doWork(): Result { val

Android WorkManager doesn't trigger one of the two scheduled workers

北战南征 提交于 2020-04-11 04:05:03
问题 I have two periodic workers scheduled in my app where one worker repeats after 24 hours and another in 15 minutes. Initially on fresh install things work as expected, but after some days I got an issue on 2 devices(out of 5). The 24 hour worker is triggered properly but the 15 minute one isn't triggered at all. I have been monitoring this for 24 hours now. I viewed the databse of workmanager via Stetho and saw some entries for 24-hour worker and 0 entries for 15 minute worker. I'm looking in

Android WorkManager doesn't trigger one of the two scheduled workers

浪子不回头ぞ 提交于 2020-04-11 04:04:40
问题 I have two periodic workers scheduled in my app where one worker repeats after 24 hours and another in 15 minutes. Initially on fresh install things work as expected, but after some days I got an issue on 2 devices(out of 5). The 24 hour worker is triggered properly but the 15 minute one isn't triggered at all. I have been monitoring this for 24 hours now. I viewed the databse of workmanager via Stetho and saw some entries for 24-hour worker and 0 entries for 15 minute worker. I'm looking in

Android WorkManager doesn't trigger one of the two scheduled workers

早过忘川 提交于 2020-04-11 04:04:22
问题 I have two periodic workers scheduled in my app where one worker repeats after 24 hours and another in 15 minutes. Initially on fresh install things work as expected, but after some days I got an issue on 2 devices(out of 5). The 24 hour worker is triggered properly but the 15 minute one isn't triggered at all. I have been monitoring this for 24 hours now. I viewed the databse of workmanager via Stetho and saw some entries for 24-hour worker and 0 entries for 15 minute worker. I'm looking in