Discuz!NT|BBS|论坛

注册

 

发新话题 回复该主题

安装 [复制链接]

1#
    https://blog.csdn.net/zhuyu19911016520/article/details/103930541/









String sfilepath = appPath + '/' + apkName;

    Map<PermissionGroup, PermissionStatus> permissions =
    await PermissionHandler().requestPermissions([PermissionGroup.storage]);
    if (permissions[PermissionGroup.storage] == PermissionStatus.granted) {
      InstallPlugin.installApk(sfilepath, 'com.toppms.khapp')
          .then((result) {
        print('install apk $result');
      }).catchError((error) {
        print('install apk error: $error');
      });
    } else {
      print('Permission request fail!');
    }
分享 转发
TOP
发新话题 回复该主题