Cordova Tutorial

Apache Cordova (formerly PhoneGap) lets you build mobile apps using the web technologies you likely already know — HTML, CSS, and JavaScript — and wraps that web app in a native shell (a WebView) that runs on Android and iOS like any other installed app. This track goes deep: not just "hello world," but the full lifecycle — project structure, the plugin ecosystem for native device features, debugging, and actually shipping a build to an app store.

Where this fits: Cordova is a hybrid framework, distinct from Flutter (compiles to native UI via Dart) and React Native (renders real native components via JavaScript/React) — Cordova apps run entirely inside a WebView, so solid HTML/CSS/JavaScript fundamentals matter more here than in the other two tracks.

How Cordova Actually Works

PieceWhat it does
WebViewA native, full-screen browser component that renders your HTML/CSS/JS as the entire app UI
Cordova native shellA thin native (Java/Kotlin or Swift/Obj-C) wrapper that hosts the WebView and bridges JavaScript calls to native device APIs
PluginsNative code + a JavaScript API that expose device features (camera, GPS, filesystem) to your web code — Cordova's core doesn't include these, you add only what you need
config.xmlThe single manifest file describing your app's ID, name, version, permissions, and platform-specific settings

A Quick Look Ahead

Example: Waiting for Cordova Before Using Device Features

document.addEventListener('deviceready', onDeviceReady, false);

function onDeviceReady() {
    // Safe to use Cordova plugin APIs starting here
    console.log('Cordova is ready, platform: ' + device.platform);
}
Note: This is correct, real Cordova JavaScript — but this website's own project doesn't run a Cordova build, so you won't see it actually execute on this page. Follow along by creating your own project after the next page's installation steps.

Why Learn Cordova?

ReasonWhat it means for you
Reuses existing web skillsIf you already know HTML/CSS/JavaScript, you can build a mobile app without learning Dart or React Native's component model
Huge plugin ecosystemThousands of community plugins cover most native features you'd need — camera, GPS, Bluetooth, biometrics, and more
One codebase, multiple platformsThe same `www/` folder builds for both Android and iOS
Still relevant for simple appsFor content-driven or lightweight utility apps, Cordova's simplicity can be a better fit than a heavier native-rendering framework
Next steps: Head to Installation & Setup to install the Cordova CLI and the platform SDKs you'll need.