installApk static method

Future installApk(
  1. String filePath, {
  2. String ohosAppId = '',
})

for Android : install apk by its file absolute path; if the target platform is higher than android 24: a appId is not required (the caller's applicationId which is defined in build.gradle)

Implementation

static Future<dynamic> installApk(String filePath,
    {String ohosAppId = ''}) async {
  Map<String, String> params = {'filePath': filePath,'packageName':ohosAppId};
  final dynamic result = await _channel.invokeMethod('installApk', params);
  return result;
}