函数:getAppName 获取应用名称

函数名称:获取应用名称

函数功能:根据应用包名获取应用名称

函数方法

name = getAppName(bid)

参数 类型 必填 说明
bid string 应用 Bundle ID/包名
返回值 类型 说明
name string bid 对应的应用名称

函数用例

require "TSLib"--使用本函数库必须在脚本开头引用并将文件放到设备 lua 目录下
types = getDeviceType()
if types == 3 or types == 4 then
    name = getAppName("com.touchsprite.android") 
   dialog(name,5)
else
    name = getAppName("com.touchsprite.ios") 
    dialog(name,5)
end
Copyright 北京帮你玩科技有限公司 2023 all right reserved,powered by Gitbook该文章修订时间: 2024-03-06 17:50:18

results matching ""

    No results matching ""