{"id":16391794,"url":"https://github.com/williamfzc/wvpm","last_synced_at":"2026-05-13T20:34:21.808Z","repository":{"id":113371256,"uuid":"322619072","full_name":"williamfzc/wvpm","owner":"williamfzc","description":"[WORKING IN PROGRESS] A lightweight performance monitor for webview in android, with kotlin.","archived":false,"fork":false,"pushed_at":"2021-01-05T12:09:28.000Z","size":248,"stargazers_count":0,"open_issues_count":5,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-22T22:27:30.022Z","etag":null,"topics":["android","jsbridge","kotlin","monitor","performance","webview"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/williamfzc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-12-18T14:33:43.000Z","updated_at":"2021-01-04T16:07:55.000Z","dependencies_parsed_at":"2023-06-15T11:15:49.242Z","dependency_job_id":null,"html_url":"https://github.com/williamfzc/wvpm","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/williamfzc/wvpm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/williamfzc%2Fwvpm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/williamfzc%2Fwvpm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/williamfzc%2Fwvpm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/williamfzc%2Fwvpm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/williamfzc","download_url":"https://codeload.github.com/williamfzc/wvpm/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/williamfzc%2Fwvpm/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32999512,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-13T13:14:54.681Z","status":"ssl_error","status_checked_at":"2026-05-13T13:14:51.610Z","response_time":115,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","jsbridge","kotlin","monitor","performance","webview"],"created_at":"2024-10-11T04:47:22.092Z","updated_at":"2026-05-13T20:34:21.784Z","avatar_url":"https://github.com/williamfzc.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WVPM \n\n![jitpack-badge](https://jitpack.io/v/williamfzc/wvpm.svg?style=flat-square)\n\nA lightweight performance monitor for webview in android, with kotlin.\n\n## TL;DR\n\nThis tool provided series of js scripts with their flags. You can easily use them on android side:\n\n```kotlin\nWvpmAPI.injectOnPageFinished(\n    mWebview,\n    WvpmJsFlag.FLAG_JS_PERF_TIMING,\n    fun(resp: WvpmResponse) {\n        Log.d(TAG, \"get js return after page finished in activity: ${resp.data}\")\n    }\n)\n// or other events too, e.g. onPageStarted ...\n```\n\nand get its return value in callback function:\n\n```javascript\nD/MainActivity: get js return after page finished in activity: {\"connectEnd\":1.608735286902e+12,\"connectStart\":1.608735286348e+12,\"domComplete\":1.608735311779e+12,\"domContentLoadedEventEnd\":1.608735295159e+12, ...\n```\n\nSomething more complex? Register a fps monitor:\n\n```kotlin\nWvpmAPI.registerFpsMonitor(\n    mWebview,\n    fun(resp: WvpmResponse) {\n        Log.w(TAG, \"fps warning: ${resp.data}\")\n    },\n    50\n)\n```\n\nWhen your page's fps is lower than 50 (as you set), your callback will be evaluated:\n\n```text\nW/MainActivity: fps warning: {\"current\":48,\"threshold\":50}\n```\n\nLess brain fuck. You can collect/save/upload them as you wish in callback functions.\n\nOriginally this tool was designed for working with apm systems. It should be extendable enough I think.\n\n## further goals (working in progress)\n\n- [x] Injecting some callback functions to webview events (e.g. onPageFinished)\n- [x] Built-in js scripts for easily getting something from js side (e.g. window.performance.xxx)\n- [ ] (Actually it can but I have no test) Working with ASM (dynamically applying this tool to all the webviews of your app)\n- [x] Different kinds of webviews\n- [x] Kotlin \u0026 Java usage\n\n## full example\n\nFull [demo](./demo) here.\n\nHow to use these API:\n\n- kotlin: [MainActivity.kt](./demo/app/src/main/java/com/github/williamfzc/webvpm_demo/MainActivity.kt)\n- java: [JavaActivity.java](./demo/app/src/main/java/com/github/williamfzc/webvpm_demo/JavaActivity.java)\n\n## installation\n\nThis repo uses [jitpack.io](jitpack.io).\n\nroot gradle:\n\n```bash\nallprojects {\n    repositories {\n        ...\n        maven { url 'https://jitpack.io' }\n    }\n}\n```\n\napp gradle:\n\n```bash\ndependencies {\n    implementation 'com.github.williamfzc:wvpm:0.2.2'\n}\n```\n\n## Why not Jsbridge?\n\nJsbridge is good in developping your own app. WVPM aims at debugging/test usage.\n\nBTW, it's nearly deprecated.\n\n## Inspired from ...\n\n- [DoraemonKit](https://github.com/didi/DoraemonKit)\n- [JsBridge](https://github.com/lzyzsd/JsBridge)\n- ...\n\nThanks.\n\n## License\n\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwilliamfzc%2Fwvpm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwilliamfzc%2Fwvpm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwilliamfzc%2Fwvpm/lists"}