0.9.0
Dependencies
- Updated Dokka to 2.0.0-Beta.
- Updated Gradle wrapper to 8.11.1.
Bug fixes and improvements
-
Introduce
InstallPreapproval
API. See documentation on usage. -
Introduce
InstallConstraints
API. See documentation on usage. -
Add
requestUpdateOwnership
option for install sessions. PermissionENFORCE_UPDATE_OWNERSHIP
was added toAndroidManifest.xml
. -
Add
packageSource
option for install sessions. -
Add
dontKillApp
option for install sessions withInheritExisting
install mode. -
Source-incompatible: deprecate
SessionResult
and returnSession.State.Completed
fromSession.await()
.SessionResult
was an early design leftover which was mistakenly overlooked. Now it's finally been dealt with.To migrate, change
SessionResult.Success
toSession.State.Succeeded
, andSessionResult.Error
toSession.State.Failed
.cause
property ofSessionResult.Error
is replaced withfailure
property ofSession.State.Failed
.// Old when (val result = session.await()) { is SessionResult.Success -> println("Success") is SessionResult.Error -> println(result.cause.message) } // New when (val result = session.await()) { Session.State.Succeeded -> println("Success") is Session.State.Failed -> println(result.failure.message) }
-
Source-incompatible:
when
matches onInstallFailure
andUninstallFailure
type are no longer exhaustive.This change was made to guard against possible additions of failure types in future Android versions, like
Timeout
in Android 14. -
Fix session not launching after process restart if it was in the midst of preparations.
-
Show notification for
SESSION_BASED
install sessions whenDEFERRED
confirmation is set only if user action is actually required. -
Fix possible races when
ListenableFutures
returned fromgetSessionsAsync()
andgetActiveSessionsAsync()
might not get completed. -
Lower API level required for
READ_EXTERNAL_STORAGE
permission in sample apps. -
Add
sample-api34
sample project. -
Add "Building" section to documentation.
Public API changes
- Source-incompatible:
Session.await()
now returnsSession.State.Completed
. Overload returningSessionResult
is left for binary compatibility, but will be removed in the next minor version. - Source-incompatible:
when
matches onInstallFailure
andUninstallFailure
type are no longer exhaustive. - Deprecated:
SessionResult
is deprecated and will be removed in the next minor version. - Added
InstallPreapproval
class and related APIs toInstallParameters
,InstallParameters.Builder
andInstallParametersDsl
. - Added
InstallConstraints
class and related APIs toInstallParameters
,InstallParameters.Builder
andInstallParametersDsl
. - Added
dontKillApp
boolean property toInstallMode.InheritExisting
. - Added
requestUpdateOwnership
property toInstallParameters
,InstallParameters.Builder
andInstallParametersDsl
. - Added
PackageSource
class and related APIs toInstallParameters
,InstallParameters.Builder
andInstallParametersDsl
.