webview(android): keep a factory-supplied WebView alive across Compose navigation

Open Beginner friendly
#1,000 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
67/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
android, kotlin
Domain
mobile

Research direction

Read WebViewAndroid.kt, focusing on onRelease and how it handles WebViews supplied through LocalWebViewFactory. Trace the Compose navigation lifecycle enough to confirm when release runs. Done means an app-supplied WebView can be reused after navigation without being destroyed, while the intended behavior for other WebViews is preserved.

Written by the indexing model from the issue text.

Description

enhancement module:webview p2

Carried over from NucleusFramework/ComposeNativeWebview#66, whose code now lives here.

LocalWebViewFactory is public now, so an app can supply its own native WebView, but Android's onRelease still calls webView.destroy() (WebViewAndroid.kt): a WebView the app meant to keep (to restore it when navigating back) is destroyed when its composable leaves.

Dominant language
Kotlin
Stars
393
Forks
27
Avg merge
1d 10h
Merged PRs (30d)
67

Getting set up

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.

More from NucleusFramework/Nucleus

All issues in NucleusFramework/Nucleus

Similar issues

More Kotlin issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.