All Downloads are FREE. Search and download functionalities are using the official Maven repository.

onactivityresult.IntentData Maven / Gradle / Ivy

There is a newer version: 0.6.0
Show newest version
package onactivityresult;

import static java.lang.annotation.ElementType.PARAMETER;
import static java.lang.annotation.RetentionPolicy.CLASS;

import java.lang.annotation.Retention;
import java.lang.annotation.Target;

/**
 * parameters of a {@link OnActivityResult} annotated method can be annotated to get the {@link android.content.Intent#getData()} of the intent
* Example:
*

* * @OnActivityResult(requestCode = 1) * void onResult(final int resultCode, @IntentData final Uri uri) { * // Do something * } * *

*
* If any annotation with the name Nullable (e.g. google's support annotation or IntelliJs annotation) is applied on this parameter,
* it'll check the {@link android.content.Intent} for non null first and then try to get the intent data.
* If the intent or the data is null, null will be returned. *
*
* If any annotation with the name NotNull or NonNull (e.g. google's support annotation or IntelliJs annotation) is applied on this parameter,
* it'll check the {@link android.content.Intent} for non null first and then check that the intent data is also not null.
* If the intent or the data is null an exception will be thrown. * * @since 0.2.0 */ @Retention(CLASS) @Target(PARAMETER) public @interface IntentData {}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy