Repository navigation
OnActivityResult
matboniface edited this page Oct 29, 2012
·
8 revisions
Since AndroidAnnotations 2.7
This annotation is intended to be used on methods to receive results from a previously started activity using android.app.Activity.startActivityForResult(Intent, int)
The annotation value must be an integer constant that represents the requestCode associated with the given result.
The method may have multiple parameters :
- A
android.content.Intentthat contains data returned by the previously launched activity - An
intor ajava.lang.Integerto get theresultCode.
Some usage examples of @OnActivityResult annotation :
@OnActivityResult(REQUEST_CODE)
void onResult(int resultCode, Intent data) {
}
@OnActivityResult(REQUEST_CODE)
void onResult(int resultCode) {
}
@OnActivityResult(ANOTHER_REQUEST_CODE)
void onResult(Intent data) {
}
@OnActivityResult(ANOTHER_REQUEST_CODE)
void onResult() {
}AndroidAnnotations was created by Pierre-Yves Ricau and was originally sponsored by eBusinessInformations.
10/07/2015 The 3.3.2 release is out !
- Get started!
- Download
- Cookbook, full of recipes
- Customize annotation processing
- List of all available annotations
- Release Notes
- Examples
- Read the FAQ
- Join the Mailing list
- Create an issue
- Tag on Stack Overflow
- Ask on Gitter