Skip to content

Android Smart WebView 7.3 🎉

Choose a tag to compare

@mgks mgks released this 09 Jul 23:03
· 85 commits to master since this release

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.java using the new ASWV_DRAWER_MENU map. This separates configuration from logic, making it safer and easier for developers to customize menu links without touching MainActivity.
  • Dynamic Version Handling: The app version (ASWV_VERSION) is no longer a hardcoded string. It is now dynamically pulled from the versionName in build.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 utility Functions class into MainActivity, resolving the context-related bug that previously caused crashes or silent failures.
  • 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.
  • Fixed: Biometric Plugin Initialization Crash (#app-crash-log)
    • Corrected an IllegalArgumentException in the BiometricPlugin that caused the app to crash on startup. The biometric prompt is now initialized correctly.
  • 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.
  • Resolved: Persistent Error Loop (#208)
    • The old, unreliable onReceivedError callback 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.

🛠️ Code Quality & Maintenance

  • Refactored UI Event Handling: All UI-specific logic for menus (onNavigationItemSelected, onCreateOptionsMenu) has been moved from the Functions.java utility class into MainActivity.java, adhering to better Android development practices.
  • Enabled Service Worker Support (#147): The necessary ServiceWorkerClient is 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_VERSION static 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.

💖 Premium plugins available for sponsors – Support the project