I have some simple AIDL, which can carry/return some custom parcelable model, lets call it User
. This works without a problem, data is passed properly. Now I want to have option for returning null
, e.g. in case when registration fails, so I'm placing @nullable
at te beginning of line
@nullable User registerUser(String name);
and then I'm getting '@' unexpected
error, it's not recognizing this annotation, in fact any annotation can't be placed... Do I have to import/enable somehow these annotations?
placing @nullable
is suggested HERE (last point on "be aware that:" list), HERE and HERE
some sample from Android OS using @nullable
(for arguments) in HERE, so this is possible and valid
very similar question in HERE (without an answer :( )