in-app-updates-capacitor
Version:
Enables In App Updates on Android using the official APIs.
40 lines (39 loc) • 1.29 kB
TypeScript
declare module "@capacitor/core" {
interface PluginRegistry {
InAppUpdates: InAppUpdatesPlugin;
}
}
export interface InAppUpdatesPlugin {
checkForUpdate(): Promise<AppUpdateInfo>;
startFlexibleUpdate(): Promise<void>;
performImmediateUpdate(): Promise<void>;
completeFlexibleUpdate(): Promise<void>;
}
export interface AppUpdateInfo {
updateAvailable: boolean;
immediateUpdateAllowed: boolean;
flexibleUpdateAllowed: boolean;
availableUpdateVersionCode: number;
/**
* Returns the in-app update priority for this update, as defined by the developer in the Google Play Developer API.
*
* You can define in-app update priority of a release by setting 'inAppUpdatePriority' field
* under https://developers.google.com/android-publisher/api-ref/edits/tracks Edits.tracks.releases.
*/
availableUpdatePriority: number;
}
export interface FlexibleUpdateState {
status: number;
bytesDownloaded: number;
totalBytesToDownload: number;
}
export declare class InstallStatus {
static DOWNLOADED: number;
static CANCELED: number;
static FAILED: number;
static INSTALLED: number;
static INSTALLING: number;
static DOWNLOADING: number;
static PENDING: number;
static UNKNOWN: number;
}