获取设备所有应用列表 (app.package_list)

声明

应用程序包名数组 = app.package_list()

参数及返回值

  • 应用程序包名数组

    • 顺序表型,返回很多应用包标识符的一个表,也包括系统自带的

示例

-- 遍历关闭所有的 app
for _,bid in ipairs(app.package_list()) do   --所有程序包名赋值给bid
  print('closing', bid)                      --打印bid
    app.stop(bid)
end
powered by GitbookFile Modify: 2021-03-27 23:14:19

results matching ""

    No results matching ""