Coder Social home page Coder Social logo

sureshtimma / android-webview-app Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bishwassagar/android-webview-app

0.0 0.0 0.0 5.1 MB

A Simple To Use App That Shows Web Pages Within The App And Download Content Using Phone's Internal Downloader

License: GNU General Public License v3.0

Java 87.72% HTML 12.28%

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

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.