{"id":15131261,"url":"https://github.com/googlearchive/chromium-webview-samples","last_synced_at":"2025-09-28T22:31:26.695Z","repository":{"id":11257853,"uuid":"13659167","full_name":"googlearchive/chromium-webview-samples","owner":"googlearchive","description":"Useful examples for Developing apps with the Chromium based WebView","archived":true,"fork":false,"pushed_at":"2017-04-18T08:12:59.000Z","size":6457,"stargazers_count":1180,"open_issues_count":11,"forks_count":373,"subscribers_count":82,"default_branch":"master","last_synced_at":"2024-09-27T03:40:14.601Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://developers.google.com/chrome/mobile/docs/webview/overview","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/googlearchive.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}},"created_at":"2013-10-17T19:40:05.000Z","updated_at":"2024-09-20T02:23:52.000Z","dependencies_parsed_at":"2022-09-16T03:51:57.087Z","dependency_job_id":null,"html_url":"https://github.com/googlearchive/chromium-webview-samples","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/googlearchive%2Fchromium-webview-samples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/googlearchive%2Fchromium-webview-samples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/googlearchive%2Fchromium-webview-samples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/googlearchive%2Fchromium-webview-samples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/googlearchive","download_url":"https://codeload.github.com/googlearchive/chromium-webview-samples/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234569705,"owners_count":18854133,"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","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":[],"created_at":"2024-09-26T03:40:19.963Z","updated_at":"2025-09-28T22:31:26.106Z","avatar_url":"https://github.com/googlearchive.png","language":"Java","funding_links":[],"categories":["Java"],"sub_categories":[],"readme":"Chromium WebView Samples\n===========================\n\nThis is a repository with useful examples for developing apps using the Chromium WebView.\n\nIf you spot any issues or questions please feel free to file an issue or reach out to [@gauntface](http://www.twitter.com/gauntface).\n\n## WebRTC\n\nIn the Developer Preview of L the WebView will support WebRTC.\n\nThe methods this example relies may change as this is only a preview. At the\nmoment the example is using the new permission request API in WebChromeClient:\n\n    mWebRTCWebView.setWebChromeClient(new WebChromeClient() {\n        @Override\n        public void onPermissionRequest(final PermissionRequest request) {\n            getActivity().runOnUiThread(new Runnable() {\n                @Override\n                public void run() {\n                    request.grant(request.getResources());\n                }\n            });\n        }\n    });\n\nIn the final version of this example should change with the launch of L to use the\npreauthorizePermission method (At the moment this method is not working).\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"http://i.imgur.com/AUYL7dK.png\" alt=\"WebRTC on the Chrome WebView Example\" /\u003e\n\u003c/p\u003e\n\n##TEXT_AUTOSIZING\n\nFrom KitKat and above, there will no longer be support for [SINGLE_COLUMN or NARROW_COLUMN layout algorithms](http://developer.android.com/reference/android/webkit/WebSettings.LayoutAlgorithm.html).\n\nHowever a new layout algorithm [TEXT_AUTOSIZING](http://developer.android.com/reference/android/webkit/WebSettings.LayoutAlgorithm.html) was added and *textautosizing-example* contains a basic example to see the affects of the algorithm.\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"http://i.imgur.com/03c0isb.png\" alt=\"Image Show off TEXT_AUTOSIZING\" /\u003e\n\u003c/p\u003e\n\n##Touch Events in the WebView\n\nIn the older version of the WebView developers didn't need to implement the *touchcancel* event, although it's good practice to do so.\n\nIn the Chromium WebView it's important to implement the *touchcancel* event as certain scenarios will  trigger a *touchcancel* event instead of a *touchend* event, where they wouldn't before (i.e. a user scrolls off of an element or e.preventDefault() isn't called in the *touchstart* event).\n\nThe *web-touch-example* contains a simple app which uses touch to move an element and reveal a little Android.\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"http://i.imgur.com/ffz4gkV.png\" alt=\"Image of WebView Touch Example\" /\u003e\n\u003c/p\u003e\n\n##JS Interface in the WebView\n\nThis example demonstrates the following:\n\n  * Using evaluateJavascript()\n  * Adding a javascript interface\n  * Hiding the white flash of the WebView load\n  * Saving state of the WebView\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"http://i.imgur.com/iL4aB0r.png\" alt=\"Image of WebView JS Interface\" /\u003e\n\u003c/p\u003e\n\n## Fullscreen Video\n\nThis demo illustrates how to set a custom poster image, how to show the fullscreen\nbutton for a \u003cvideo\u003e element only when available and how to implement fullscreen\nvideos.\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"http://i.imgur.com/J3x6ch8.png\" alt=\"Image of Fullscreen Video Sample\" /\u003e\n\u003c/p\u003e\n\n## File Input\n\nThis demonstrates the use of the onShowFileChooser() method in WebChromeClient\nincluding how to handle the activity result.\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"http://i.imgur.com/0wynCKL.png\" alt=\"Image of File Input Sample\" /\u003e\n\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgooglearchive%2Fchromium-webview-samples","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgooglearchive%2Fchromium-webview-samples","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgooglearchive%2Fchromium-webview-samples/lists"}