happydog-intj/JsBridge — 9.9k★ on GitHub (Java). android java and javascript bridge, inspired by wechat webview jsbridge
Snapshot summary built from the project's own GitHub metadata — there's no written TopGit review yet. The page will update automatically when a full review is published.
WHY NO REVIEW YET
TopGit writes full reviews for the most-starred, most-requested repositories. This page is a snapshot until then — see the READ ME tab for the original README in full.
By default, callbacks are removed after first invocation. Use persistent callbacks for multi-response scenarios (real-time updates, event streams):
// Java: callback survives multiple invocations
webView.callHandlerPersistent("functionInJs", data, new OnBridgeCallback() {
@Override
public void onCallBack(String data) {
Log.d(TAG, "called again: " + data); // can be called multiple times
}
});
Domain Whitelist (Security)
Restrict which origins can call native methods through the bridge. When a whitelist is set, only pages from allowed hosts can invoke @JavascriptInterface methods:
// Only allow your own domains
webView.addAllowedHost("example.com");
webView.addAllowedHost("*.example.com"); // wildcard for subdomains
// Or set all at once
Set<String> hosts = new HashSet<>(Arrays.asList("app.com", "*.app.com"));
webView.setAllowedHosts(hosts);
// Or use BridgeConfig for full control
BridgeConfig config = new BridgeConfig();
config.addAllowedHost("example.com");
webView.setBridgeConfig(config);
When the whitelist is empty (default), all origins are allowed — fully backward compatible.
BridgeHelper (Custom WebView Integration)
If you need JsBridge on a custom WebView (not BridgeWebView), use BridgeHelper:
Does happydog-intj/JsBridge have a project website?
No homepage URL was recorded for happydog-intj/JsBridge in TopGit's last sync. The README tab above frequently contains screenshots and demo links, or check the repository description on GitHub.
Does happydog-intj/JsBridge have any tags?
TopGit's last sync did not record any GitHub topics for happydog-intj/JsBridge. GitHub topics appear in the right sidebar of a repository page; that's the authoritative place to check.
How active is development on happydog-intj/JsBridge?
The most recent commit recorded on happydog-intj/JsBridge was 2 months ago, based on the GitHub push timestamp. The repository has 2.0k forks — one of the better signals of community interest.
How many stars does happydog-intj/JsBridge have?
happydog-intj/JsBridge has 9.9k GitHub stars — refresh the page for the live number, or check github.com/happydog-intj/JsBridge. TopGit mirrors GitHub's count but does not claim minute-by-minute accuracy.
Is happydog-intj/JsBridge open source?
TopGit's metadata for happydog-intj/JsBridge does not record a license. Most public repositories on GitHub ARE open source, but the exact terms vary — verify by opening the LICENSE file directly.
Where do I read more about happydog-intj/JsBridge?
This TopGit page is a snapshot — the READ ME tab shows the project's own README content (links stripped, images preserved). The GitHub repository at github.com/happydog-intj/JsBridge is the definitive source.
Read full README in the tab above.
Curious whether JsBridge is right for you?
Let ChatGPT, Claude, or Perplexity look into it — click below and see what AI actually says about JsBridge.