ReleaseNotes - shiraji/androidannotations GitHub Wiki

Thanks a lot to all the contributors!

Releases are available as standalone jars or via Maven or Gradle.

Latest stable release : 3.3.2 #

Released on July 10, 2015

Bug fixes

Contributors

3.3.1 #

Released on May 9, 2015

Minor changes

  • #1399 Support more parameter types (Float, Integer, Long) in @PreferenceChange annotated methods, parse String newValue param into desired Number
  • #1397 Allow android.support.v4.preference.PreferenceFragment with @PreferenceScreen

Bug fixes

Contributors

3.3 #

Released on April 30, 2015

Main changes

  • #1110 New processing option logAppenderFile, which can be used to turn off logging to file
  • #1162 New set of annotations for injecting Preference and co. : @PreferenceScreen, @PreferenceByKey, @PreferenceChange, @PreferenceClick, @AfterPreferences, @PreferenceHeaders
  • #1166 Support for Spring for Android (rest-template) 2.0 in the [Rest API](Rest API)
  • #1186 Add forceLayoutInjection parameter to @EFragment, to override layout from super classes (useful for ListFragment)
  • #1195 New processing option threadControl, which can turn off thread control (@SupposeBackground, @SupposeUi)
  • #1234 Allow multiple actions for [@ReceiverAction](Enhance BroadcastReceivers#receiveraction)
  • #1252 Allow injection of custom RuntimeExceptionDao with @OrmLiteDao
  • #1292 RoboGuice 3 integration
  • #1297 Add support for Bundle parameter when starting Activity with the generated builder

Minor changes

Bug fixes

  • #1224 Fix BLUETOOTH_SERVICE injection with @SystemService
  • #1245 Release OpenHelperManager with @OrmLiteDao to avoid unnecessary database lock
  • #1267 Fix possible repeated @SuppressWarnings with @EView, which cause compilation error
  • #1275 Fix @AfterViews being called multiple times when same Fragment instance is re-added
  • #1282 Fix camelCase to snake_case conversion (used by a bunch of annotations)
  • #1283 Fix NPE when AA tries to inject into an already invalidated enhanced class
  • #1286 Fix @Receiver not being called with OnAttachOndetach and LocalBroadcastManager
  • #1289 Fix log file being resolved multiple times
  • #1293 Improve fix #1289
  • #1294 Fix for Parcelable[] ClassCastException when restoring from Bundle (used by a bunch of annotations)
  • #1325 Fix stackoverlow when @InstanceState is used on a Bundle field
  • #1328 Fix constructor validation with @EIntentService, no-arg constructor is required
  • #1342 Fix classpath of HelloWorldEclipse example
  • #1353 Fix @ViewById with generic types
  • #1357 @DefaultStringSet now returns an empty set by default
  • #1370 Fix @RoboGuice listener field injections
  • #1371 Fix infinite processing when a non-abstract enhanced inner class is present in an abstract class (this is not allowed since now)
  • #1380 Fix injecting AppWidgetManager with @SystemService
  • #1382 Fix Serializable List not working with @FragmentArg and others, now only classes implementing Serializable can be used (like ArrayList)

Contributors

3.2 #

Released on November 9, 2014

Main changes

  • #1100 Remove GreenDroid support
  • #1099 Remove HoloEverywhere support
  • #1058 Add @Result annotation for @OnActivityResult
  • #1101 New @Receiver attribute: scheme
  • #1130 Add @WakeLock annotation
  • #1092 Add @ReceiverAction annotation
  • #1181 Add @Extra annotation for @Receiver
  • #1184 Add dataSchemes parameter for @ReceiverAction

Minor changes

  • #1150 Improve JavaDoc on @EditorAction
  • #1151 Add missing system services for @SystemService
  • #1154 Update @Receiver JavaDoc
  • #1155 Update RoboGuice example for RoboGuice 2.0
  • #1159 @AfterExtras annotation also overrides the onNewIntent method
  • #1214 Don't add the extra methods in IntentBuilder with @ServiceAction

