├── app ├── .gitignore ├── src │ └── main │ │ ├── assets │ │ ├── web │ │ │ ├── swv_splash.png │ │ │ ├── swv_splash_white.png │ │ │ ├── error.html │ │ │ ├── offline.html │ │ │ └── script.js │ │ └── swv.properties │ │ ├── ic_launcher-playstore.png │ │ ├── res │ │ ├── raw │ │ │ └── front_splash.png │ │ ├── raw-night │ │ │ └── front_splash.png │ │ ├── mipmap-hdpi │ │ │ ├── ic_launcher.webp │ │ │ ├── ic_launcher_round.webp │ │ │ ├── ic_launcher_background.webp │ │ │ └── ic_launcher_foreground.webp │ │ ├── mipmap-mdpi │ │ │ ├── ic_launcher.webp │ │ │ ├── ic_launcher_round.webp │ │ │ ├── ic_launcher_background.webp │ │ │ └── ic_launcher_foreground.webp │ │ ├── mipmap-xhdpi │ │ │ ├── ic_launcher.webp │ │ │ ├── ic_launcher_round.webp │ │ │ ├── ic_launcher_background.webp │ │ │ └── ic_launcher_foreground.webp │ │ ├── mipmap-xxhdpi │ │ │ ├── ic_launcher.webp │ │ │ ├── ic_launcher_round.webp │ │ │ ├── ic_launcher_background.webp │ │ │ └── ic_launcher_foreground.webp │ │ ├── mipmap-xxxhdpi │ │ │ ├── ic_launcher.webp │ │ │ ├── ic_launcher_round.webp │ │ │ ├── ic_launcher_background.webp │ │ │ └── ic_launcher_foreground.webp │ │ ├── xml │ │ │ ├── gma_ad_services_config.xml │ │ │ └── provider_paths.xml │ │ ├── drawable │ │ │ ├── background_splash.xml │ │ │ ├── side_nav_bar.xml │ │ │ ├── ic_home.xml │ │ │ ├── ic_menu_manage.xml │ │ │ ├── ic_doc.xml │ │ │ ├── ic_search.xml │ │ │ ├── ic_dark_mode.xml │ │ │ ├── ic_help.xml │ │ │ └── progress_style.xml │ │ ├── mipmap-anydpi-v26 │ │ │ ├── ic_launcher.xml │ │ │ └── ic_launcher_round.xml │ │ ├── values │ │ │ ├── dimens.xml │ │ │ ├── ads.xml │ │ │ ├── colors.xml │ │ │ ├── themes.xml │ │ │ ├── styles.xml │ │ │ └── strings.xml │ │ ├── values-w820dp │ │ │ └── dimens.xml │ │ ├── values-night │ │ │ ├── themes.xml │ │ │ └── colors.xml │ │ ├── layout │ │ │ ├── drawer_switch_item.xml │ │ │ ├── activity_splash.xml │ │ │ ├── drawer_main.xml │ │ │ ├── security_overlay.xml │ │ │ ├── drawer_main_header.xml │ │ │ ├── drawer_main_content.xml │ │ │ ├── welcome_splash.xml │ │ │ ├── drawer_main_bar.xml │ │ │ └── activity_main.xml │ │ └── menu │ │ │ ├── main.xml │ │ │ └── activity_main_drawer.xml │ │ ├── java │ │ └── mgks │ │ │ └── os │ │ │ └── swv │ │ │ ├── PluginInterface.java │ │ │ ├── MetaPull.java │ │ │ ├── ShareActivity.java │ │ │ ├── Firebase.java │ │ │ ├── plugins │ │ │ ├── QRScannerPlugin.java │ │ │ ├── ImageCompressionPlugin.java │ │ │ ├── ToastPlugin.java │ │ │ └── RatingPlugin.java │ │ │ ├── PermissionManager.java │ │ │ └── PluginManager.java │ │ └── AndroidManifest.xml ├── proguard-rules.pro └── build.gradle ├── settings.gradle ├── demo ├── favicon.ico ├── swv_splash.png ├── ios_swv_splash.png ├── swv_splash_white.png ├── ios_swv_splash_white.png ├── error.html ├── index.html └── script.js ├── .vscode └── settings.json ├── docmd ├── assets │ └── images │ │ ├── cover-swv.png │ │ └── swv-logo.png ├── package.json └── content │ ├── features │ ├── printing.md │ ├── navigation.md │ ├── analytics.md │ ├── sharing.md │ ├── index.md │ ├── dark-mode.md │ └── firebase-messaging.md │ ├── license.md │ ├── index.md │ ├── plugins │ ├── toast.md │ ├── index.md │ ├── qr-barcode-reader.md │ ├── rating-system.md │ ├── location.md │ ├── image-compression.md │ ├── admob.md │ ├── biometric-auth.md │ ├── playground.md │ ├── dialog.md │ └── creating-plugins.md │ ├── contributing.md │ ├── getting-started.md │ ├── customization.md │ ├── configuration.md │ └── play-store-guide.md ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── .github ├── ISSUE_TEMPLATE │ ├── regular_issue.md │ ├── feature_ideas.md │ └── bug_report.md ├── FUNDING.yml ├── dependabot.yml └── workflows │ └── deploy.yml ├── .gitignore ├── gradle.properties ├── LICENSE ├── gradlew.bat ├── CODE_OF_CONDUCT.md └── gradlew /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' -------------------------------------------------------------------------------- /demo/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mgks/Android-SmartWebView/HEAD/demo/favicon.ico -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "java.configuration.updateBuildConfiguration": "interactive" 3 | } -------------------------------------------------------------------------------- /demo/swv_splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mgks/Android-SmartWebView/HEAD/demo/swv_splash.png -------------------------------------------------------------------------------- /demo/ios_swv_splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mgks/Android-SmartWebView/HEAD/demo/ios_swv_splash.png -------------------------------------------------------------------------------- /demo/swv_splash_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mgks/Android-SmartWebView/HEAD/demo/swv_splash_white.png -------------------------------------------------------------------------------- /demo/ios_swv_splash_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mgks/Android-SmartWebView/HEAD/demo/ios_swv_splash_white.png -------------------------------------------------------------------------------- /docmd/assets/images/cover-swv.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mgks/Android-SmartWebView/HEAD/docmd/assets/images/cover-swv.png -------------------------------------------------------------------------------- /docmd/assets/images/swv-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mgks/Android-SmartWebView/HEAD/docmd/assets/images/swv-logo.png -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mgks/Android-SmartWebView/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /app/src/main/assets/web/swv_splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mgks/Android-SmartWebView/HEAD/app/src/main/assets/web/swv_splash.png -------------------------------------------------------------------------------- /app/src/main/ic_launcher-playstore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mgks/Android-SmartWebView/HEAD/app/src/main/ic_launcher-playstore.png -------------------------------------------------------------------------------- /app/src/main/res/raw/front_splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mgks/Android-SmartWebView/HEAD/app/src/main/res/raw/front_splash.png -------------------------------------------------------------------------------- /app/src/main/res/raw-night/front_splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mgks/Android-SmartWebView/HEAD/app/src/main/res/raw-night/front_splash.png -------------------------------------------------------------------------------- /app/src/main/assets/web/swv_splash_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mgks/Android-SmartWebView/HEAD/app/src/main/assets/web/swv_splash_white.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mgks/Android-SmartWebView/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mgks/Android-SmartWebView/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mgks/Android-SmartWebView/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mgks/Android-SmartWebView/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mgks/Android-SmartWebView/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/regular_issue.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Regular Issue 3 | about: Anything else you would like to share, suggest or report 4 | labels: 5 | --- 6 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mgks/Android-SmartWebView/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mgks/Android-SmartWebView/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mgks/Android-SmartWebView/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mgks/Android-SmartWebView/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher_background.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mgks/Android-SmartWebView/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher_background.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mgks/Android-SmartWebView/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher_background.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mgks/Android-SmartWebView/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher_background.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mgks/Android-SmartWebView/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mgks/Android-SmartWebView/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher_background.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mgks/Android-SmartWebView/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher_background.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mgks/Android-SmartWebView/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher_background.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mgks/Android-SmartWebView/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher_background.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mgks/Android-SmartWebView/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp -------------------------------------------------------------------------------- /app/src/main/res/xml/gma_ad_services_config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher_background.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mgks/Android-SmartWebView/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher_background.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mgks/Android-SmartWebView/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp -------------------------------------------------------------------------------- /app/src/main/res/drawable/background_splash.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /app/src/main/res/xml/provider_paths.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Sat Apr 26 02:11:58 IST 2025 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-bin.zip 5 | zipStoreBase=GRADLE_USER_HOME 6 | zipStorePath=wrapper/dists 7 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/side_nav_bar.xml: -------------------------------------------------------------------------------- 1 | 3 | 8 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_home.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16dp 4 | 16dp 5 | 8dp 6 | 176dp 7 | 16dp 8 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/values-w820dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 64dp 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/values/ads.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | ca-app-pub-3940256099942544~3347511713 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_menu_manage.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_doc.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/values-night/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: mgks 4 | patreon: # Replace with a single Patreon username 5 | open_collective: # Replace with open collective username 6 | ko_fi: #mgksdev 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | otechie: # Replace with a single Otechie username 12 | custom: # 13 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_search.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | #FFFFFF 5 | #F0F0F0 6 | #EAEAEA 7 | #4AAB33 8 | #399623 9 | #1D1D1F 10 | #555555 11 | #449a2f 12 | #FFFFFF 13 | #000000 14 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_dark_mode.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/layout/drawer_switch_item.xml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 14 | -------------------------------------------------------------------------------- /app/src/main/res/menu/main.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 12 | 16 | -------------------------------------------------------------------------------- /app/src/main/res/values-night/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | #105203 5 | #063401 6 | #141a13 7 | #4AAB33 8 | #399623 9 | #E4E4E6 10 | #F1F1F1 11 | #449a2f 12 | #FFFFFF 13 | #000000 14 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_help.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_splash.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 15 | 16 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_ideas.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature Ideas 3 | about: Suggest an idea for the project 4 | labels: 5 | --- 6 | 7 | **Is your feature request connected to a problem you're trying to solve? Please describe.** 8 | # A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 9 | 10 | **Describe the possible solution according to you (if any)** 11 | # A clear and concise description of what your solution to the problem is. 12 | 13 | **Describe alternatives you've considered** 14 | # Any alternative solutions or features you've considered. 15 | 16 | **Additional context** 17 | # Add any other context or log/screenshot(s) about the feature. 18 | -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in C:\Android\sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | # -keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | # } 18 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug Report 3 | about: Create a report to help the project improve 4 | labels: 5 | --- 6 | 7 | **Bug Description** 8 | # A clear and concise description of what the bug is, better if you can attach a log. 9 | 10 | **Expected Behavior** 11 | # A clear and concise description of what you expected to happen. 12 | 13 | **Any Logs/Screenshots** 14 | # If applicable, add a log or screenshot(s) to help explain your problem. 15 | 16 | **Device(s) (recommended):** 17 | - Device name/variant: [e.g. Google Pixel/6, Samsung Galaxy/J2] 18 | - Build: [e.g. arm, x86] 19 | - Android Version: [e.g. API 27 or Oreo] 20 | 21 | **Additional Context** 22 | # Any other optional context/comment about the problem. 23 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | #built application files 2 | *.apk 3 | *.ap_ 4 | *.aab 5 | 6 | # files for the dex VM 7 | *.dex 8 | 9 | # Java class files 10 | *.class 11 | 12 | # generated files 13 | bin/ 14 | gen/ 15 | 16 | # Local configuration file (sdk path, etc) 17 | local.properties 18 | 19 | # google config files 20 | google-services.json 21 | 22 | # Windows thumbnail db 23 | Thumbs.db 24 | 25 | # OSX files 26 | .DS_Store 27 | 28 | # Android Studio 29 | *.iml 30 | .idea 31 | .gradle/ 32 | build/ 33 | .navigation 34 | captures/ 35 | output.json 36 | 37 | # NDK 38 | obj/ 39 | .externalNativeBuild 40 | 41 | # Ignoring internal files 42 | createContext.js 43 | .cursorignore 44 | roadmap.md 45 | context.md 46 | PLUGINS.md 47 | aicontext.json 48 | /node_modules 49 | /site 50 | genctx.json 51 | .vscode/ 52 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | # 1. Android/Gradle Dependencies 4 | - package-ecosystem: "gradle" 5 | directory: "/" 6 | schedule: 7 | interval: "weekly" 8 | day: "monday" 9 | time: "06:00" 10 | timezone: "Asia/Kolkata" 11 | groups: 12 | all-dependencies: 13 | patterns: 14 | - "*" 15 | # Ignore major version jumps (e.g. v8 -> v9) to prevent breaking changes 16 | ignore: 17 | - dependency-name: "*" 18 | update-types: ["version-update:semver-major"] 19 | 20 | # 2. GitHub Actions (Workflows) 21 | - package-ecosystem: "github-actions" 22 | directory: "/" 23 | schedule: 24 | interval: "monthly" 25 | groups: 26 | all-actions: 27 | patterns: 28 | - "*" 29 | -------------------------------------------------------------------------------- /docmd/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "android-smartwebview", 3 | "version": "1.0.0", 4 | "description": "Smart WebView is a versatile and lightweight project designed to help you quickly convert your website or web application into a native mobile app.", 5 | "homepage": "https://github.com/mgks/Android-SmartWebView#readme", 6 | "bugs": { 7 | "url": "https://github.com/mgks/Android-SmartWebView/issues" 8 | }, 9 | "repository": { 10 | "type": "git", 11 | "url": "git+https://github.com/mgks/Android-SmartWebView.git" 12 | }, 13 | "author": "Ghazi Khan", 14 | "scripts": { 15 | "dev": "docmd dev", 16 | "build": "docmd build", 17 | "preview": "npx serve build" 18 | }, 19 | "engines": { 20 | "node": ">=22.0.0" 21 | }, 22 | "license": "MIT", 23 | "private": true, 24 | "dependencies": { 25 | "@mgks/docmd": "^0.3.0" 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /app/src/main/res/layout/drawer_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 13 | 14 | 15 | 16 | 23 | 24 | -------------------------------------------------------------------------------- /app/src/main/res/layout/security_overlay.xml: -------------------------------------------------------------------------------- 1 | 2 | 12 | 13 | 22 | ``` 23 | 24 | --- 25 | 26 | ## How it Works 27 | 28 | 1. A user clicks a `print:` link in the WebView. 29 | 2. The `shouldOverrideUrlLoading` method in `MainActivity.java` intercepts this URL. 30 | 3. It calls the `Functions.print_page` method. 31 | 4. This method uses the Android `PrintManager` service to create a print job from the current WebView content. 32 | 5. The standard Android print preview screen appears, allowing the user to select a printer, save as a PDF, and adjust settings. 33 | 34 | ::: callout tip 35 | The quality of the printout depends on how well your webpage's CSS is optimized for print media (e.g., using `@media print` styles). 36 | ::: 37 | 38 | --- 39 | 40 | ## Requirements 41 | 42 | * Android 4.4 (KitKat, API 19) or higher. 43 | * The device must have print services enabled or configured (e.g., Cloud Print, Wi-Fi Direct printing, or Save as PDF). -------------------------------------------------------------------------------- /docmd/content/license.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'License' 3 | description: 'Smart WebView is open-source software licensed under the MIT License.' 4 | icon: 'scroll' 5 | --- 6 | 7 | ## MIT License 8 | 9 | Copyright (c) 2015 - Present 10 | 11 | Permission is hereby granted, free of charge, to any person obtaining a copy 12 | of this software and associated documentation files (the "Software"), to deal 13 | in the Software without restriction, including without limitation the rights 14 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 15 | copies of the Software, and to permit persons to whom the Software is 16 | furnished to do so, subject to the following conditions: 17 | 18 | The above copyright notice and this permission notice shall be included in all 19 | copies or substantial portions of the Software. 20 | 21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 22 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 23 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 24 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 25 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 26 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 27 | SOFTWARE. 28 | 29 | --- 30 | 31 | ::: card 32 | [View LICENSE File on GitHub](https://github.com/mgks/Android-SmartWebView/blob/master/LICENSE) 33 | ::: 34 | ::: card 35 | [Read MIT License Definition](https://opensource.org/licenses/MIT) 36 | ::: -------------------------------------------------------------------------------- /app/src/main/res/layout/welcome_splash.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 21 | 22 | 35 | 36 | -------------------------------------------------------------------------------- /app/src/main/java/mgks/os/swv/PluginInterface.java: -------------------------------------------------------------------------------- 1 | package mgks.os.swv; 2 | 3 | /* 4 | Smart WebView v8 5 | https://github.com/mgks/Android-SmartWebView 6 | 7 | A modern, open-source WebView wrapper for building advanced hybrid Android apps. 8 | Native features, modular plugins, and full customisation—built for developers. 9 | 10 | - Documentation: https://mgks.github.io/Android-SmartWebView/documentation 11 | - Plugins: https://mgks.github.io/Android-SmartWebView/documentation/plugins 12 | - Discussions: https://github.com/mgks/Android-SmartWebView/discussions 13 | - Sponsor the Project: https://github.com/sponsors/mgks 14 | 15 | MIT License — https://opensource.org/licenses/MIT 16 | 17 | Mentioning Smart WebView in your project helps others find it and keeps the dev loop alive. 18 | */ 19 | 20 | import android.app.Activity; 21 | import android.content.Intent; 22 | import android.webkit.WebView; 23 | import java.util.Map; 24 | import androidx.annotation.NonNull; 25 | 26 | public interface PluginInterface { 27 | void initialize(Activity activity, WebView webView, Functions functions, Map config); 28 | String getPluginName(); 29 | void onActivityResult(int requestCode, int resultCode, Intent data); 30 | void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults); 31 | boolean shouldOverrideUrlLoading(WebView view, String url); 32 | void onPageStarted(String url); 33 | void onPageFinished(String url); 34 | void onResume(); 35 | void onPause(); 36 | void onDestroy(); 37 | void evaluateJavascript(String script); 38 | } -------------------------------------------------------------------------------- /app/src/main/res/menu/activity_main_drawer.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 11 | 15 | 19 | 23 | 27 | 28 | 29 | 45 | -------------------------------------------------------------------------------- /docmd/content/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Android Smart WebView Project' 3 | description: 'Smart WebView is a versatile and lightweight **project** designed to help you quickly convert your website or web application into a native mobile app.' 4 | --- 5 | 6 | Smart WebView is a versatile and lightweight **project** designed to help you quickly convert your website or web application into a native mobile app. It provides a robust **foundation** with essential features built-in, saving you significant development time. 7 | 8 | ::: button Smart_WebView_on_GitHub external:https://github.com/mgks/Android-SmartWebView/ 9 | 10 | **Key Highlights:** 11 | 12 | * **Hybrid App Solution:** Seamlessly wrap your existing web content within a native container. 13 | * **Feature Rich:** Includes support for common requirements like file uploads, camera access, geolocation, push notifications (Firebase), analytics, and more. 14 | * **Customizable:** Easily configure and style the app to match your brand identity. 15 | * **Extensible:** (v7.0+) Features a powerful plugin architecture allowing developers to add custom native functionalities without altering the core code, making it behave more like a **framework** for hybrid apps. 16 | * **Modern:** Built with up-to-date native development practices, libraries, and target APIs (currently focused on Android). 17 | 18 | Whether you need a simple web wrapper or a more complex hybrid application with native integrations, Smart WebView provides a solid starting **point**. 19 | 20 | **Ready to get started?** Head over to the [Getting Started](/Android-SmartWebView/documentation/getting-started) guide. -------------------------------------------------------------------------------- /app/src/main/res/values/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 18 | 19 | 29 | 30 | 31 | 11 | 12 | 19 | 20 | 23 | 24 | 28 | 29 | 34 | 35 | 39 | 40 | 46 | 47 | 52 | 53 |