uclean-app-update-plugin
TypeScript icon, indicating that this package has built-in type declarations

0.0.14 • Public • Published

插件安装与卸载

卸载插件

npm uninstall uclean-app-update-plugin

安装插件

npm install uclean-app-update-plugin

在android/app/src/main/java/com/ujing/franchisee/MainActivity.java 的init方法中增加 add( UcleanQRCodePlugin.class );

this.init(savedInstanceState, new ArrayList<Class<? extends Plugin>>() {{
  // Additional plugins you've installed go here
  // Ex: add(TotallyAwesomePlugin.class);
  add( UcleanAppUpdatePlugin.class );
}});

js调用方法

android更新并安装 ios跳转appstore

const { UcleanAppUpdatePlugin } = Capacitor.Plugins;
const result = await UcleanAppUpdatePlugin.updateApp({url: string});
参数
{
  url: string, // apk下载地址 或者 appstore url必填
}
返回值格式
{
  errorCode: string,
  errorMessage: string,
}

js调用方法

检查app更新 更新并安装

const { UcleanAppUpdatePlugin } = Capacitor.Plugins;
const result = await UcleanAppUpdatePlugin.checkAppUpdate({version: string, url: string, apkName: string, skipPromptDialog: boolean, skipProgressDialog: boolean});
参数
{
  version: string, // app远程版本号 必填
  url: string, // apk下载地址 必填
  apkName: string, // apk保存的名字 非必填
  skipPromptDialog: boolean, // 是否跳过提示对话框 非必填
  skipProgressDialog: boolean, // 是否跳过下载对话框 非必填
}
返回值格式
{
  errorCode: string,
  errorMessage: string,
}

Readme

Keywords

Package Sidebar

Install

npm i uclean-app-update-plugin

Weekly Downloads

0

Version

0.0.14

License

MIT

Unpacked Size

239 kB

Total Files

94

Last publish

Collaborators

  • jadejiang