{"id":21223174,"url":"https://github.com/miguelsavignano/android-hybrid-webview","last_synced_at":"2026-05-18T04:38:44.880Z","repository":{"id":92585222,"uuid":"57311748","full_name":"MiguelSavignano/android-hybrid-webview","owner":"MiguelSavignano","description":"Simple web view","archived":false,"fork":false,"pushed_at":"2019-04-20T22:44:25.000Z","size":190,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-05-31T04:07:17.785Z","etag":null,"topics":["android","example"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MiguelSavignano.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2016-04-28T15:18:28.000Z","updated_at":"2022-05-27T19:51:22.000Z","dependencies_parsed_at":"2023-04-24T02:32:17.187Z","dependency_job_id":null,"html_url":"https://github.com/MiguelSavignano/android-hybrid-webview","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/MiguelSavignano/android-hybrid-webview","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MiguelSavignano%2Fandroid-hybrid-webview","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MiguelSavignano%2Fandroid-hybrid-webview/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MiguelSavignano%2Fandroid-hybrid-webview/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MiguelSavignano%2Fandroid-hybrid-webview/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MiguelSavignano","download_url":"https://codeload.github.com/MiguelSavignano/android-hybrid-webview/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MiguelSavignano%2Fandroid-hybrid-webview/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275622307,"owners_count":25498326,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-17T02:00:09.119Z","response_time":84,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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","example"],"created_at":"2024-11-20T22:50:04.208Z","updated_at":"2025-09-17T15:55:38.338Z","avatar_url":"https://github.com/MiguelSavignano.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Simple Hybrid WebView App\n\nConvert website in android apk.\n\n## Change web url\n\nopen file `app/src/main/java/com.example.webview/MainActivity.kt` and change the WEB_URL const\n\n```\nconst val WEB_URL = \"https://my-responsive-website\"\n```\n\n## Create icon\n\nUsing Android studio\nImportFile \u003e New \u003e Image Asset\nor copy the new icon in all mipmap folders\n\n```\ncp ic_launcher.png ./app/src/main/res/mipmap*\n```\n\n## Build app\n\nApk path\n\n```\n/app/build/outputs/apk/debug/app-debug.apk\n```\n\n### Override webview\n\nIn hybrid webview you nedd to simulate a native application you can override some content of the webpage injenting javascript.\nonPageFinished run the script src/main/res/assets/initJavascript.js to override header, footer and change eventlisteners.\n\nEJ:\n\n```javascript\n$(\"header\") \u0026\u0026 $(\"header\").remove();\n$(\"footer\") \u0026\u0026 $(\"footer\").remove();\n```\n\n### Native events\n\nListener javascript events in native code.\nThe global Object \"Android\" help to comunicate webview with native code.\n\nExample:\n\n- Native\n\n```java\nclass WebAppInterface(private val mContext: Context) {\n\n  @JavascriptInterface\n  fun showToast(toast: String) {\n    Toast.makeText(mContext, toast, Toast.LENGTH_SHORT).show()\n  }\n}\n```\n\n- Webview\n\n```javascript\nAndroid.showToast(\"Hello world!!!\");\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiguelsavignano%2Fandroid-hybrid-webview","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmiguelsavignano%2Fandroid-hybrid-webview","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiguelsavignano%2Fandroid-hybrid-webview/lists"}