Script 1.8.0
- 脚本语言
- 设备对象获取
- Device.getMain
- Device.searchObject(<DeviceName>)
- Device.searchObject(sigmaConst.DevAll)
- Device.searchObject(sigmaConst.DevGroup, <GroupName>)
- Device.searchObject(sigmaConst.DevSerial,<Serial>)
- Device.searchObject(sigmaConst.DevSelectOne)
- Device.searchObject(sigmaConst.DevSelectMult)
- Device.searchObject(sigmaConst.DevSelectGroup)
- 设备属性值
- 设备控制接口说明
- 公共接口说明
- 快捷键定义接口
- getPixelColor
- getPixelColorStr
- Color
- setName
- Coord
- ImageInfo
- define
- lastError
- readExcel
- scriptKill
- scriptKillAll
- getLanguage
- scriptList
- scriptRun
- sigmaLoad
- screenshot
- seekColor
- seekImage
- seekImageByID
- send
- sendMessage
- setName
- setVolumes
- shift
- runApp
- swipe(coordArray)
- upload(fpath,tpath,timeout)
- unlock
- sleep()
- uninstallAPK(packageName)
- wakeup()
- deleteListener
- getNotification
- Notification
- reset
- swipe
- uninstallAPK
- unlock
- unload
- uploadTessData
- wakeup
- writeFile
- sleep
- click(x,y)
- closeApp(packageName)
- download(fpath,tpath,timeout)
- inputText(text)
- installAPK(apkPath)
- lock(timeout)
- runApp(packageName)
- screenShot(path,imageType,tx,ty,bx,by)
- send(key)
- exit
- execCommand
- fileBinaryReader
- fileTextReader
- delay
- getSDPath
- setVolumes(type,volume)
- shift(type)
- sendMessage(phone,message)
getInstalledAPKList
原型:
getInstalledAPKList()
是否支持多设备:
不支持
对应的 REST API:
描述:
获取当前设备上已经安装的所有apk名。
参数:
无。
返回值:
字符串数组: 成功返回当前手机上安装的所有APK名,以数组形式表示,失败则返回空集合,此时可通过 lastError() 函数获取具体的错误信息。
示例:
//获取当前主控设备对象 var device = Device.getMain(); print("当前手机安装的所有APK有: \n"); //获得当前手机安装的所有APK名 var ret =device.getInstalledAPKList(); //用for循环遍历数组中的APK名,并输出APK名 for(var i=0;i<ret.length;i++){ print(ret[i]); }
运行结果:
当前手机安装的所有APK有: com.qualcomm.wfd.service com.android.stk com.skyworth.skyclientcenter com.android.backupconfirm org.codeaurora.ims com.huawei.android.internal.app com.huawei.gamebox com.ludashi.benchmark com.android.location.fused com.wukongtv.wkremote.client com.huawei.bd com.vlife.huawei.wallpaper ……