近期更新
Recent Updates
现已包含真正的 Top + Tabs 模板、可配置的 SSL 证书错误处理,以及相册导入自定义图标能力。
Now includes a true Top + Tabs template, configurable SSL certificate handling, and gallery-imported custom icons.
7 种 UI 模板
7 UI Templates
底部导航 / 顶部工具栏 / 侧滑抽屉 / 沉浸全屏等,覆盖主流 App 布局。
Bottom Bar / Top Bar / Side Drawer / Immersive, covering mainstream layouts.
设备端打包
On-Device Packing
无需电脑或服务器,在手机上直接完成 APK 打包与签名。
No PC or server needed. Build & sign APK on your phone.
可视化编辑器
Visual Editor
分 Tab 编辑所有配置:基础 / 规则 / 事件 / 品牌 / 构建。
Tab-based editor: Basic / Rules / Events / Branding / Build.
完整浏览器权限
Full Web Capability
支持 Cookie、存储、文件及前置安全提示(摄像头/麦克风/定位/通知等)。
Supports Cookie, storage, files & secure prompts (cam/mic/location/notify).
安全策略
Security Policies
域名白名单、外链拦截、SSL 证书错误处理可配置、路径穿越防护。
Host whitelist, configurable SSL handling, and path traversal protection.
页面规则 & 事件
Page Rules & Events
按 URL 匹配注入 JS/CSS、自定义错误页、监听页面生命周期。
Inject JS/CSS per URL, custom error pages, lifecycle listeners.
夜间模式
Night Mode
支持手动开启或跟随系统深色主题自动切换。
Manual toggle or auto-switch with system dark theme.
多语言支持
Multi-Language
内置简体中文和英文,支持跟随系统语言。
Built-in Chinese & English, follows system language.
选择不同的原生壳模板,一键切换应用的导航风格。
Choose a native shell template to switch the app's navigation style.
Browser browser
纯 WebView 全屏,无原生导航栏,适合独立网页应用。
Fullscreen WebView without native bars, ideal for web apps.
Immersive immersive_single_page
沉浸全屏模式,隐藏状态栏和导航栏,适合游戏与媒体。
Immersive mode, hides all system bars. Great for games & media.
Top Bar top_bar
顶部工具栏,支持标题、返回、刷新、主页按钮。
Toolbar with title, back, refresh, and home buttons.
Bottom Bar bottom_bar
底部 Tab 导航,最多 5 个标签页,最常用的 App 布局。
Bottom tabs (up to 5). The most common app layout.
Top + Tabs top_bar_tabs
顶部工具栏 + 顶部 Tab 组合,适合内容丰富的应用。
Top bar with top tabs, ideal for fast section switching.
Top + BottomBar top_bar_bottom_tabs
顶部工具栏 + 底栏导航,适合内容丰富的应用。
Top bar with bottom navigation, ideal for content-rich apps.
Side Drawer side_drawer
侧滑抽屉菜单,支持自定义壁纸和头像。
Swipeable drawer with custom wallpaper & avatar.
创建项目
Create a Project
在项目中心点击「New Project」,输入项目名称即可创建。
Tap "New Project" in Project Hub and enter a project name.
编辑配置
Edit Configuration
在配置编辑器中设置目标网站 URL、选择模板、添加导航项、调整外观和行为。
Set the target URL, choose a template, add navigation items, and customize appearance.
预览效果
Preview
点击「Preview」实时查看应用效果,所见即所得。
Tap "Preview" for a live preview. What you see is what you get.
打包安装
Pack & Install
进入 Pack 界面 → Prepare → Pack → 生成签名 APK → 安装或分享。
Go to Pack → Prepare → Pack → Get signed APK → Install or share.
所有行为由 app-config.json 驱动。以下是主要配置项。
All behavior is driven by app-config.json. Key fields listed below.
补充说明:当前版本还支持 sslErrorHandling、首页/刷新按钮 run_js 行为,以及 custom://branding/custom-icons/... 自定义图标引用。
Additional fields now include sslErrorHandling, run_js for Home/Refresh button behaviors, and custom icon references such as custom://branding/custom-icons/....
| 字段 | Field | 说明 | Description |
|---|---|---|---|
name | 应用名称 | Application display name | |
template | 模板类型(见上方模板列表) | Template type (see templates above) | |
defaultUrl | 默认主页 URL | Default home page URL |
| 字段 | Field | 说明 | Description |
|---|---|---|---|
javaScriptEnabled | 启用 JavaScript | Enable JavaScript | |
domStorageEnabled | 启用 DOM 存储(localStorage 等) | Enable DOM storage (localStorage, etc.) | |
userAgent | 自定义 User-Agent(留空用系统默认) | Custom UA (blank = system default) | |
backAction | 返回键行为:go_back_or_exit / go_back_or_home | Back button: go_back_or_exit / go_back_or_home | |
nightMode | 夜间模式:off / on / follow_theme | Night mode: off / on / follow_theme |
| 字段 | Field | 说明 | Description |
|---|---|---|---|
allowedHosts | 域名白名单数组,支持 *.example.com | Host whitelist array, supports wildcards | |
allowExternalHosts | 是否允许打开白名单外的 URL | Allow URLs outside the whitelist | |
openOtherAppsMode | 跳转外部应用:ask / allow / block | External app launch: ask / allow / block |
最小可用配置示例:
Minimal working configuration:
监听页面生命周期事件,触发原生或 JavaScript 动作。
Listen to page lifecycle events and trigger native or JS actions.
触发器 Triggers
Triggers
动作 Actions
Actions
动作字段支持模板变量:{url} {title} {trigger} {previousUrl} {nextUrl}
Template variables: {url} {title} {trigger} {previousUrl} {nextUrl}
FireflyApp 采用 Template APK Repack 方案,在 Android 设备上完成全部流程:
FireflyApp uses Template APK Repack, completing the entire process on-device:
解压模板
Unpack Template
从宿主 assets 中提取预编译的 unsigned 模板 APK 并解压。
Extract the pre-compiled unsigned template APK from host assets.
注入配置与资产
Inject Config & Assets
将项目的 app-config.json、启动图标、Splash 图片注入到解压目录。
Inject app-config.json, launcher icon, splash image into the unpacked dir.
二进制 Manifest 修改
Binary Manifest Patching
直接操作编译后的二进制 AndroidManifest.xml,替换包名、应用名、版本号(无需 AAPT)。
Patch binary AndroidManifest.xml — replace package name, label, version (no AAPT).
重打包 → 对齐 → 签名
Repackage → Align → Sign
重新打包为 APK → zipalign 对齐 → 使用 AndroidKeyStore 或自定义 JKS 签名。
Repackage → zipalign → Sign with AndroidKeyStore or custom JKS.
产物自检及导出
Self-Check & Export
执行产物自检(Manifest完整性、签名及系统解析校验),生成最终可用 APK 以供安装或分享。
Perform artifact self-check (Manifest, Sig validation) and output final APK to install or share.
项目中心(Project Hub)提供以下快捷工具:
Quick access tools in the Project Hub drawer:
说明文档
Help Documentation
即当前应用内置的中英双语离线使用手册。
The built-in bilingual offline manual you're currently viewing.
图标设计器
Icon Designer
可视化定制应用图标(底色、文字、圆角、尺寸)并导出。
Visually customize app icons (bg, transparent bg, text, radius, size) and export.
图标仓库
Icon Catalog
浏览项目内置 Material 图标库,辅助配置向导。
Browse built-in icons and combine them with gallery-imported custom icons in the editor.
语言及状态切换
State Toggles
支持多语言自由切换,亦可随时隐藏或展示 Dashboard 图表概览。
Support multi-lang toggles and hiding/showing the dashboard overview.
当前版本支持将 SSL 证书错误处理设置为严格校验或忽略,默认仍为严格校验。
Current versions support SSL certificate handling as either strict or ignore. Strict remains the default.
域名白名单
Host Whitelist
通过 allowedHosts 控制可访问的域名,支持通配符。
Control accessible domains via allowedHosts. Supports wildcards.
外链拦截
External Link Blocking
白名单外的 URL 可配置为弹窗确认、直接允许或完全阻止。
URLs outside whitelist: ask, allow, or block.
SSL 强制校验
SSL Enforcement
遇到 SSL 证书错误时一律拒绝加载,不提供跳过选项。
SSL errors are always rejected. No bypass option.
路径安全
Path Safety
项目文件路径经过清洗,防止 ../ 等路径穿越攻击。
File paths sanitized to prevent path traversal attacks.