Bug fixes

  • #1124 Fix validation of @SupposeXXX
  • #1134 Re-add Otto annotation handlers
  • #1075 Fix issues with generic @EView and @EViewGroup
  • #1117 Fix generic issues in @EFragment
  • #1158 Fix classpath issues with RoboGuice
  • #1171 Fix possible memory leaks with @EFragment and setRetainsInstanceState(true) (see details in the issue)
  • #1179 Fix compilation error on enhanced protected inner classes

Contributors

3.1 #

Released on September 7, 2014

Main changes

  • #289 The parameter model of the annotation @OrmLiteDao is now unnecessary (it is deprecated)
  • #791 Add @SupposeUiThread and @SupposeBackground
  • #494 Add @EditorAction to inject OnEditorActionListener
  • #832 Inject a RequestFactory in RestTemplate
  • #872 Add setBearerAuth method to RestClientHeaders interface
  • #852 Add @Receiver to inject an anonymous BroadcastReceiver in an enhanced component
  • #264 Add support for Set<String> to @SharedPref
  • #975 Add @ViewsById to inject views in a list
  • #875 Add @IgnoredWhenDetached to prevent a method of fragment from being called if detached from activity
  • #928 Add @AfterExtras
  • #172 Integrate with RoboGuice 2.0

Minor changes

  • #746 Allow any constructors for @EBean
  • #1081 Allow any constructors to abstract classes
  • #831 Inject EBeans in Rest interceptors and converters
  • #503 Automatically cast Strings in Shared preferences
  • #826 Added keyRes parameter to @DefaultXXX annotations
  • #782 Copy non AA annotations into generated class
  • #992 Allow any order of parameters of method annotated with @CheckedChange, @Touch and @FocusChange
  • #990 Factorize builders
  • #1002 RestErrorHandler catches NestedRuntimeException
  • #1016 Expose fragment args in fragment builder
  • #1028 Add resName param to @HttpsClient to support library projects
  • #797 Add parameters and return value in trace

Bug fixes

  • #552 FindViewById is called only once
  • #248 Enable to enhance inner classes
  • #892 Fix typo in output
  • #894 Remove unnecessary field restErrorHandler
  • #915 Fix error not handled with @SetsCookies
  • #778 Fix warning about java version
  • #957 Fix tests with java 7
  • #956 Add missing @Override in generated fragments
  • #991 Fix parameterized param in method annotated with @ItemLongClick
  • #993 Remove Resolve log file in logs if unwanted
  • #997 Fix @ItemSelect called on bad reference
  • #1030 Remove unused Context field in SharedPref
  • #1033 Fix javadoc with java 8
  • #1051 Add support for proxy in @HttpsClient
  • #1084 Remove warning (dummyXXXXX) in logs

Contributors

3.0.1 #

Released on January 12, 2014

Minor changes

  • #838 Handle generic wildcards on method parameters
  • #848 Remove generated Api classes to resolve “Multiple dex files” error in Eclipse
  • #853 Clean error messages in IDE
  • #862 Handle named generics on methods
  • #869 #871 #874 Update wiki and javadocs

Bug fixes

  • #837 Bug: Some exceptions were logged in the log file but not shown in IDE
  • #840 Bug: Fix default value for boolean AP option
  • #856 Bug: NPE when @SetsCookie is used but cookie was not set by the server
  • #867 Bug: Generics classes wasn't handled properly
  • #870 Bug: ClassCastException when using the @Trace on onCreate()

Contributors

3.0 #

Released on December 27, 2013

Important: Non backward compatible changes

  • #369 Renamed groupId and packages from com.googlecode.androidannotations to org.androidannotations
  • #410 The API helpers are generated at compile time if needed instead of being part of the API jar.

