Class IntentTransferableEntity<E extends Entity>

  • Type Parameters:
    E - concrete type of the Entity that needs to be transferred over intent
    All Implemented Interfaces:
    android.os.Parcelable, com.microblink.intent.MBIntentTransferable

    public abstract class IntentTransferableEntity<E extends Entity>
    extends com.microblink.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

      • Nested classes/interfaces inherited from interface android.os.Parcelable

        android.os.Parcelable.ClassLoaderCreator<T extends java.lang.Object>, android.os.Parcelable.Creator<T extends java.lang.Object>
    • Field Summary

      • Fields inherited from interface android.os.Parcelable

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void consumeContentFromLoadedObject​(IntentTransferableEntity<E> loadedObject)
      Consumes content from object loaded from intent.
      protected E getEntity()  
      protected void readFromParcel​(android.os.Parcel in)  
      void saveToIntent​(android.content.Intent intent)
      Saves this BaseIntentTransferable to Intent so it can be passed to another Activity.
      void writeToParcel​(android.os.Parcel dest, int flags)  
      • Methods inherited from class com.microblink.intent.BaseIntentTransferable

        clearSavedState, describeContents, existsInIntent, getConcreteCreator, getUniqueIdIntentExtraKey, loadFromIntent, saveState
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • IntentTransferableEntity

        public IntentTransferableEntity​(@NonNull
                                        E entity)
      • IntentTransferableEntity

        protected IntentTransferableEntity()
      • IntentTransferableEntity

        protected IntentTransferableEntity​(@NonNull
                                           android.os.Parcel in)
    • Method Detail

      • getEntity

        protected E getEntity()
      • consumeContentFromLoadedObject

        protected void consumeContentFromLoadedObject​(@NonNull
                                                      IntentTransferableEntity<E> loadedObject)
        Description copied from class: com.microblink.intent.BaseIntentTransferable
        Consumes content from object loaded from intent.
        Specified by:
        consumeContentFromLoadedObject in class com.microblink.intent.BaseIntentTransferable<IntentTransferableEntity<E extends Entity>>
      • saveToIntent

        public void saveToIntent​(@NonNull
                                 android.content.Intent intent)
        Description copied from class: com.microblink.intent.BaseIntentTransferable
        Saves this BaseIntentTransferable to Intent so it can be passed to another Activity.
        Specified by:
        saveToIntent in interface com.microblink.intent.MBIntentTransferable
        saveToIntent in class com.microblink.intent.BaseIntentTransferable<IntentTransferableEntity<E extends Entity>>
        intent - Intent to which BaseIntentTransferable should be saved.
      • readFromParcel

        protected void readFromParcel​(@NonNull
                                      android.os.Parcel in)
        readFromParcel in class com.microblink.intent.BaseIntentTransferable<IntentTransferableEntity<E extends Entity>>
      • writeToParcel

        public void writeToParcel​(@NonNull
                                  android.os.Parcel dest,
                                  int flags)
        Specified by:
        writeToParcel in interface android.os.Parcelable
        writeToParcel in class com.microblink.intent.BaseIntentTransferable<IntentTransferableEntity<E extends Entity>>