Android Smart WebView 7.3 🎉
This release focuses on significant stability improvements, bug fixes, and internal code quality enhancements. We've addressed several long-standing issues reported by the community, making the project more robust and easier to maintain.
A big thank you to our contributors and users for their detailed feedback which made these improvements possible!
✨ New Features & Enhancements
- Centralized Navigation Configuration: The navigation drawer's menu items are now configured entirely within
SmartWebView.javausing the newASWV_DRAWER_MENUmap. This separates configuration from logic, making it safer and easier for developers to customize menu links without touchingMainActivity. - Dynamic Version Handling: The app version (
ASWV_VERSION) is no longer a hardcoded string. It is now dynamically pulled from theversionNameinbuild.gradle, ensuring the version reported by plugins is always accurate and managed from a single source of truth. The redundant static variable has been removed. - Robust Offline & Error Handling: The app now provides a much more user-friendly experience when network connectivity is lost. Instead of showing a generic browser error, the WebView will now gracefully redirect to the custom offline page (
offline.html), preventing the user from getting stuck.
🐞 Bug Fixes
- Fixed: Navigation Drawer Crash/Failure (#330, #296)
- The navigation drawer menu (
ASWV_LAYOUT = 1) is now fully functional. The logic has been moved from the utilityFunctionsclass intoMainActivity, resolving the context-related bug that previously caused crashes or silent failures.
- The navigation drawer menu (
- Fixed: Pull-to-Refresh Conflict (#156)
- Resolved an issue where the pull-to-refresh gesture would interfere with scrolling inside dropdowns (
<select>) or other scrollable elements at the top of the page. The refresh layout is now only enabled when the main WebView is scrolled to the very top.
- Resolved an issue where the pull-to-refresh gesture would interfere with scrolling inside dropdowns (
- Fixed: Biometric Plugin Initialization Crash (
#app-crash-log)- Corrected an
IllegalArgumentExceptionin theBiometricPluginthat caused the app to crash on startup. The biometric prompt is now initialized correctly.
- Corrected an
- Fixed: Action Bar Menu (
onCreateOptionsMenu)- The top action bar menu (containing search and exit options for the drawer layout) was previously non-functional. The logic has been moved to
MainActivity, making the menu fully operational.
- The top action bar menu (containing search and exit options for the drawer layout) was previously non-functional. The logic has been moved to
- Resolved: Persistent Error Loop (#208)
- The old, unreliable
onReceivedErrorcallback has been replaced with modern error handling. This eliminates the "Something Went Wrong!" toast and the page refresh loop that could previously make the app unusable.
- The old, unreliable
🛠️ Code Quality & Maintenance
- Refactored UI Event Handling: All UI-specific logic for menus (
onNavigationItemSelected,onCreateOptionsMenu) has been moved from theFunctions.javautility class intoMainActivity.java, adhering to better Android development practices. - Enabled Service Worker Support (#147): The necessary
ServiceWorkerClientis now initialized, enabling full support for web pages that use service workers for performance and offline caching. - Redundancy Removed: Cleaned up the codebase by removing the now-unnecessary
ASWV_VERSIONstatic variable, simplifying the project.
This update makes Smart WebView a more stable and developer-friendly foundation for your hybrid Android apps. As always, we welcome your feedback and contributions on our GitHub Discussions page.