Main changes and bug fixes

  • #330 Add support of generics on RestTemplate methods
  • #376 Add @CustomTitle annotation
  • #382 @OnActivityResult can be used within fragments
  • #389 Add @CheckedChange annotation
  • #417 Handle missing manifest or R class
  • #442 Generate public constant for handled extras
  • #459 Add @FocusChange and @CheckedChange annotations
  • #469 Extended @OrmLiteDao support for every enhanced components
  • #474 Handle multiple @OptionsMenu in the class hierarchy
  • #477 A parameter can be used twice in @Rest methods urls
  • #485 Add an interceptors field in @Rest annotation
  • #489 Make HierarchyViewer work on any device with @HierarchyViewerSupport
  • #490 Check that AndroidManifest contains internet permission if @Rest is used
  • #499 Add a stop() method for enhanced services
  • #515 @App never injects null
  • #522 GreenDroid support is deprecated and will be dropped on the next release.
  • #525 Add delay field in @Background
  • #526 Otto integration
  • #554 Expose the shared pref key in @SharedPreference generated class
  • #567 Add an @OptionMenuItem annotation to inject MenuItem
  • #569 Handle background tasks cancellation
  • #581 Resource injection for SharedPreferences
  • #601 Handle enhanced IntentService. Add @EIntentService and @ServiceAction annotations
  • #602 Handle getRootUrl() method in Rest interface
  • #605 Add check in UIThread generated code to reuse current thread if possible
  • #609 Add processor option to specify package of R class
  • #615 Add @WindowFeature annotation
  • #617 Fix NullPointerException thrown during refactoring
  • #629 Handle RuntimeExceptionDao in @OrmLiteDao
  • #680 Fix IntentBuilder.startForResult() for Fragment
  • #710 Inject android.content.ClipboardManage instead of android.text.ClipboardManager with @SystemService
  • #579 #711 #748 #818 Add annotations to manage cookies and headers in @Rest interface
  • #429 #786 Integration with HoloEverywhere
  • #492 #496 Fix code generation for @Get Http Method in the Rest API if params are generics

Refactoring

  • #424 Changing processing order: ancestors first
  • #453 Use canonical names in AA core instead of harcoded class names
  • #495 Added some tests around rest API
  • #497 Optimize build time by updating the maven-javadoc-plugin
  • #511 Check for TypeKind.ERROR in addition to ErrorType in case of errors
  • #521 Declare supported options in getSupportedOptions()
  • #562 Handle objects implementing both Serializable and Parcelable in extra
  • #593 Fixed NPE when converters are not defined in the @Rest annotation
  • #597 Use DatabaseHelper.getDao() instead of DaoManager.createDao() for @OrmLiteDao implementation
  • #618 Enhanced crash report message
  • #619 Refactor AndroidAnnotations core to handle validation and processing in same class
  • #627 Fix @ItemClick generation code with parametrized types
  • #678 Log a warning if @RootContext field isn't populated
  • #694 Associate the @UIThread handler to the main thread
  • #733 Fix extra injection generated code
  • #734 Check that API and core version matches
  • #736 Allow any order for params in a @Touch annotated method
  • #747 Fix code generation for @EFragment in Froyo
  • #785 Ignore Internet permission check in library project
  • #792 Fix StackOverflowError with cyclic dependencies with singleton beans
  • #794 Add custom logger
  • #677 #682 Propagate exceptions on @Background/@UIThread annotated methods

Contributors

2.7.1 #

Released on March 04, 2013

Bug fixes

  • #432 ListFragment can't use @ItemClick
  • #381 @OnActivityResult in fragment.
  • #427 @OnActivityResult(REQUEST_CODE) creates fall-through switch-case-statements

You can browse the closed issues for the 2.7.1 release to see all the changes.

Contributors

2.7 #

Released on November 4, 2012

