INNER CODE UNIT · Dart
pause
rhymelph/r_upgrade · lib/r_upgrade.dart:181
static Future<bool?> pause(int id) {
assert(Platform.isAndroid, 'This method only support android application');
return _methodChannel!.invokeMethod('pause', {
'id': id,
});
}
/// Android
///
/// Upgrade with ID ,only use to [upgrade] params [useDownloadManager] is false.
///
/// * if download status is [STATUS_PAUSED] or [STATUS_FAILED] or [STATUS_CANCEL], will restart running.
/// * if download status is [STATUS_RUNNING] or [STATUS_PENDING], nothing happened.
/// * if download status is [STATUS_SUCCESSFUL] , will install apk.
///
/// * if not found the id , will return [false].
static Future<bool?> upgradeWithId(
int id, {