hydrogenApp
hydrogenApp copied to clipboard
hydrogen is a pluggable android app
hydrogenApp
hydrogen is a pluggable android app, use Lua
develop android, minSdkVersion="15", lua 5.3
plugin wrote by lua
program language
![](http://ww1.sinaimg.cn/large/8c9b876fly1fxadl4x1lfj20780780sk.jpg)
App Plugin
项目结构
宿主:sample
宿主用到的 lua 文件: lua_main
插件目录:lua
脚本:script
插件开发步骤
插件目录:lua
插件包含文件 info.json
main.lua
{
"id": "pub.hanks.gacha",
"name": "网易插画",
"icon": "http://ww1.sinaimg.cn/large/8c9b876fly1fhaaa8qcofj2046046we9.jpg",
"main": "main.lua",
"versionName": "1.0",
"versionCode": 1,
"desc": "网易每日插画排行"
}
id: 插件唯一标识符号
name: 插件名称
icon: 插件图标
main: 插件启动文件
versionName: 插件版本名称
versionVersion: 插件版本号
desc: 插件描述
插件发布
插件生成目录 api_luanroid, 执行 java 单元测试 zipPlugin
, 该方法会打包好插件并更新获取插件的 api, 成功后,然后 push 到线上
require "import"
import "android.widget.*"
import "android.view.*"
import "android.app.*"
import "android.net.*"
import "android.content.*"
更新每日壁纸
https://coding.net/u/zhangyuhan/p/api_luanroid/git/blob/master/api/splash
版本更新
https://coding.net/u/zhangyuhan/p/api_luanroid/git/blob/master/api/update