Skip to content
This repository has been archived by the owner on Dec 17, 2020. It is now read-only.

Releases: NeoTech-Software/Android-Retainable-Tasks

Version 1.0.0 RC-5

29 Jan 12:30
Compare
Choose a tag to compare

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

29 Jan 12:32
Compare
Choose a tag to compare

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

29 Jan 12:37
Compare
Choose a tag to compare
  • 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

08 Sep 12:02
Compare
Choose a tag to compare
  • Fixed #3 and #4
  • Fixed crash that could happen in the TaskManagerLifeCycleProxy because onDestory was called after the Activity super.onDestroy call.
  • Updated compileSdkVersion and targetSdkVersion to 26
  • Updated Android Support Libraries to 26.0.2

Version 1.0.0 RC-1

26 Jun 06:40
Compare
Choose a tag to compare

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 of onFinish(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 or TaskFragmentCompat) needed to have a tag in order for them to support a TaskManager instance through the getTaskManager() 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 legacy Fragment implementation.
  • The TaskManagerProvider has been renamed to TaskManagerOwner
    The TaskManagerProvider has been renamed to TaskManagerOwner 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 an IllegalStateException
    The Task.getLastKnownProgress() method returns null in version 1.x instead of throwing an IllegalStateException 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 call onDestory()
    In version 1.x onDestroy() has been added to the TaskManagerLifeCycleProxy class, classes using
    the TaskManagerLifeCycleProxy need to call this method. Adjust your code accordingly, because not doing so can lead to temporary memory leaks.

Version 0.2.5

07 Dec 09:46
Compare
Choose a tag to compare
  • 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

07 Dec 10:04
Compare
Choose a tag to compare
  • Fixed a memory leak, the BaseTaskManager class was holding a reference to the BaseTaskManager.UIStateProvider interface (which is part of the TaskManagerLifeCycleProxy) and was thus leaking the Activity or Fragment the proxy was attached to. To fix this the BaseTaskManager.UIStateProvider interface has been removed, instead the TaskManagerLifeCycleProxy now reports the UI state to the BaseTaskManager using the new setUIReady method.

    TLDR: The BaseTaskManager no longer gets the ui-state, instead the TaskManagerLifeCycleProxy sets the ui-state.

  • Fixed a crash that occurred for Fragments nested within Fragments that where using the TaskManager class. This crash was caused because the Fragment.getFragmentManager method returns the child-FragmentManager for nested Fragments instead of the Activity FragmentManager. This has now been fixed by looping through the Fragment.getParentFragment method until we find the Fragment that's directly attached to the Activity.

Version 0.2.3

18 Jun 20:03
Compare
Choose a tag to compare
  • Added support for TaskManagers inside nested Fragments (child Fragments).

Version 0.2.2

18 Jun 22:46
Compare
Choose a tag to compare
  • Fixed: Tasks can now safely be started before the UI is ready (for example in onCreate);

Version 0.2.1

19 Mar 20:38
Compare
Choose a tag to compare
  • Added support for API level 8;
  • Added execute method to the TaskManager class for executing Tasks using custom Executors;
  • Added more documentation;
  • Bug fixes and code improvements;