Releases: NeoTech-Software/Android-Retainable-Tasks
Version 1.0.0 RC-5
Release candidate 5 contains Proguard rules to make sure that the different annotations (such as @TaskPostExecute
) keep working with Proguard enabled.
Version 1.0.0 RC-4
The update to Gradle 4.1 (Release candidate 3) broke something in the publishing chain which caused the uploaded artifacts to not have the correct dependencies. Release candidate 4 fixes this.
- Updated the
com.github.dcendents:android-maven-gradle-plugin
which supports Gradle 4.1 - Updated the Android Build Tools to 3.0.1
- Updated the Android Support Libraries to 27.0.2
Version 1.0.0 RC-3
- Changed compileSdkVersion and targetSdkVersion to 27
- Updated the Android Gradle Build Tools to 3.0 (Gradle 4.1)
- Updated the Android Build Tools to 26.0.2
- Updated the Android Support libraries to version 27.0.1
Version 1.0.0 RC-2
Version 1.0.0 RC-1
Whats new?
- Annotation support:
- Compile-time, almost zero run-time performance impact;
- 5 different annotations:
@TaskPreExecute
,@TaskPostExecute
,@TaskProgress
,@TaskCancel
and@TaskAttach
; - Supports automatic casting to the correct (
Task
) type:onFinish(MyTaskType task)
instead ofonFinish(Task<?, ?> task)
;
- Support for the LifecycleObserver class from the Android Architecture Lifecycle library;
- The minimum supported Android version has changed from API 8 to API 14;
- General bug-fixes and improvements;
See the updated documentation and sample app for more information on how to use the new annotations!
How to migrate?
If you are using Android-Retainable-Tasks version 0.x and you want to upgrade to version 1.x most things should just work fine, but 100% compatibility cannot be guaranteed, consider the following changes:
- Fragments no longer need tags in order for them to support a
TaskManager
Prior to version 1.x Fragments (TaskFragment
orTaskFragmentCompat
) needed to have a tag in order for them to support aTaskManager
instance through thegetTaskManager()
method. In version 1.x this is no longer necessary. This is however still necessary when you are not using the Android Support library, because of some important APIs that are missing from the legacyFragment
implementation. - The
TaskManagerProvider
has been renamed toTaskManagerOwner
TheTaskManagerProvider
has been renamed toTaskManagerOwner
so it's more inline with the naming used in the Android Architecture Lifecycle library, the old name can still be used but it's deprecated and will probably be removed in later versions. - The
Task.getLastKnownProgress()
method no longer throws anIllegalStateException
TheTask.getLastKnownProgress()
method returns null in version 1.x instead of throwing anIllegalStateException
when no progress is available yet, when upgrading check if no code relies
on this behaviour! - When using the
TaskManagerLifeCycleProxy
you now also need to callonDestory()
In version 1.xonDestroy()
has been added to theTaskManagerLifeCycleProxy
class, classes using
theTaskManagerLifeCycleProxy
need to call this method. Adjust your code accordingly, because not doing so can lead to temporary memory leaks.
Version 0.2.5
- Build tool dependency updates;
- Updated compileSdkVerison from API 23 to API 24 (Android Nougat);
- Updated v7 AppCompat library from version 23.4.0 to version 24.2.1;
- Minor JavaDoc update;
- Fixed critical crash on Android API 10 and below. This crash was caused due to the usage of the
FragmentActivity.getFragmentManager
method instead of the support v7 variant:FragmentActivity.getSupportFragmentManager
.
Important note on Android API 8 support: Android API 8 support has been removed (dropped) from the v7 and v4 support libraries since version 24.2.0. Because the minSdkVersion in the support libraries is now 9 Android API 8 is no longer supported. This library depends on the v7 AppCompat library version 24.2.1 thus wont officially work with Android API 8!
But I've implemented a workaround so you can still compile apps which target Android API 8. This workaround will be removed in a future version and you should not expect any support for bugs that might occur when targeting minSdkVersion 8.
Version 0.2.4
-
Fixed a memory leak, the
BaseTaskManager
class was holding a reference to theBaseTaskManager.UIStateProvider
interface (which is part of theTaskManagerLifeCycleProxy
) and was thus leaking theActivity
orFragment
the proxy was attached to. To fix this theBaseTaskManager.UIStateProvider
interface has been removed, instead theTaskManagerLifeCycleProxy
now reports the UI state to theBaseTaskManager
using the newsetUIReady
method.TLDR: The
BaseTaskManager
no longer gets the ui-state, instead theTaskManagerLifeCycleProxy
sets the ui-state. -
Fixed a crash that occurred for
Fragments
nested withinFragments
that where using theTaskManager
class. This crash was caused because theFragment.getFragmentManager
method returns the child-FragmentManager
for nestedFragments
instead of theActivity
FragmentManager
. This has now been fixed by looping through theFragment.getParentFragment
method until we find theFragment
that's directly attached to theActivity
.
Version 0.2.3
- Added support for TaskManagers inside nested Fragments (child Fragments).
Version 0.2.2
- Fixed: Tasks can now safely be started before the UI is ready (for example in onCreate);
Version 0.2.1
- Added support for API level 8;
- Added
execute
method to theTaskManager
class for executingTasks
using customExecutors
; - Added more documentation;
- Bug fixes and code improvements;