hotwired / turbo-android

Android framework for making Turbo native apps
MIT License
408 stars 51 forks source link

Offline turbo view fragment #252

Closed omohokcoj closed 1 year ago

omohokcoj commented 1 year ago

Is there some easy way to create an offline turbo navigation view which loads html string (from configurations json) into webview instead of triggering a network request?

omohokcoj commented 1 year ago

I found this undocumented offline API which worked really well and helped to solve the issue: https://github.com/hotwired/turbo-android/blob/556cfae61408811fe488bd877416b27e53cb35ca/turbo/src/main/kotlin/dev/hotwire/turbo/http/TurboOfflineRequestHandler.kt#L6