Questions tagged android-mvp

Explore the latest questions and answers asked by our top developers.

How to manage the lifecycle of Dagger2 components?

I am learning Dagger 2, want to use it with Single Activity and MVP approach. The following questions arose: I want the presenter of some fragments to stay alive when the screen rotates. As I understand it, the only class that lives longer than fragment/activity is Application. I have to create components for these presenters […]

By SiverH44
Published
Categorized as android, android-mvp, dagger-2, mvp

Android MVP – Data from activity presenter to fragment presenter

I have an activity with a DialogFragment and I need to pass an ArrayList from the activity presenter to the fragment presenter. Currently I’m doing this within the newInstance method with parameters and by using arguments. Is there any other method which I should consider? Source: Android Questions

Is it possible to extract a string in presenter class without context?

I am looking into extracting a string in a presenter class. There’s a way to do it with context but it’s not recommended to use context in presenter due to memory leaks and other issues. Is there a way I can do it without using context? Here’s my code for example : testLine = when […]

By Angela Heely
Published
Categorized as android, android-mvp, kotlin, string

I want to implement MVP pattern and need a context in this

How to pass Activity context in Google Auth using android because in auth required activity context. that is my presenter interface LoginPresenter { fun onSignInClick(email: String?, password: String?) fun onSignUpClick(email: String?, password: String?, firstName: String?, lastName: String?, phone: String?, isAcceptTerms: Boolean) fun onForgotPasswordClick() fun onSignInViewClick() fun onSignUpViewClick() fun createGoogleClient(loginView: LoginActivity?) fun onStart() fun signIn(loginView: LoginActivity) […]

By Ankit Shastri
Published
Categorized as android, android-mvp, kotlin

Is there any "helperclass" allowed in mvc / mvp pattern?

I am programming with android studio and I am using the mvp (model view presenter) pattern. But I have some broadcast receiver e.g. to know when the device is starting. Also I have a class called notificationhelper, there I create the notification channels and define the exact messages. Are these (bc and helper) classes allowed […]

By MaxiMalCore
Published
Categorized as android, android-mvp, model-view-controller, mvp

Android: MVP + Hilt + Retrofit

I’m trying add Hilt in Android with MVP and Retrofit, but I don’t know how inject Api Service from Retrofit into Presenter. The Android Studio show me this error: error: [Dagger/DependencyCycle] Found a dependency cycle: public abstract static class SingletonC implements App_GeneratedInjector My code is this: HomeActivity @AndroidEntryPoint class HomeActivity : AppCompatActivity(), HomeContract.View { @Inject […]

By Johan Quintero
Published
Categorized as android, android-mvp, dagger-hilt, kotlin, retrofit2

Android MVP presenter unit test with Mockito causes "Wanted but not invoked" error

I know it was asked before, but i am currently diving into testing and i have the struggle to unit test presenter in MVP pattern with Mockito My code setup: Item class public class ItemJSON { @SerializedName("title") String textHolder; @SerializedName("id") int factNumber; public ItemJSON(String factText, int factNumber) { this.textHolder = factText; this.factNumber = factNumber; } […]

By GremlinShX
Published
Categorized as android, android-mvp, mockito, presenter, unit-testing

Shared ViewModel in MVI

How to use shared viewmodel in MVI architecture? Is it actually used to communicate between fragments, or do we use an interface, or a broadcast receiver? That part is not clear to me, and I can’t find it anywhere. What is best practice? Thanks all Source: Android Questions

How Voice Controlled Android App Architecture Can be Developed?

Goal: Provide voice commands support to the Android app so that all the operations currently performed using touch(Physical interaction using buttons and navigations) can be performed using ASR(Automatic Speech Recognition). Query: Now, I am good with the part where we recognize the commands and find the operation’s intent. However, I am using MVC or MVP […]

I want background of image blur but middle part not blur of image

Hello All I want to background of image blur not full image please suggest me best in android and show the image on recycler view with blur effect Source: Android Questions

By Raj kumar
Published
Categorized as android, android-mvp, android-mvvm, flutter, kotlin
1 2 3

Still Have Questions?


Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us
faq