Introducing Web2Droid x2y API v1.0.2
The Ultimate Web-to-APK Conversion Engine
Overview
The Web2Droid x2y API v1.0.2 is a high-performance Node.js service developed by X2Y Devs Tools. It is designed to transform any public website URL into a fully functional, installable Android Application Package (APK).
Think of it as a "PWA on steroids." The system wraps your website inside a custom-tailored WebView container, packaging it as a native Android app complete with custom branding, offline capabilities, and background service support.
Core Functionality: How it Works
The API automates the complex Android build pipeline through a three-stage headless process:
Analysis: The engine fetches the target URL and extracts metadata like the site title, description, and favicon.
Scaffolding: It automatically generates the required Android project structure, including Java code for the WebView, XML layout resources, and Gradle configuration.
Compilation: Using the Android SDK and Gradle in a headless environment, it compiles the project into a final, signed APK ready for installation.
Advanced Features in v1.0.2
Customization and Branding
Visual Control: Supply your own App Icons and Splash Screens via URL or Base64 strings.
Identity: Override default metadata to set custom App Names, Descriptions, and Package Identifiers (e.g.,
com.company.app).Auto-Generation: If no icon is provided, the system automatically generates one from the website’s favicon.
Web-to-Native Integration
Universal Support: Works with any valid URL.
PWA Ready: Supports Progressive Web App features, including Service Workers for offline use.
Advanced Capabilities: Integrated support for Push Notifications and background operations.
Configuration and Security
WebView Tuning: Toggle JavaScript, DOM Storage, Database support, Zoom controls, and Viewport behaviors.
Permissions: Request specific hardware access (like
CAMERAorWRITE_EXTERNAL_STORAGE) through a simple array.Reliability: Features a dedicated download endpoint with expiry checks, build timeouts, and detailed error logging.
System Requirements
To run the conversion engine, your environment must include:
Node.js: Version 14 or higher.
Java: JDK 8 or higher.
Android SDK: Including
build-tools,platform-tools, andcmdline-tools.Gradle: The standard Android build system.
OS: Compatible with Windows, macOS, and Linux.
Setup and Installation
1. Environment Variables
This is the most critical step. You must set ANDROID_HOME to your SDK location and add the following to your system PATH:
%ANDROID_HOME%\platform-tools%ANDROID_HOME%\cmdline-tools\latest\bin
2. Getting Started
# Clone the repository
git clone https://github.com/x2yDevs/web2droid-x2y-api.git
cd web2droid-x2y-api
# Install dependencies
npm install
# Start the server
npm start
API Endpoints Summary
GET /: Returns API metadata and version info.GET /health: Returns the server status.POST /api/v1/generate-apk: The primary endpoint. Send a JSON payload with your URL and options to start a build.GET /api/v1/job/{jobId}: Check the status (pending/completed) and view logs for a specific build.GET /api/v1/download/{jobId}: Securely download your finished APK file once the job status is "completed."
Setup Guide: Android Environment
For a visual walkthrough on configuring your system for Android development, particularly setting up the ANDROID_HOME path in Windows, refer to this guide:
Video Resource: How to set ANDROID_HOME and environment variable for Android SDK in Windows 10
The guide details the precise steps to ensure your system recognizes the Android SDK tools correctly.
Watch on YouTube:
Made by x2y dev tools
Comments
Post a Comment