Use ActivityResultContracts as onActivityResult is deprecated
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 149
- Forks
- 54
- PR merge metrics
- No merged PRs in 30d
Description
## Is it a security issue?
* No
## What did you do?
* Integrating LINE Login.
## What did you expect?
* Do not appear 'deprecated' warning
## What happened actually?
* Line Android SDK needs to override 'onActivityResult'.
* https://developers.line.biz/en/docs/line-login-sdks/android-sdk/integrate-line-login/#handling-login-result
* But 'onActivityResult' is deprecated API.
* The android development environment no longer recommends that developers call the onActivityResult API.
## Your environment?
* Normal Android development environment.
## Sample project
* Just create new Android project from Android Studio and write 'onActivityResult' override function in Activity class.
* 
## How to fix
* The Facebook Android SDK is a good example.
* They had a same issue and they fixed it.
* https://github.com/facebook/facebook-android-sdk/issues/875
* https://github.com/facebook/facebook-android-sdk/commit/b48ac0d1339e198cc9d8f5e8b815da4363c6f7b0
* Now they guide the user to:
> If you are using AndroidX activities or fragments, you don't have to override onActivityResult.
* https://developers.facebook.com/docs/facebook-login/android?locale=en_US#9--register-a-callback
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the onActivityResult override required by the LINE Login Android integration, then compare the linked Facebook Android SDK migration and callback guidance. Determine how login results are currently delivered and update the integration path so Android developers no longer need the deprecated API; done means the documented flow avoids the warning while handling login results.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java
- Domain
- authentication, mobile
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100