You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 26, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Feb 26, 2023. It is now read-only.
Use @Extra in an @EService annotated IntentService #466
IntentServices make it easy to handle the execution of commands through the catching of Intents. AndroidAnnotations have a very helpful @Extra annotation for Activitys to inject into fields the extra Bundle found attached to an Intent. Unfortunately, AndroidAnnotations does not support the @Extra annotation in @eservice annotated classes, only in @EActivity classes.
Please add support for @Extra in @EService annotated classes.
Before that PR, we created a named method for each action parameter. Now we just call IntentBuilder.extra in the action method of the generated IntentBuilder. Please see #1070 for details. Also you can inspect MyIntentService_ in the test suite.
@WonderCsabo ok. imo this still can be closed. sure, this issue wants to have @Extra for @EService (used on IntentService) but what is the goal of having this?
Getting easy access to the extra data for the calling intent.
What feature does @ServiceAction provide? correct. getting easy access to the extra data for the calling intent.
you get what i mean? i think using @ServiceAction is even better than having the extra data in class member.
Feel free to close this issue. When I opened it the @ServiceAction annotation did not yet exist and indeed this implements the feature that I requested.
Activity
dodgex commentedon Nov 10, 2014
i'm not 100% sure but i think, this issue can be closed as there is
@EIntentServiceand@ServiceActionthat allow this. https://github.com/excilys/androidannotations/wiki/Enhance-IntentServicesWonderCsabo commentedon Nov 10, 2014
That is not the same, also we removed the extra methods for
@ServiceAction(#1214).dodgex commentedon Nov 10, 2014
i'm not using intentservice or
@ServiceActionso i cant test. but how would you now put extras to the ServiceAction call?the current version of the wiki allows this
is this feature gone? or how to set the extras?
WonderCsabo commentedon Nov 10, 2014
Before that PR, we created a named method for each action parameter. Now we just call
IntentBuilder.extrain the action method of the generatedIntentBuilder. Please see #1070 for details. Also you can inspectMyIntentService_in the test suite.dodgex commentedon Nov 10, 2014
@WonderCsabo ok. imo this still can be closed. sure, this issue wants to have
@Extrafor@EService(used on IntentService) but what is the goal of having this?Getting easy access to the extra data for the calling intent.
What feature does
@ServiceActionprovide? correct. getting easy access to the extra data for the calling intent.you get what i mean? i think using
@ServiceActionis even better than having the extra data in class member.WonderCsabo commentedon Nov 10, 2014
I agree this can be closed. @DayS's PR had a bigger scope.
erickok commentedon Nov 10, 2014
Feel free to close this issue. When I opened it the @ServiceAction annotation did not yet exist and indeed this implements the feature that I requested.