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

update: uni-installApk修改文档

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