実践 WorkManager / WorkManager

D62ad26d5db87a3a62ae97c77a252c22?s=47 atsushisakai
February 08, 2019

実践 WorkManager / WorkManager

DroidKaigi 2019の登壇資料です。
こちらの詳細はブログエントリにもまとめていますので合わせてご覧ください。
https://medium.com/mixi-developers/%E5%AE%9F%E8%B7%B5-workmanager-ea9344bf09a3

D62ad26d5db87a3a62ae97c77a252c22?s=128

atsushisakai

February 08, 2019
Tweet

Transcript

  1. 7.
  2. 10.
  3. 15.
  4. 21.
  5. 22.

    ࣮૷ 4 Synchronizer Server/CDN SQLite WorkManager Worker Glide Synchronizer Server/CDN

    SQLite WorkManager Worker Glide Request Metadata Response Metadata Save Metadata Enqueue Job Cache Image Select Metadata Request Image Response Image Execute Job
  6. 23.

    ࣮૷ 4 Synchronizer Server/CDN SQLite WorkManager Worker Glide Synchronizer Server/CDN

    SQLite WorkManager Worker Glide Request Metadata Response Metadata Save Metadata Enqueue Job Cache Image Select Metadata Request Image Response Image Execute Job
  7. 26.
  8. 28.
  9. 29.
  10. 31.
  11. 32.
  12. 38.

    ϦτϥΠͷڍಈΛཧղ͢Δ • σϑΥϧτ͸BackoffPolicy.EXPONENTIAL • WorkSpec#calculateNextRunTime ΛಡΉͱΞϧΰϦζϜΛཧղͰ͖Δɻ • ࠷ऴతʹ਺೔ޙʹJob͕ϦτϥΠ͞ΕΔ͜ͱ΋͋ΓಘΔɻ • ϦτϥΠճ਺ͷ࠷େ஋͸ઃఆͰ͖ͳ͍ɻ

    • Worker#getRunAttemptCount Ͱݱࡏͷࢼߦճ਺Λऔಘ͠ɺFailureͰऴ͑Δɻ • ͦ΋ͦ΋ҙਤ͠ͳ͍ϦτϥΠ͕ߦΘΕͳ͍Α͏ʹΤϥʔϋϯυϦϯά͓ͯ͘͠ࣄ΋ॏཁɻ ࣮૷࣌ͷTIPS΍஫ҙࣄ߲ 5
  13. 48.

    • https://issuetracker.google.com/issues/122553577 > We never supported Roboelectric. All WorkManager tests

    need to run as an Android 
 > instrumentation test. ςετʹ͍ͭͯ 6
  14. 49.
  15. 55.