I want to pass the Model data into another activity using Parceler through Bundle intent. My problem is how could I pass the data from Presenter into the View layer to display in another activity using MVP architecture in android?
Pass bundle intent in android using MVP
4.9k Views Asked by vidalbenjoe At
1
There are 1 best solutions below
Related Questions in ANDROID
- Delay in loading Html Page(WebView) from assets folder in real android device
- MPAndroidChart method setWordWrapEnabled() not found
- Designing a 'new post' android activity
- Android :EditText inside ListView always update first item in the listview
- Android: Transferring Data via ContentIntent
- Wrong xml being inflated android
- AsyncTask Class
- Unable to receive extras in Android Intent
- Website zoomed out on Android default browser
- Square FloatingActionButton with Android Design Library
- Google Maps API Re-size
- Push toolbar content below statusbar
- Android FragmentPagerAdapter Circular listview
- Layout not shifting up when keyboard is open
- auDIO_OUTPUT_FLAG_FAST denied by client can't connect to localhost
Related Questions in ANDROID-INTENT
- Unable to receive extras in Android Intent
- Android - No view found for fragment
- I want to Show Simple Toast Message When User Click On Media Controller button Pause/Start/Stop in video View Using Media Controller
- Android Studio - Illegal character 8204 error
- invoking application activity from url in email
- How to send object using getserializable extra method
- Google Play services LocationSettingsAPI - LocationSettingsRequest Dialog not Showing
- How to getCropAndSetWallpaperIntent(Uri imageUri) to work?
- Android put and get parcelable array error
- Save image from Camera take picture intent to application private storage
- how to get the URL from mainActivity to the second activity using intents?
- how to launch an image in a activity by clicking a button in a diffrent activity in android studio
- Cannot start activity using explicit intent
- Getting a files extension from Filepicker-Intent
- About getSharedPreferences
Related Questions in BUNDLE
- Call special fragment in Navigation Drawer Activity from separate Activity
- Errno::EACCES: Permission denied in create new app ruby on rails
- Creation of bundle products in a loop
- How can I setup the distribution build to get watchkit App working?
- Parceling objects in android to transfer from one activity to another
- How to use Stanza.io without browserify?
- Rails Bundle Update FetchError fail
- Installing refills gem gives error
- Send data from activity to viewpager fragment in Android
- Have trouble running the meteor's bundle
- How do I load url from Bundle in Android
- Change bundle content per user
- Configure FOSUserBundle Windows
- Access XML file in project bundle in Xcode 6.3.2
- Passing Number[] array through Intent
Related Questions in MVP
- How to apply MVP pattern to android project
- Searching for an example of class-binding by a interface
- MVP in WinForms ( presenter & program.cs)
- Maintaining different build flavors across modules in Android Studio
- Can I create View and Presenter in different Project in MVP Pattern
- Android MVP communications
- Android: MVP. Right way to communicaticate between components
- MVP, set the view of the presenter to null on destroy?
- MVP for android. Is it worth the effort?
- Dagger 2 multiple Retrofit instances built with different URLs for hitting different APIs using constructor injection
- Android : best case for communicating adapter with Activity/Fragment
- How to data-bind my View's button to the Model, via its interface in the Presenter
- How to test second activity started in instrumentation test in MVP?
- Android. Interact with menu from Presenter
- Android MVP architecture - communication between repository and view
Related Questions in PARCELER
- Can "import org.parceler.Generated" be removed savely?
- Wrap/unwrap through Parcel library a RealmList inside one RealmObject within another RealmObject
- Usage of parceler (@Parcel) with Realm.io (Android)
- Parceler use inheriting generic type
- Compile Time Error When Converting RealmObject Class To Kotlin
- Parceler unwrap giving wrong data
- How to parse Json using retrofit and parceler library
- Migrating to Gradle 3.0.0: Error - D8: Program type already present
- Android Parceler library: Unable to find generated Parcelable class
- error: Parceler: Unable to find read/write generator for type io.realm.RealmList
- How can i serialize a Realm object which has a custom class
- sending a list of unsupported type using parceler
- How to parcel cascading classes with Parceler?
- Parceler - annotate interface with factories on an implementation
- Parceler: Code generation did not complete successfully
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
This is certainly possible. Presuming that your Activity implements your View interface you'd have a method in the interface like:
Then in the Activity:
And in Presenter:
However I don't recommend that you do this
I'm of the opinion that quite a few classic Android patterns should be used sparingly when doing MVP. This includes things such as
onActivityResult& passing data around between Activities/Fragments usingBundle.To keep things as decoupled and clean as possible Activities should avoid talking to other Activities, Presenters shouldn't talk to other Presenters, etc. If you need to access data from one Activity in another Activity then send it to the model to be persisted. The next Activity will then be sent this data by its Presenter which will have got it from the model.
The following diagram gives a better overview:
Rather than passing the details as part of the Bundle when starting the next Activity they are persisted in the model for the next Activity to load.