Change Log¶
Version 0.8.3 (2024-11-07)¶
Bug fixes and improvements¶
- Return
Aborted
failure whenINTENT_BASED
install session is cancelled. - Return
Aborted
failure when uninstall viaACTION_UNINSTALL_PACKAGE
is cancelled. - Request permissions if they're not granted when sample apps are launched via
ACTION_VIEW
intent.
Version 0.8.2 (2024-11-01)¶
Bug fixes and improvements¶
- Fix introduced in 0.8.1 repeated install confirmation after granting install permission if confirmation was dismissed by clicking outside of confirmation dialog on some OS versions.
- Don't use
requireUserAction
option in samples as it's unstable with different vendors and OS versions.
Version 0.8.1 (2024-10-31)¶
Dependencies¶
- Updated Kotlin to 2.0.21.
- Updated
androidx.annotation
to 1.9.1. - Updated
androidx.activity
to 1.9.3 (sample apps dependency). - Updated
androidx.constraintlayout
to 2.2.0 (sample apps dependency). - Updated
androidx.lifecycle
to 2.8.7 (sample apps dependency). - Updated
androidx.navigation
to 2.8.3 (sample apps dependency). - Updated Guava to 33.3.1-android (sample apps dependency).
- Migrated from
gradle-nexus/publish-plugin
tovanniktech/gradle-maven-publish-plugin
for publishing artifacts to Maven Central.
Bug fixes and improvements¶
- Fix install confirmation from OS not displaying after granting install permission on some devices (particularly Android TV) using
SESSION_BASED
installer. This is a fix for #84. - Fix various issues with dismissing install confirmation from OS via clicking outside of confirmation dialog using
SESSION_BASED
installer.
Version 0.8.0 (2024-10-25)¶
Dependencies¶
- Extracted
ackpine-resources
artifact, which is now depended upon byackpine-core
.
Bug fixes and improvements¶
-
NotificationString
is superseded byResolvableString
to accommodate stable string resources resolution.ResolvableString
is now located inackpine-resources
artifact and can also be used separately for general app needs.NotificationString
is deprecated and will be removed in next minor release.To migrate
NotificationString.resource()
usages toResolvableString
, create classes inheriting fromResolvableString.Resource
like this:// Old NotificationString.resource(R.string.install_message, fileName) // New class InstallMessage(fileName: String) : ResolvableString.Resource(fileName) { override fun stringId() = R.string.install_message private companion object { private const val serialVersionUID = 4749568844072243110L } } InstallMessage(fileName)
Note that this requires to purge internal database because of incompatible changes, so all previous sessions will be cleared when Ackpine is updated to 0.8.0.
-
NotificationData
now requires an instance ofDrawableId
class instead of integer drawable resource ID for icon to accommodate stable drawable resources resolution. - Don't hardcode a condition in implementation of
SESSION_BASED
sessions when Android'sPackageInstaller.Session
fails without report. It should possibly improve reliability on different devices. - Fix progress bars on install screen not using latest value in sample apps.
- Disable cancel button when session's state is Committed in sample apps.
Public API changes¶
- Breaking:
NotificationData
,NotificationData.Builder
andNotificationDataDsl
now requireResolvableString
instead ofNotificationString
astitle
andcontentText
type.NotificationString
is deprecated with an error deprecation level and will be removed in next minor release. - Breaking:
NotificationData
,NotificationData.Builder
andNotificationDataDsl
now requireDrawableId
instead of integer asicon
type. - Added
ResolvableString
sealed interface inackpine-resources
module. - Added
DrawableId
interface inackpine-core
module.
Version 0.7.6 (2024-10-12)¶
Dependencies¶
- Reverted
androidx.startup
to 1.1.1.
Bug fixes and improvements¶
INTENT_BASED
package installer sessions are no longer stuck inCOMMITTED
state if they have performed a successful app self-update (not in all scenarios). This is an (almost) fix for issue #33.- Use
ZipFile
API for readingAndroidManifest.xml
when possible while parsing single APK withApk.fromFile()
andApk.fromUri()
.
Version 0.7.5 (2024-10-06)¶
Bug fixes and improvements¶
- Improve thread-safety of
Session
,PackageInstaller
andPackageUninstaller
implementations. - Fix progress changing without animation when session is committed in sample apps.
Version 0.7.4 (2024-10-04)¶
Dependencies¶
- Added direct dependency on
androidx.coordinatorlayout:coordinatorlayout:1.2.0
to sample projects.
Bug fixes and improvements¶
- Improve error handling in
ackpine-splits
. This also allowed to avoid duplicateApk
objects in sequences returned fromZippedApkSplits
factories in some possible cases of errors. - Fix incorrect sessions' progress when there are list items beyond visible area in sample apps.
- Hide floating Install button when scrolling down in sample apps.
Version 0.7.3 (2024-10-01)¶
Bug fixes and improvements¶
- Fix resources not closing when throwing if
throwOnInvalidSplitPackage()
is applied andZippedApkSplits.getApksForUri()
delegates toZippedApkSplits.getApksForFile()
.
Version 0.7.2 (2024-09-30)¶
Dependencies¶
- Updated Kotlin to 2.0.20.
- Updated Gradle wrapper to 8.9.
- Updated Android Gradle Plugin to 8.6.1.
- Updated Apache Commons Compress to 1.27.1.
- Updated
apksig
to 8.6.1. - Updated
binary-compatibility-validator
to 0.16.3. - Updated
foojay-resolver-convention
to 0.8.0. - Updated
kotlinx.coroutines
to 1.9.0. - Updated
androidx.startup
to 1.2.0. - Updated
androidx.annotation
to 1.8.2. - Updated
androidx.activity
to 1.9.2 (sample apps dependency). - Updated
androidx.lifecycle
to 2.8.6 (sample apps dependency). - Updated
androidx.navigation
to 2.8.1 (sample apps dependency). - Updated Guava to 33.3.0-android (sample apps dependency).
Bug fixes and improvements¶
- Make split APKs sequences created with
ZippedApkSplits
factories cooperate withthrowOnInvalidSplitPackage()
operation. They will now close held resources when split package validation fails if not consumed in whole. Now the recommended order of applyingthrowOnInvalidSplitPackage()
is immediately after creating a sequence. - Improve documentation about split APKs.
- Fix some visual bugs with sessions' progress in sample apps.
- Disable cancel button when install session is committed in sample apps.
- Cancel sessions when ViewModel is cleared in Java sample app.
Version 0.7.1 (2024-07-03)¶
Bug fixes and improvements¶
- Fix
ConcurrentModificationException
inSession
in very rare cases (#70).
Version 0.7.0 (2024-07-02)¶
Dependencies¶
- Updated Android Gradle Plugin to 8.5.0.
- Updated
apksig
to 8.5.0. - Updated
androidx.concurrent
to 1.2.0. - Updated
androidx.lifecycle
to 2.8.3 (sample apps dependency). - Updated Guava to 33.2.1-android (sample apps dependency).
Bug fixes and improvements¶
- Fix race conditions leading to
SQLiteConstraintException: FOREIGN KEY constraint failed
(#68). - Fix sessions getting stuck after launching when there's a lot of them created concurrently.
- Fix
FileNotFoundException
andZipException
when reading zipped files in some cases. - Add support for external storage
Uri
s when trying to directly access files. - Log APK parsing exceptions in sample apps.
- Open file picker immediately after granting all permissions in sample apps.
- Remove
MANAGE_EXTERNAL_STORAGE
permission from sample apps.
Public API changes¶
InstallMode.Companion
is made private.
Version 0.6.1 (2024-06-11)¶
Dependencies¶
- Updated Kotlin to 2.0.0.
- Updated Gradle wrapper to 8.8.
- Updated Android Gradle Plugin to 8.4.2.
- Updated Apache Commons Compress to 1.26.2.
- Updated
apksig
to 8.4.2. - Updated
kotlinx.coroutines
to 1.8.1. - Updated
androidx.lifecycle
to 2.8.1 (sample apps dependency). - Updated
androidx.appcompat
to 1.7.0 (sample apps dependency).
Bug fixes and improvements¶
- Introduce an API for deleting previously created Ackpine's notification channel.
- Add info about notification channel initialization to documentation.
Public API changes¶
- Added
Ackpine.deleteNotificationChannel()
static method inackpine-core
module.
Version 0.6.0 (2024-05-20)¶
Dependencies¶
- Updated Kotlin to 1.9.24.
- Updated
androidx.annotation
to 1.8.0. - Updated
androidx.activity
to 1.9.0 (sample apps dependency). - Updated Guava to 33.2.0-android (sample apps dependency).
- Updated Material Components to 1.12.0 (sample apps dependency).
Bug fixes and improvements¶
- Introduce an install mode option for
InstallParameters
. - More consistent behavior of
COMMITTED
session state notifications when installer app is privileged for silent installs.
Public API changes¶
- Added
InstallMode
sealed interface with two children (Full
andInheritExisting
) inackpine-core
module. - Added
installMode
property toInstallParameters
and its builder inackpine-core
module. - Added
installMode
property toInstallParametersDsl
inackpine-ktx
module.
Version 0.5.5 (2024-04-29)¶
Bug fixes and improvements¶
- Fix some internal state of
SESSION_BASED
package installer session when it's in terminal state and is being initialized on retrieval fromPackageInstaller
.
Version 0.5.4 (2024-04-26)¶
Bug fixes and improvements¶
- Fix
SESSION_BASED
package installer session not notifying about transitioning intoCommitted
state when installation is performed without user's action via settingrequireUserAction
tofalse
. - Fix
SESSION_BASED
package installer session not updating its progress if it's already prepared and app process is restarted. - Don't allow to commit
SESSION_BASED
package installer session after app process restart when an actual installation process in the system is ongoing.
Version 0.5.3 (2024-04-25)¶
Dependencies¶
- Updated Android Gradle Plugin to 8.3.2.
- Updated
apksig
to 8.3.2. - Added Apache Commons Compress dependency to
ackpine-splits
module.
Bug fixes and improvements¶
ackpine-splits
: useFileChannel
to read zipped APKs on Android Oreo+ if possible. This drastically improves performance when direct access throughjava.io
APIs is not available and allows to process problematic ZIP files (such as XAPK files).- Don't crash if exception occurs while iterating APK sequence in sample apps, and display the exception message instead.
Version 0.5.2 (2024-03-30)¶
Dependencies¶
- Updated Kotlin to 1.9.23.
- Updated Gradle wrapper to 8.7.
- Updated Android Gradle Plugin to 8.3.1.
- Updated
apksig
to 8.3.1. - Updated Dokka to 1.9.20.
- Updated Guava to 33.1.0-android (sample apps dependency).
Bug fixes and improvements¶
- Allow to commit
SESSION_BASED
package installer sessions from background when usingrequireUserAction = false
andConfirmation.IMMEDIATE
.
Version 0.5.1 (2024-02-23)¶
Dependencies¶
- Updated Gradle wrapper to 8.6.
- Updated Android Gradle Plugin to 8.2.2.
- Updated
apksig
to 8.2.2. - Updated
kotlinx.coroutines
to 1.8.0. - Updated
binary-compatibility-validator
to 0.14.0 . - Updated
androidx.navigation
to 2.7.7 (sample apps dependency). - Updated Guava to 33.0.0-android (sample apps dependency).
Bug fixes and improvements¶
- Fix possibility of sessions' notification ID inconsistencies.
Version 0.5.0 (2024-02-02)¶
Bug fixes and improvements¶
- Add support for timeout install failure introduced in API level 34.
- Add new
sortedByCompatibility()
and related APIs inackpine-splits
module. - Fix documentation for
NotificationData
and related APIs. - Don't create session object if it already exists when initializing all sessions.
Public API changes¶
- Source-incompatible, possibly throwing in runtime: added
Timeout
child to sealedInstallFailure
class inackpine-core
module. - Added
ApkCompatibility
class inackpine-splits
module. - Added extension functions for
Sequence<Apk>
,Sequence<ApkCompatibility>
,Iterable<Apk>
,Iterable<ApkCompatibility>
toApkSplits
inackpine-splits
module:sortedByCompatibility()
,filterCompatible()
,addAllTo()
.
Version 0.4.4 (2024-01-22)¶
Bug fixes and improvements¶
- Prevent clients from committing a
SESSION_BASED
package installer session while it's initializing if it's already completed. - Fix an exception when app process is restarted after returning from package uninstall confirmation.
Version 0.4.3 (2024-01-19)¶
Dependencies¶
- Updated Kotlin to 1.9.22.
- Updated Android Gradle Plugin to 8.2.1.
- Updated
apksig
to 8.2.1. - Updated
androidx.annotation
to 1.7.1. - Updated
androidx.activity
to 1.8.2 (sample apps dependency). - Updated
androidx.lifecycle
to 2.7.0 (sample apps dependency). - Updated
androidx.navigation
to 2.7.6 (sample apps dependency). - Updated Material Components to 1.11.0 (sample apps dependency).
Bug fixes and improvements¶
- Fix incorrect
Succeeded
state ofSESSION_BASED
package installer session in some cases if app is killed while installing but system installer Activity remains visible. - Scale Ackpine thread pool size depending on available CPU cores.
- Associate APK, APKS, APKM and XAPK files with Ackpine sample app.
Version 0.4.2 (2024-01-15)¶
Bug fixes and improvements¶
PackageInstaller
andPackageUninstaller
no longer throw exceptions when trying to get a session of wrong type (install session fromPackageUninstaller
and vice versa).PackageInstaller
andPackageUninstaller
no longer throw exceptions when getting a list of sessions if there were both install and uninstall sessions in internal database.- Add ProGuard rules and
serialVersionUID
for classes which areSerializable
for more stable serialization. Note that this requires to purge internal database because of incompatible changes, so all previous sessions will be cleared when Ackpine is updated to 0.4.2.
Version 0.4.1 (2024-01-06)¶
Bug fixes and improvements¶
SESSION_BASED
package installer sessions are no longer stuck inCOMMITTED
state if they have performed a successful app self-update. This is a partial fix for issue #33.
Version 0.4.0 (2023-12-11)¶
Bug fixes and improvements¶
- Improve documentation for
Session.launch()
andSession.commit()
and make them return a boolean to indicate whether their invocation took effect. - Add
isCompleted
andisCancelled
boolean properties toSession
.
Public API changes¶
- Breaking:
Session.DefaultStateListener
is renamed toSession.TerminalStateListener
. - Breaking:
Session.State.isCompleted
is removed. - Possibly breaking:
isCompleted
andisCancelled
boolean properties are added toSession
. - Possibly breaking:
Session.launch()
andSession.commit()
now returnBoolean
.
Version 0.3.2 (2023-12-01)¶
Dependencies¶
- Updated Kotlin to 1.9.21.
- Updated Gradle wrapper to 8.5.
- Updated Android Gradle Plugin to 8.2.0.
- Updated
apksig
to 8.2.0. - Updated
androidx.room
to 2.6.1. - Updated
androidx.activity
to 1.8.1 (sample apps dependency). - Updated Guava to 32.1.3-android (sample apps dependency).
Bug fixes and improvements¶
- Add Afrikaans translations for South Africa. Thanks to @MJJacobs01!
Version 0.3.1 (2023-11-10)¶
Bug fixes and improvements¶
- Don't throw from install parameters builder constructor which accepts
Iterable
, fromadd()
andaddAll()
methods on API levels < 21 if only a single APK ends up inApkList
. This fixes a long-lasting issue of throwing when getting a session fromPackageInstaller
after process restart on API levels < 21.
Version 0.3.0 (2023-11-09)¶
Dependencies¶
- Extracted
ackpine-runtime
artifact, which is now depended upon byackpine-core
andackpine-splits
.ackpine-splits
now doesn't declare a transitive dependency onackpine-core
. ackpine-ktx
now depends onandroidx.concurrent:concurrent-futures-ktx
instead ofandroidx.concurrent:concurrent-futures
.- Updated Kotlin to 1.9.20.
- Updated Android Gradle Plugin to 8.1.3.
- Updated
apksig
to 8.1.3. - Updated
androidx.navigation
to 2.7.5 (sample apps dependency).
Bug fixes and improvements¶
- Return dummy
DisposableSubscription
object when attempting to add an already registered listener to a session instead of a new one each time. - Don't notify an already registered listener with snapshot of current session's state or progress when attempting to add it again.
- Require a
DisposableSubscriptionContainer
when adding a listener to a session to avoid an error-prone practice of adding the subscription to a subscriptions bag manually. Documentation and Java sample app were updated accordingly. - Make confirmation Activity appear less jarring on finish.
Public API changes¶
- Breaking:
Session.addStateListener()
andProgressSession.addProgressListener()
now require aDisposableSubscriptionContainer
to be provided. - Extension functions
PackageInstaller.getSession()
,PackageInstaller.getSessions()
,PackageInstaller.getActiveSessions()
and their respective counterparts forPackageUninstaller
are not inline functions anymore.
Version 0.2.2 (2023-11-03)¶
Bug fixes and improvements¶
- Fix duplicate session's state change notifications in some cases (e.g. after process restart and re-attaching a listener when session's been completed right before). This also fixes
IllegalStateException
inSession.await()
in these cases. - Make confirmation's background fully transparent.
- Don't display loading indicator during confirmation from system.
Version 0.2.1 (2023-10-30)¶
Bug fixes and improvements¶
- Fix issues with incorrect sessions behavior when multiple session confirmations are active simultaneously and are stacked up on each other.
- Remove unnecessary Activity flags from
AndroidManifest.xml
.
Version 0.2.0 (2023-10-28)¶
Dependencies¶
- Updated AndroidX Room to 2.6.0.
- Updated RecyclerView to 1.3.2 (sample apps dependency).
Bug fixes and improvements¶
- Remove intrusive behavior of
DEFERRED
confirmation: dismissing keyguard, using full-screen intent.USE_FULL_SCREEN_INTENT
andDISABLE_KEYGUARD
permissions were removed. Also it allowed to makeDEFERRED
confirmation's behavior consistent on old and new Android versions, as on old versions full-screen intent behaved likeIMMEDIATE
confirmation. - Enable vibration and lights for library's notification channel.
- Make confirmation's background semi-transparent.
- Fix incorrect handling of
file:
URIs in sample apps. - Add documentation about permissions and library's architecture.
Version 0.1.6 (2023-10-17)¶
Dependencies¶
- Updated Dokka to 1.9.10 Beta.
Bug fixes and improvements¶
- Extend from
FileProvider
and declare it inAndroidManifest.xml
instead to avoid possible issues and providers conflicts.
Version 0.1.5 (2023-10-11)¶
Bug fixes and improvements¶
- Fix an issue with sessions'
commit()
implementation when it allowed to commit while session is already in the process of being committed.
Version 0.1.4 (2023-10-10)¶
This release bumps compileSdk
to 34.
Dependencies¶
- Updated Gradle wrapper to 8.4.
- Updated Android Gradle Plugin to 8.1.2.
- Updated
apksig
to 8.1.2. - Updated
androidx.annotation
to 1.7.0. - Updated
androidx.core
to 1.12.0. - Updated
androidx.activity
to 1.8.0 (sample apps dependency). - Updated
androidx.lifecycle
to 2.6.2 (sample apps dependency). - Updated
androidx.navigation
to 2.7.4 (sample apps dependency). - Updated Material Components to 1.10.0 (sample apps dependency).
Bug fixes and improvements¶
- Make it possible to commit an arbitrary session more than once (if its confirmation was interrupted, e.g. by completely exiting the app).
- Update
compileSdk
and sample apps'targetSdk
to 34. - Change primary color of color scheme in sample apps to match the logo.
Version 0.1.3 (2023-09-23)¶
Added a logo for the library! Sample apps icon now uses the logo too.
Bug fixes and improvements¶
- Small optimization in
SESSION_BASED
package installer.
Version 0.1.2 (2023-09-19)¶
Bug fixes and improvements¶
- Fix deadlock in
SESSION_BASED
package installer.
Version 0.1.1 (2023-08-30)¶
Bug fixes and improvements¶
- Add index for
lastLaunchTimestamp
internal database column.
Version 0.1.0 (2023-08-24)¶
Dependencies¶
- Updated Kotlin to 1.9.10.
- Updated Android Gradle Plugin to 8.1.1.
- Updated
apksig
to 8.1.1.
Bug fixes and improvements¶
- Don't add
DisposableSubscription
instance toDisposableSubscriptionContainer
if it's already added.
Public API changes¶
- Breaking:
Sequence<Apk>.filterIncompatible()
inApkSplits
is renamed toSequence<Apk>.filterCompatible()
.
Version 0.0.11 (2023-08-19)¶
Dependencies¶
- Replaced transitive
kotlinx-coroutines-android
dependency withkotlinx-coroutines-core
.
Bug fixes and improvements¶
- Handle sessions' cancellation synchronously.
- Fix falling back to using
ContentResolver
instead of Java File API when file path hasmnt/media_rw
in the middle.
Version 0.0.10 (2023-08-18)¶
Dependencies¶
- Updated Kotlin to 1.9.0.
- Updated Android Gradle Plugin to 8.1.0.
- Updated
apksig
to 8.1.0. - Updated Gradle wrapper to 8.3.
Bug fixes and improvements¶
- Reduce count of threads in shared Ackpine thread pool.
Public API changes¶
- Due to updating to Kotlin 1.9,
entries
property was added toConfirmation
,InstallerType
,Abi
andDpi
enums.
Version 0.0.9 (2023-08-16)¶
Bug fixes and improvements¶
- Detach state listener when session reaches terminal state in
Session.await()
. - Don't store strong references in
DisposableSubscription
implementations. - Don't add listener instance to session if it's already registered.
Version 0.0.8 (2023-08-15)¶
Bug fixes and improvements¶
- Fix
No such file or directory
error when usingINTENT_BASED
installer on API < 24 and APK is not readable directly. - Improve progress reports for
INTENT_BASED
installer. - Add documentation for
AssetFileProvider
.
Version 0.0.7 (2023-08-14)¶
Bug fixes and improvements¶
- Don't expose
file:
URIs on API level >= 24 when using intent-based installer. Nowackpine-core
artifact declaresFileProvider
in its manifest to support this.
Version 0.0.6 (2023-08-12)¶
Bug fixes and improvements¶
- Fix incorrect handling of
file:
URIs inZippedFileProvider
. - Fix NPE when iterating APKs sequence in Java sample.
Version 0.0.5 (2023-08-08)¶
Bug fixes and improvements¶
- Allow to configure
requireUserAction
option when creatingInstallParameters
. - Revert to not showing a full screen loading indicator after session is committed to avoid unnecessary UI interruption when user's action is not required.
- Fix session not completing with failure when navigating back from
SessionCommitActivity
on API >= 33 if predictive back gesture is not enabled.
Version 0.0.4 (2023-08-04)¶
Bug fixes and improvements¶
- Finish activity with loading indicator after install session was approved by user (using
SESSION_BASED
installer). - Purge sessions in terminal state from internal database one day after last launch.
Version 0.0.3 (2023-08-03)¶
Bug fixes and improvements¶
- Fix
IllegalStateException
inSession.await()
when session has failed with an exception.
Public API changes¶
- Now all Ackpine artifacts have different Android namespaces. Generated
R
classes coming from the library need to be re-imported if they were used in client code.
Version 0.0.2 (2023-07-31)¶
Dependencies¶
- Updated
kotlinx.coroutines
to 1.7.3. - Updated AndroidX Room to 2.5.2.
Bug fixes and improvements¶
- Show a full screen loading indicator after session is committed if it takes long to launch system confirmation activity.
- Fix race when session is failing with
Session $id is dead
instead of other reasons. - Create session first and only then persist it in
PackageInstaller
andPackageUninstaller
implementations to avoid persisting if session factory threw an exception. - Fix night theme in sample app.
Public API changes¶
- Added constructors with default values to
InstallFailure
descendants (via@JvmOverloads
).
Version 0.0.1 (2023-07-26)¶
Initial release.