更新记录
1.0.1 下载此版本
更新
1.0.0 下载此版本
1.0.0 安卓获取应用包名信息并且查看应用的md5和sha1
平台兼容性
云端兼容性
阿里云 | 腾讯云 | 支付宝云 |
---|---|---|
√ | √ | √ |
uni-app(4.75)
Vue2 | Vue3 | Chrome | Safari | app-vue | app-nvue | Android | iOS | 鸿蒙 |
---|---|---|---|---|---|---|---|---|
- | - | × | × | × | × | × | × | × |
微信小程序 | 支付宝小程序 | 抖音小程序 | 百度小程序 | 快手小程序 | 京东小程序 | 鸿蒙元服务 | QQ小程序 | 飞书小程序 | 快应用-华为 | 快应用-联盟 |
---|---|---|---|---|---|---|---|---|---|---|
× | × | × | × | × | × | × | × | × | × | × |
uni-app x(4.75)
Chrome | Safari | Android | iOS | 鸿蒙 | 微信小程序 |
---|---|---|---|---|---|
- | - | - | - | - | - |
wen-getapp
这是一个用于获取设备上已安装应用程序列表的 UniApp 模块。
特性
- 获取设备上已安装的所有应用程序
- 提供应用程序详细信息,如名称、包名、版本等
安装
在你的 UniApp 项目中,将此模块放置在 uni_modules
文件夹中。
使用方法
获取已安装的应用程序列表
import {
getInstalledApps
} from '../../uni_modules/wen-getapp';
const res = await getInstalledApps();
this.applist = res.map(app => {
if (app.appIcon && !app.appIcon.startsWith('data:image')) {
app.appIcon = 'data:image/png;base64,' + app.appIcon;
}
return app;
});
获取应用程序信息
import {
getInfo
} from '../../uni_modules/wen-code';
const signatureMap = await getInfo(this.appInfo.packageName)
console.log(signatureMap)
API 文档
getInstalledApps(): Promise<UTSArray<AppInfo>>
获取设备上已安装的所有应用程序的列表。
getInfo(packageName: string): AppInfo
根据包名获取特定应用程序的信息。
类型定义
AppInfo
表示应用程序的信息,包含以下属性:
appName: string
- 应用程序名称packageName: string
- 应用程序包名isSystemApp: boolean
- 是否为系统应用versionName: string
- 应用程序版本名称versionCode: number
- 应用程序版本号longVersionCode: number
- 长版本号appIcon: string
- 应用程序图标路径
注意事项
- 该模块仅适用于 Android 平台。
- 需要 UniApp 环境支持 UTS 功能。
许可证
MIT License
Copyright (c) 2025 du-jiwen
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.