Class IntentTransferableEntity<E extends Entity>
java.lang.Object
com.microblink.blinkid.intent.BaseIntentTransferable<IntentTransferableEntity<E>>
com.microblink.blinkid.entities.util.IntentTransferableEntity<E>
- Type Parameters:
E
- concrete type of theEntity
that needs to be transferred over intent
- All Implemented Interfaces:
android.os.Parcelable
,com.microblink.blinkid.intent.MBIntentTransferable
public abstract class IntentTransferableEntity<E extends Entity>
extends com.microblink.blinkid.intent.BaseIntentTransferable<IntentTransferableEntity<E>>
Helper class whose concrete implementations can be used for transferring single entity over
intent. Entity objects can be large and this class enables transferring them over intent,
because there is a limitation on maximum allowed size of Android intent extras.
-
Nested Class Summary
-
Field Summary
Fields inherited from interface android.os.Parcelable
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
-
Constructor Summary
ModifierConstructorDescriptionprotected
protected
IntentTransferableEntity
(android.os.Parcel in) IntentTransferableEntity
(E entity) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
consumeContentFromLoadedObject
(IntentTransferableEntity<E> loadedObject) Consumes content from object loaded from intent.protected E
protected void
readFromParcel
(android.os.Parcel in) void
saveToIntent
(android.content.Intent intent) Saves thisBaseIntentTransferable
toIntent
so it can be passed to anotherActivity
.void
writeToParcel
(android.os.Parcel dest, int flags) Methods inherited from class com.microblink.blinkid.intent.BaseIntentTransferable
clearSavedState, describeContents, existsInIntent, getConcreteCreator, getUniqueIdIntentExtraKey, loadFromIntent, saveState
-
Constructor Details
-
IntentTransferableEntity
-
IntentTransferableEntity
protected IntentTransferableEntity() -
IntentTransferableEntity
protected IntentTransferableEntity(@NonNull android.os.Parcel in)
-
-
Method Details
-
getEntity
-
consumeContentFromLoadedObject
Description copied from class:com.microblink.blinkid.intent.BaseIntentTransferable
Consumes content from object loaded from intent.- Specified by:
consumeContentFromLoadedObject
in classcom.microblink.blinkid.intent.BaseIntentTransferable<IntentTransferableEntity<E extends Entity>>
-
saveToIntent
public void saveToIntent(@NonNull android.content.Intent intent) Description copied from class:com.microblink.blinkid.intent.BaseIntentTransferable
Saves thisBaseIntentTransferable
toIntent
so it can be passed to anotherActivity
.- Specified by:
saveToIntent
in interfacecom.microblink.blinkid.intent.MBIntentTransferable
- Overrides:
saveToIntent
in classcom.microblink.blinkid.intent.BaseIntentTransferable<IntentTransferableEntity<E extends Entity>>
- Parameters:
intent
- Intent to whichBaseIntentTransferable
should be saved.
-
readFromParcel
protected void readFromParcel(@NonNull android.os.Parcel in) - Overrides:
readFromParcel
in classcom.microblink.blinkid.intent.BaseIntentTransferable<IntentTransferableEntity<E extends Entity>>
-
writeToParcel
public void writeToParcel(@NonNull android.os.Parcel dest, int flags) - Specified by:
writeToParcel
in interfaceandroid.os.Parcelable
- Overrides:
writeToParcel
in classcom.microblink.blinkid.intent.BaseIntentTransferable<IntentTransferableEntity<E extends Entity>>
-