Introduction
Explains what EasyCord is and how it functions.
Overview
EasyCord is a hybrid mobile framework. It hosts existing web applications inside a native shell. The framework injects a JavaScript API into window.easycord to provide native capabilities.
EasyCord eliminates the need for NPM packages or custom message channels for hardware access.
Example
const photo = await window.easycord.camera.capture({ quality: 0.9 });
document.getElementById("preview").src = photo.dataUrl;How It Works
EasyCord uses a zero-copy native message port to connect the Flutter shell and the web application.
- The Flutter Shell: A native app written in Dart. It renders web content in a WebView and manages the native bridge, permissions, and hardware APIs.
- Your Web App: The React, Vue, Next.js, or HTML application. The shell injects
window.easycordbefore the JavaScript runs.
Core Features
- Native Bridge: Call Dart functions from JavaScript and await the result as a Promise.
- OTA Updates: Deliver signed bundle updates to users without requiring an App Store review.
- Hardware APIs: Access the camera, GPS, accelerometer, haptics, and secure storage via
window.easycord. - Security: Native capabilities must be explicitly whitelisted. The framework blocks external links and enforces iframe isolation.
Supported Platforms
| Platform | Supported |
|---|---|
| Android | Yes |
| iOS | Yes |
| Web | No |
| Desktop | No |