applecrusher
applecrusher

Reputation: 5648

Are IOS & Android Apps with Webview Only Considered Hybrid, or Web Apps?

My confusion is whether an app created in Java or Swift with just a webview is considered a Hybrid, or Web App. I understand that a Web App use the web almost exclusively, but if it's a webview through a Java Webview is it really considered a Web App or is it a hybrid app because it has the potential to use both native and Web App features? I get mixed definitions about this particular definition.

Google says this about web app:

There are essentially two ways to deliver an application on Android: as a client-side application (developed using the Android SDK and installed on user devices in an APK) or as a web application (developed using web standards and accessed through a web browser—there's nothing to install on user devices). https://developer.android.com/guide/webapps/index.html

Apple says this about web apps:

A web application is designed to look and behave in a way similar to a native application—for example, it is scaled to fit the entire screen on iOS. You can tailor your web application for Safari on iOS even further, by making it appear like a native application when the user adds it to the Home screen. You do this by using settings for iOS that are ignored by other platforms.

https://developer.apple.com/library/ios/documentation/AppleApplications/Reference/SafariWebContent/ConfiguringWebApplications/ConfiguringWebApplications.html

Why is this important to me & why do I bother asking? I need to explain to people the differences and importance between these three when talking about future development of a new app I am creating. I am new to the app world and don't quite understand the consensus on this and I want to sound competent when I explain it. I would consider an Java or Swift made App with a Webview just a Web App and not a Hybrid app. But it could become a Hybrid App if more was added. However I can see it being a Hybrid App from the start.

Upvotes: 11

Views: 5774

Answers (2)

AADProgramming
AADProgramming

Reputation: 6345

Since I worked on it, I could share my own understanding about this topic:

Hybrid apps: These are developed using Web technologies like HTML5, CSS and typically Programmed using JavaScript. Next, in order for them to be able to distribute using Google Play store or App Store, they are build using mobile framework such as PhoneGap or Cordova. This result in generation of apk file for android and ipa for iOS. These files then can be deployed and distributed through Google Play store or App Store.

So, it has things of both world :

  1. Same code base for both android and ios(as they are developed using HTML/CSS/JS) and 2. Native-app like distribution model which used Google Play store or App Store. Hence the Name Hybrid.

Web Apps: These are essentially accessed through a web browser—there's nothing to install on user devices like a apk or ipa file. These are not distributed using Google Play store or Apple Store. Instead, can be accessed using the Device's Web browser and appropriate URLs

About WebView It is the widget provided by Operating system which allow apps to display the web pages within an app.

So, if you develop say, an Android app, using Standard Android SDK but it uses nothing but a WebView, it is considered as a Native app(and Not a Hybrid or web app) because it is using the Native SDK Component(WebView). Also, it will be distributed through Google Play store or App Store.

Upvotes: 12

sushildlh
sushildlh

Reputation: 9056

WEBVIEW Introduction

Webview allows 3rd party apps to show content in an in-app browser or in an app screen that pulls from the web.

Android Webview is a component of Android where you can load HTML pages either from the local (assets directory) or from the web.

Android WebView allows you to convert a web page to your android application either by viewing URL or your own HTML markup page.

Wep Apps

In Android you using WebApps, when you don't want to integrate any functionality of Android .

You fully depend on your Web pages like (HTML,CSS , JAVASCRIPT ,etc).

That means there is no diffenece in your Website and Mobile Apps.

This is basic example of WebApps.....

Add these 2 permission in manifest file....

  <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
  <uses-permission android:name="android.permission.INTERNET" />

activity_web.xml

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <WebView
        android:id="@+id/web"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent" />

</RelativeLayout>

WebActivity.....

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.webkit.WebView;

public class WebActivity extends AppCompatActivity {

    private WebView mWeb;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_web);

        mWeb = (WebView) findViewById(R.id.web);
        mWeb.setWebViewClient(new MyBrowser());         
        mWeb.getSettings().setLoadsImagesAutomatically(true);
        mWeb.getSettings().setJavaScriptEnabled(true);     
        mWeb.setScrollBarStyle(View.SCROLLBARS_INSIDE_OVERLAY);
        mWeb.loadUrl("https://www.google.co.in/");

    }

    @Override
    public void onBackPressed() {          //this is use for the accessing or impleament back button
        if (mWeb.canGoBack())
            mWeb.goBack();
        else
            super.onBackPressed();
    }
}

MyBrowser.....

import android.webkit.WebView;
import android.webkit.WebViewClient;

public class MyBrowser extends WebViewClient {
    @Override
    public boolean shouldOverrideUrlLoading(WebView view, String url) {
        view.loadUrl(url);
        return true;
    }
}

Hybrid Apps

In Hybrid Apps We can implement only specfic works of WebPages.

Hybrid Apps Advantages....

User Inteface is more attractive.......

Work on offline mode.........

Getting user more information (like Mobile informations).

And more about the usage ........

Storages of files (like :- images ,video,etc)............

In Hybrid Apps we are implemented some specfic pages like...

Payment Gatways ......

Ours Own Advertisment (its takes lot of memory to store images and video in android)........

and more .........

That is all i know about WEBVIEW ........

enjoy coding........

Upvotes: 4

Related Questions