Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: replace GuardedResultAsyncTask with AsyncTask #340

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Darkkap
Copy link

@Darkkap Darkkap commented Mar 11, 2025

Summary

GuardedResultAsyncTask was removed in React Native 0.78, which caused compatibility issues. This change replaces GuardedResultAsyncTask with AsyncTask to ensure compatibility with the latest version.

Changelog

[Android] [Refactor] - Replace GuardedResultAsyncTask with AsyncTask for React Native 0.78 compatibility

Test Plan

  • Verified that the code compiles successfully with React Native 0.78.
  • Tested affected functionality to confirm no regressions.
  • Ensured no runtime errors related to async task execution.

Related Issue

Fixes #336

@@ -6,10 +6,10 @@ import android.graphics.BitmapFactory
import android.media.MediaMetadataRetriever
import android.net.Uri
import android.os.Build
import android.os.AsyncTask

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as far as I know... AsyncTask is deprecated in Java.
is there any alternative way?

@hoonjoo-park
Copy link

@Darkkap

I have just created a new PR that resolves this issue using Coroutines. Could you take a look at the code?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

React Native Android Build Fails: Kotlin Compilation Error
2 participants