Non backward compatible changes

  • #353 Maven users: the API jar is now a separate artifact, androidannotations-api. We do not use the api classifier any more. If you are using Maven & Eclipse, you need to add two new dependencies to your eclipse factory path, as explained here. Non Maven users: you should now download the zip bundle, the processor jar on the repository doesn't contain its dependencies anymore
  • #25 #258 #278 #294. The generated classes are always final, and you cannot extend from a generated class any more. That's because AndroidAnnotations now takes into account annotations used in superclasses. Also note that component annotations such as @EFragment can now be used on abstract classes.
  • #377 @Rest now has a mandatory converters() parameter and its value() parameter has been renamed to rootUrl, to adapt to Spring Android RestTemplate 1.0.0.RELEASE. Usage example:
@Rest(rootUrl = "http://company.com/ajax/services", converters = { MappingJacksonHttpMessageConverter.class })
public interface MyService {
}
  • #239 In previous releases, the generated rest clients had three constructors, two of which were never used. These two are not generated any more.

Main changes

Other changes

We fixed 42 issues in this release.

You can browse the closed issues for the 2.7 release to see all the changes.

Contributors

2.6 #

Released on June 14, 2012

Download it or update your Maven configuration.

Main changes

Note: Items in bold are not backward compatible.

  • #110 @UiThreadDelayed has been removed, use @UiThread(delay=2000) instead.
  • #3 Fragment support, yeah!
  • #188 In @Extra, the String parameter for the extra name is now optional.
  • #177 Integration with ActionBarSherlock.
  • #120 Support for text change events.
  • #166 @Extra fields are reinjected every time you call setIntent()
  • #171 Set the root url of your @Rest interfaces at runtime with setRootUrl(String rootUrl);.
  • #219 Simple HTTPS.

By the way, have you noticed the new androidannotations.org website?

Other changes

We fixed 29 issues in this release.

You can browse the closed issues for the 2.6 Release to see all the changes.

Contributors

2.5.1 #

Released on March 30, 2012

Bugfixes

  • @InstanceState mades AA crash due to a wrong compile time Android dependency.

See the closed issue for the 2.5.1 Release for details.

Contributor

2.5 #

Released on March 26, 2012 after a great skiing day :)

Main changes

  • Save your activity state with @InstanceState on fields
  • Keep references to your costly objects on config changes in activities with @NonConfigurationInstance on fields
  • Support for Singleton scope on @EBean classes: @EBean(scope = Singleton) public class MySingleton {}
  • You can specify the implementation of an @Bean field: @Bean(MyImpl.class) MyInterface field;
  • AndroidAnnotations fully integrate with GreenDroid
  • @UiThread has an optional delay parameter, and @UiThreadDelayed is deprecated.

Other changes

We fixed 19 issues in this release.

You can browse the closed issues for the 2.5 Release to see all the changes.

Contributors

2.4

Released on Feb 2, 2012

Main changes

  • New Android components : [Service](Enhance Services), [BroadcastReceiver](Enhance BroadcastReceivers), [ContentProvider](Enhance ContentProviders), Application
  • Annotating [custom classes](Enhance custom classes)
  • Annotating [custom views](Enhance custom views)
  • Executing code [after injection](After Injection)

Other changes

We fixed 35 issues in this release, added continuous integration with automatic deployment of snapshots, moved to GitHub, reorganized the documentation and documented many undocumented features.

You can browse the closed issues for the 2.4 Release to see all the changes.

2.3

There was no 2.3 release, due to an error at release time. We jump from 2.2 to 2.4 :) .

2.2

