提交 331fc552 编写于 作者: taohebin@dcloud.io's avatar taohebin@dcloud.io

update: uni-installApk修改文档

上级 dd0f9a8e
......@@ -284,8 +284,8 @@
},
handleInstallApk() {
installApk({
filePath: "/sdcard/Android/data/io.dcloud.HBuilder/apps/HBuilder/doc/ddd.apk",
// filePath:"/static/ddd.apk",
// filePath: "/sdcard/Android/data/io.dcloud.HBuilder/apps/HBuilder/doc/ddd.apk",
filePath:"/static/test.apk",
complete(res) {
console.log(res);
}
......
文件已添加
## 1.0.2(2023-10-27)
修改文档
## 1.0.1(2023-10-27)
支持js层调用
## 1.0.0(2023-10-26)
......
{
"id": "uni-installApk",
"displayName": "uni-installApk",
"version": "1.0.1",
"version": "1.0.2",
"description": "uni-installApk",
"keywords": [
"uni-installApk"
......
......@@ -4,15 +4,7 @@
Android平台安装Apk
### App-Android平台注意事项
- 需要自定义基座,并且需要具备下面的权限
```
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
```
**注意: 3.95以下需要自定义基座**
### uni.installApk(options : InstallApkOptions):void
......
......@@ -31,7 +31,7 @@ export function installApk(options : InstallApkOptions) : void {
context.startActivity(intent)
const success : InstallApkSuccess = {
message: "success"
errMsg: "success"
}
options.success?.(success)
options.complete?.(success)
......
......@@ -35,7 +35,7 @@ export type InstallApkSuccess = {
/**
* 安装成功消息
*/
message : string
errMsg : string
}
export type InstallApkComplete = any
export type InstallApkSuccessCallback = (res : InstallApkSuccess) => void
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册