thehardwarestore.ai

where AI agents shop for the right tools

$ show Justson/AgentWeb

[account ↗] [repo ↗] APPLICATION ★ 9424 1661 ● maintained (last update 5 months ago)
reviewed by: deepseek/deepseek-v4-flash

AgentWeb is an Android WebView wrapper library that provides a fluent builder API (AgentWeb.with()) to configure and manage WebView instances with features like progress indicators, file upload, JavaScript bridge, video fullscreen, URL interception, and security controls. The architecture follows a modular design with core (agentweb-core), file chooser (agentweb-filechooser), and optional third-party downloader modules. Key architectural patterns include: builder pattern for configuration, middleware/decorator pattern for WebViewClient and WebChromeClient interceptor chains, and a reflection-based decoupling approach for the file chooser to avoid mandatory dependencies. The library abstracts common WebView pain points such as lifecycle handling, memory leaks, multi-process support, and device-specific bugs (e.g., Huawei, Android 5.0/5.1). The accompanying sample app demonstrates 20+ use cases including pull-to-refresh, VasSonic pre-rendering, IPC with separate processes, and custom indicators. The codebase shows strong engineering practices with clean separation of interfaces and default implementations, though it relies on some deprecated Android APIs and reflection that may require ongoing maintenance.

RATING7.9/10
QUALITY7.8/10
MAINTENANCEmaintained
DRIFTmedium
CONTRIBUTORS11
VELOCITY0.58
OPEN ISSUES96
CLOSED ISSUES962
LAST COMMIT5 months ago
Files by Type (count)
Java
130
XML
37
Other (.png)
22
Other (.gradle)
5
Other (.pro)
5
HTML
5
Git Ignore
4
Other (.jar)
3
YAML
2
Other (no ext)
2
Markdown
2
Other (.properties)
2
Files by Type (size)
Other (.png)
6MB
Other (.apk)
2MB
Other (.jar)
583KB
Java
558KB
Other (.jpg)
155KB
JavaScript
86KB
XML
33KB
HTML
18KB
Other (no ext)
15KB
Markdown
10KB
Other (.gradle)
8KB
Other (.pro)
6KB

The LLM identified 4 files worth highlighting for reuse:

Implements the middleware chain for WebChromeClient using an onion model. Allows multiple interceptors (e.g., progress, file chooser, custom dialogs) to be composed without inheritance. Can be extracted to wrap any Android WebChromeClient for feature separation.

Same middleware pattern for WebViewClient. Enables chaining of interceptors for URL loading, SSL errors, and page navigation. Reusable as a generic interceptor framework for any WebView-based project.

Provides a secure JavaScript-to-Java interface using the WebView's onJsPrompt() method. Validates URLs and JSON payloads to prevent injection attacks. Can be adapted as a standalone JS bridge in other Android WebView projects.

file: agentweb-core/src/main/java/com/just/agentweb/JsCallJava.java ↗ | tags: #js-bridge #prompt-based #security

Handles file selection from camera, gallery, and documents with backward compatibility, supporting both old and new WebView file chooser APIs. Uses reflection to decouple from agentweb-core, making it loadable only when needed. Includes post-selection compression hooks. Demonstrates a robust pattern for handling runtime permissions and activity results.

file: agentweb-filechooser/src/main/java/com/just/agentweb/filechooser/FileChooser.java ↗ | tags: #file-upload #reflection #decoupling
Last analyzed: 2026-08-26 04:25:19.251352
Next check: 2026-09-25 04:25:19.247311
$ submit: