Git Product home page Git Product logo

android-webview-app's Introduction

Disclaimer: This is a sample code provided for educational purposes. Make sure to test thoroughly and adapt it to your specific requirements before using it in production environments.

Android-Webview-App

This Android application demonstrates how to use a WebView to display web content, handle file downloads, and manage network connectivity.

Platform API

Features

  • WebView Integration: Utilizes Android's WebView to display web content within the application.
  • JavaScript Support: Enables JavaScript execution within the WebView for interactive web experiences.
  • File Download Handling: Implements a DownloadListener to handle file downloads initiated within the WebView.
  • Network Connectivity Management: Monitors network connectivity changes and adjusts WebView content accordingly.
  • Offline Mode Handling: Displays an offline HTML page when there is no network connection available.

Compatibility

This code is compatible with devices running Android API level 30 (Android 11) and above.

Contributions

Contributions are welcome! If you find any issues or have suggestions for improvements, feel free to open an issue or create a pull request.

Screenshot

Demo

Download here : Demo Apk

Getting Started

To integrate this code into your Android project, follow these steps:

  1. Create a new Android project in Android Studio.
  2. Replace the contents of MainActivity.java with the provided code.
  3. Customize layout files and assets as per your requirements.
  4. Ensure to handle necessary permissions for internet access and file storage in the AndroidManifest.xml file.

You can also download the repository or clone it and import it directly into Android Studio.

Changing the Website URL

To use your desired website URL:

  1. Open the app/src/main/java/com/webview/myapplication/MainActivity.java file.
  2. Replace https://github.com/BishwasSagar with your desired URL.
mWebView.loadUrl("https://github.com/BishwasSagar");

Make sure to update both occurrences, found on lines 52 and 62.

android-webview-app's People

Contributors

bishwassagar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

android-webview-app's Issues

Wich versions

What versions do i need to set in studio? (JDK, Gradle versions??)

Add Feature: Full Screen Video

It can't show full screen video, example in YouTube.please add this and make sure to auto vertical when playing full screen video

muted video

thanks for your example, i used it to play some videos from a web, but thwy initiate muted, it's a permission problem?

Issue in offline page

Offline page showing "webpage not availble" please add a offline page to hide website url.

camera

hello brother , can we add a function that can capture camera input? thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.