更新记录
1.1.2(2025-10-15)
处理过期API的调用逻辑。
1.1.1(2024-09-26)
修复扫描文件持续触发不生效问题(1.1.1)
1.1.0(2024-05-20)
数据返回uri地址信息。
查看更多平台兼容性
uni-app(4.74)
| Vue2 | Vue3 | Chrome | Safari | app-vue | app-nvue | app-nvue插件版本 | Android | Android插件版本 | iOS | iOS插件版本 | 鸿蒙 |
|---|---|---|---|---|---|---|---|---|---|---|---|
| × | × | × | × | × | √ | 1.0.2 | 5.0 | 1.0.2 | 12 | 1.0.2 | × |
| 微信小程序 | 支付宝小程序 | 抖音小程序 | 百度小程序 | 快手小程序 | 京东小程序 | 鸿蒙元服务 | QQ小程序 | 飞书小程序 | 快应用-华为 | 快应用-联盟 |
|---|---|---|---|---|---|---|---|---|---|---|
| × | × | × | × | × | × | × | × | × | × | × |
uni-app x(4.74)
| Chrome | Safari | Android | Android插件版本 | iOS | iOS插件版本 | 鸿蒙 | 微信小程序 |
|---|---|---|---|---|---|---|---|
| × | × | 5.0 | 1.0.2 | 12 | 1.0.2 | × | × |
概述
XF-fileScanUTS实现了安卓平台扫描指定文件类型功能。
模块使用攻略
- 执行扫描前请申请动态申请存储权限
插件接口
startScan
开始扫描
uni-app项目中(nvue)调用示例:
import { startScan } from "@/uni_modules/XF-fileScanUTS"
startScan({
fileType: ["pdf", "m3u8"],
scanning: (res) => {
console.log(res)
}
});
uni-app x项目(uvue)中调用示例:
import { startScan } from "@/uni_modules/XF-fileScanUTS";
import { FileResult, CompleteResult, ScanOptions } from "@/uni_modules/XF-fileScanUTS/utssdk/interface.uts";
let options = {
fileType: ["pdf", "m3u8"],
scanning: (res : FileResult) => {
console.log(res)
},
complete: (res : CompleteResult) => {
console.log(res)
}
} as ScanOptions;
startScan(options);
可用性
Android系统
可提供的1.0.0及更高版本
stopScan
停止扫描
uni-app项目中(nvue)调用示例:
import { stopScan } from "@/uni_modules/XF-fileScanUTS"
stopScan();
uni-app x项目(uvue)中调用示例:
import { stopScan } from "@/uni_modules/XF-fileScanUTS";
stopScan();
可用性
Android系统
可提供的1.0.0及更高版本
getVideoThumbnail
获取视频封面
uni-app项目中(nvue)调用示例:
import { getVideoThumbnail } from "@/uni_modules/XF-fileScanUTS"
getVideoThumbnail({
path: "",
scanning: (res) => {
console.log(res)
}
});
uni-app x项目(uvue)中调用示例:
import { getVideoThumbnail } from "@/uni_modules/XF-fileScanUTS";
import { ThumbnailOptions } from "@/uni_modules/XF-fileScanUTS/utssdk/interface.uts";
let options = {
path: "",
scanning: (res : any) => {
console.log(res)
}
} as ThumbnailOptions;
getVideoThumbnail(options);
可用性
Android系统
可提供的1.0.2及更高版本
getAllPictrue
获取所有相册
uni-app项目中(nvue)调用示例:
import { getAllPictrue } from "@/uni_modules/XF-fileScanUTS"
getAllPictrue({
complete: (res) => {
console.log(res)
}
});
uni-app x项目(uvue)中调用示例:
import { getAllPictrue } from "@/uni_modules/XF-fileScanUTS";
import { PictrueOptions } from "@/uni_modules/XF-fileScanUTS/utssdk/interface.uts";
let options = {
complete: (res : any) => {
console.log(res)
}
} as PictrueOptions;
getAllPictrue(options);
可用性
Android系统
可提供的1.0.9及更高版本
getAllVideo
获取所有视频
uni-app项目中(nvue)调用示例:
import { getAllVideo } from "@/uni_modules/XF-fileScanUTS"
getAllVideo({
complete: (res) => {
console.log(res)
}
});
uni-app x项目(uvue)中调用示例:
import { getAllVideo } from "@/uni_modules/XF-fileScanUTS";
import { VideoOptions } from "@/uni_modules/XF-fileScanUTS/utssdk/interface.uts";
let options = {
complete: (res : any) => {
console.log(res)
}
} as VideoOptions;
getAllVideo(options);
可用性
Android系统
可提供的1.0.9及更高版本

收藏人数:
购买普通授权版(
试用
赞赏(0)
下载 191
赞赏 0
下载 10646558
赞赏 1793
赞赏
京公网安备:11010802035340号