lbryio / lbryio/lbry-android

Migrate from AsyncTask to other concurrency API

Open
#959 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
2.4k
Forks
110
PR merge metrics
No merged PRs in 30d

Description

The Issue

Google has deprecated AsyncTask API since SDK API Level 30 -Android 11-. They are suggesting to use java.util.concurrent or Kotlin. I would add MIT-licensed Parse Bolt to the list of possibilities; it allows to chain tasks and act differently depending on the way certain task finishes. Bolt has been without updates since 2019 and I don't know if they are using AsyncTask internally.

If I was to choose, I would go with Java APIs for simple tasks and Bolt for those which should be chained. Bolt is also available for iOS if consistency for both source codes is preferred.

Internal Use

Acceptance Criteria
Definition of Done
  • Tested against acceptance criteria
  • Tested against the assumptions of the user story
  • The project builds without errors
  • Unit tests are written and passing
  • Tests on devices/browsers listed in the issue have passed
  • QA performed & issues resolved
  • Refactoring completed
  • Any configuration or build changes documented
  • Documentation updated
  • Peer Code Review performed

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the Android code that uses the deprecated AsyncTask API, then compare the proposed java.util.concurrent and Kotlin alternatives, including whether Parse Bolt is suitable. Done means the migration choice is implemented across the affected code, the project builds without errors, unit tests pass, and device testing and documentation are updated.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java
Domain
mobile
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.