Released on Dec 8, 2011

  • Issue 93: View binding & @AfterViews are executed every time setContentView is called
  • Issue 94: Deploy AndroidAnnotations to Maven Central
  • Issue 102: Rename pref.field().get(default) to getOr(default)
  • Issue 83: @Click & friends with multiple id parameters
  • Issue 125: Dropped support for Eclipse 3.4.X
  • Issue 55: Rest API using Spring Android.
  • Issue 95: @HtmlRes & @FromHtml annotations to inject spanned html strings
  • Issue 107: abstract annotated activities generate abstract activities instead of final activities
  • Issue 111: Convention over configuration can now do camel case => snake case conversion.
  • Issue 112: Adding Null checkers for view injection & binding
  • Issue 41: Setting the dev project as an eclipse plugin, to ease development (hotreplace & debug)
  • Issues 117 & 116 : More doc on how to develop AndroidAnnotations, and being able to run functional tests from eclipse
  • Issues 113 & 63: @EViewGroup (equivalent of @EActivity for ViewGroups)
  • Issue 118: Pref are sometimes not generated / injected
  • Issue 123: long not supported in prefs
  • Issues 109, 126 & 128: Support for dozens of new types of Android Managers injection with @SystemService, even for API level 14 and even hidden system services (useful for custom Android builds).
  • Issue 104: Support for @OptionsMenu and @OptionsItems
  • Issue 127: @NoTitle and @Fullscreen on activities
  • Issue 87: @Trace to trace methods and durations
  • Issue 134: Exception in @Rest when using @Get without value
  • Issue 137: Disable warning on @EActivity when the activity is abstract
  • Issue 136: New tests for @ItemClick Annotation
  • Issue 133: @EActivity on abstract classes generated errors when doing a clean build
  • Issue 135: Support for setRestTemplate() in @Rest
  • Issue 138: onCreate() visibility adapted in abstract activities

2.1.2

Released on Sep 17, 2011

Bugfix release

  • Issue 103: @UiThread & @Background didn't work with generic parameters

2.1.1

Released on Sep 8, 2011

Bugfix release

  • Issue 100: @RoboGuice doesn't work with MapActivity
  • Issue 97: AndroidAnnotations releases failed at perform goal.

2.1

Released on Aug 29, 2011

  • Issue 73: View injection happens after onCreate() and before @AfterViews annotated methods
  • Issue 64: The generated classes are now final.
  • Issue 91: Switched Maven repository from Google Code to Excilys. The new repository is here
  • BackgroundExecutor is now part of the API package instead of being generated at compile time (r858).
  • Added a compile scoped dependency on Android for AndroidAnnotations, which allows Javadoc links as well as including some classes in the API Jar (r856 and r857).
  • Issue 46: handling of Activity.onBackPressed for pre ECLAIR (2.0) Android versions.
  • Issue 47: Creating helpers for SharedPreferences
  • Issue 49: Create an assembly Zip for releases
  • Issue 51: Add automatic functional tests
  • Added NOTE messages at compile time to let the user know which files are generated. Can be viewed in Eclipse with the Error log view. Done at r976.
  • Issue 55: Partial implementation of a Rest API using Spring Android. Not officially supported yet.
  • Issue 74: InputMethodManager service can not be injected
  • Issue 69: SensorManager service can not be injected
  • Issue 75: Using @Extra without value adds an additional unexpected compile error
  • Issue 68: @Extra does not work with Generics
  • Issue 70: @Extra does not work with Arrays
  • Added compiler notes when activities declared in the manifest are not found in the compile path. Done at r1139.
  • Issue 61: Inject Application with @App
  • Issue 79: Add a license checker
  • Issue 78: Switch source repository to Git
  • Issue 88: @AnimationRes can now be used to inject Animation fields

2.0.2

Bugfix release

Released on Apr 13, 2011

  • Issue 48: Unexpected warnings for registered activities that have a different package than the application package.

2.0.1

Bugfix release

Released on Apr 9, 2011

  • Issue 42: AndroidAnnotations could not find the AndroidManifest.xml file if there was a space in the project path.

2.0

Released on Apr 6, 2011

