Loading...

Simple WebView for Android

The world is moving at a fast pace. New things are being developed each day. Each day developing a new thing from scratch is a lot time-consuming. So, libraries are available for all programmers to reduce their stress from building things from scratch. Android developers have access to thousand of java and Kotlin libraries for developing applications in minimal time. 

WebViewer library offers developers to easily use its feature for displaying a webView inside their applications. WebViewer application library comes in handy as it connects an android application to a website. It displays a responsive webView of the URL inside the application.

These kinds of libraries are made for our fellow android developers to easily develop an application without the need to re-write a whole program that has already been developed. A question might emerge as to why use WebViewer when already better browsers exist such as Chrome, Firefox and many more.

So, as being a developer or application owner you want your user to have a better experience and keep using the application. WebView allows you to display a responsive website inside of your application. This not only helps in providing the user with a better experience inside the application but also will help developers in terms of tracking necessary data.

You can also try out this library on your device before deploying it on your code. Try the web view library through the following link

Without further ado, let us get straight on how this library can be implemented in your application. 

  • Using Maven


<dependency>
  <groupId>com.github.fobid</groupId>
  <artifactId>webviewer</artifactId>
  <version>0.71.0</version>
</dependency>

  • Or Through Gradle

compile 'com.github.fobid:webviewer:0.71.0'

Now, for the usage part, the following codes will be used:


  1. The code will include WebViewer into your AndroidManifest.xml

<activity
    android:name="com.tfc.webviewer.ui.WebViewerActivity"
    android:configChanges="orientation|screenSize" />


  1. Displaying a particular website in a webview

String url = "https://www.github.com/fobidlim";
// String url = "www.github.com/fobidlim";
// String url = "github.com/fobidlim";

Intent intent = new Intent(Context, WebViewerActivity.class);
intent.putExtra(WebViewerActivity.EXTRA_URL, url);
startActivity(intent);

Using these simple lines of code, written in Kotlin and Java, you will be able to have a web view inside your application without depending on other third-party applications. I Hope the library came in handy as webView is being used more frequently on mobile applications. 

Download complete project source code from GitHub
WebView 3108361713275364980
Home item