The version number went from 1.0.3 to 2.0 because we made some API changes that are not backward compatible (@EActivity, startActivity* methods), and because a whole part of the internals has been rewritten (i.e. code generation).

  • Issue 7: Code generation using CodeModel instead of Strings
  • Issue 37: Created a sample project to show how to integrate Maven and AndroidAnnotations. Also created a dedicated wiki page.
  • Issue 27: Removed overriding of startActivity()methods. One cannot anymore start an enhanced activity without using the generated name (ieMyActivity_`).
  • Better stack trace printing of compile time unexpected exceptions.
  • Issue 36: Created a snapshots and a releases Maven repository, instead of a common repository. The old repository is still available for previous releases.
  • Activities do not need any more to be in the same package as the R class (we read the AndroidManifest.xml to determine the R class package)
  • Issue 29: Added online Javadoc
  • Issue 39: Removed compile errors on class members when @EActivity is available but has compile errors.
  • Issue 34: Compile errors are issued when @EActivity annotated activities are not registered in the AndroidManifest.xml file.
  • Issue 4: Using a shared executor service instead of creating a new thread each time an @Background method is called.
  • Issue 35: Renamed @Enhance to @EActivity.
  • Global improvements based on the Hibernate Metamodel Generator (which is an annotation processor).

Bug fixes:

  • Issue 26: RClassFinder returned null when the r class was not found, which led to NPE in CoumpoundRClass at compile time instead of a clear error message.
  • Compile time bug when an @ItemSelect method had no parameter (the generated code did not compile)
  • @Transactional overridden method did not call through super (Stack overflow)

Pre 2.0 releases are available on the old Maven repository.

1.0.3

Released on Mar 17, 2011

  • Fixed issue 25: Missing View import when using @RoboGuice without some other annotations.
  • Removed an unused @Inject import in some cases

1.0.2

Released on Mar 13, 2011

  • Issue 22: Support for RoboGuice 1.1.1, removed support for RoboGuice 1.0 and 1.1 (too much hassle). RoboGuice 1.1.1 bug fixes have been successfully backported to AndroidAnnotations.
  • Issue 24: synchronized keyword is not allowed anymore on @UiThread and @Background methods.
  • Issue 21: Created a thin API JAR that should be included in the build path instead of the whole preprocessor JAR. AndroidAnnotations has a much smaller footprint !

1.0.1

Released on Jan 25, 2011

  • Retrofitted a bug fix from RoboGuice (r557)

1.0

Released on Jan 25, 2011

  • Issue 17: support for RoboGuice 1.0 and 1.1. Event listeners (RoboGuice 1.1) are supported as well.
  • Issue 18: injection happens before @BeforeCreate method calls (except view injection of course)
  • Issue 2: @Click and other listener methods cannot be used twice for the same id
  • Improved javadocs
  • Improved code generation, with support for imports
  • @Enhance annotated classes may now be abstract (useful with RoboGuice : you can let your activity implement InjectorProvider and call the getInjector method, which will be implemented in the generated subclass)

1.0-RC4

Released on Jan 17, 2011

  • Issue 11: overriding more startActivity*() methods
  • Issue 12: @Extra throws NPE when extra not set
  • Issue 13: Support for @BeforeCreate
  • Renamed @Layout to @Enhance
  • Issue 10: remove the need for @Layout

1.0-RC3

Released on Jan 9, 2011

1.0-RC2

Released on Jan 6, 2011

  • android.R support
  • @Transactional
  • Events : @LongClick, @ItemClick, @ItemSelect, @LongItemClick, @Touch
  • method names for events can have a specific suffix (myButtonClicked, myButtonSelected)
  • constraints on event methods: no exception allowed

1.0-RC1

Released on Jan 5, 2011

  • Support for @UiThreadDelayed
  • Enough wiki documentation to easily get started and discover all the use cases
  • Added exception handling to @UiThread and @Background

0.5

Released on Jan 4, 2011

  • Support for @Extra, @SystemService, all @XXXRes (replacing @XXXValue)
  • startActivity is now overriden to replace MyActivity with MyActivity_ in Intents

0.4

Released on Jan 4, 2011

  • Support for @Background and @UiThread
  • @Value is replaced by @StringArrayValue, @ColorValue and @StringResValue (will be necessary to support more values)

0.3

Released on Dec 22, 2010

  • Replaced @UiView with @ViewById
  • Added more constraints : private modifier not allowed
  • Support for @Value on Strings, String arrays and colors
⚠️ **GitHub.com Fallback** ⚠️