Questions tagged mvp

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

How to observe activity presenter variables from fragment presenter?

I am creating a weather application, the structure of which is as follows: a single activity (host) and two fragments. I need to implement it with the MVP architecture and using RxJava. When the app starts, the coordinates are calculated using GPS in the activity and will be stored in the activity presenter, but I […]

By yaromchikV
Categorized as android, mvp, presenter, rx-java

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
Categorized as android, android-mvp, dagger-2, mvp

How to implement Firebase Auth using map architecture android

please tell me this is correct implementation of MVP Architecture using Kotlin I have confusion with MVP . please anyone guide me how to do firebase google auth using Kotlin MVP Architecture in good way. I’m not getting result in onActivity for Firebase Auth. This is my presenter interface LoginContract { interface View { fun […]

By Ankit Shastri
Categorized as android, kotlin, mvp

Android: MVP + Hilt + Retrofit2

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, ^ is injected at is injected at android.content.Context is […]

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

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
Categorized as android, android-mvp, model-view-controller, mvp

Retrofit APIService Injection by Dagger Hilt in MVP Architecture’s Model Class

I am trying to inject retrofit APIServices dependency into the model class. Here is My API Module Source Code: @Module @InstallIn(SingletonComponent::class) object ApiModule { @Singleton @Provides fun providesHttpLoggingInterceptor() = HttpLoggingInterceptor().apply { level = HttpLoggingInterceptor.Level.BODY } @Singleton @Provides fun providesOkHttpClient(httpLoggingInterceptor: HttpLoggingInterceptor): OkHttpClient = OkHttpClient.Builder() .addInterceptor(httpLoggingInterceptor) .build() @Singleton @Provides fun providesRetrofit(okHttpClient: OkHttpClient): Retrofit = Retrofit.Builder() .addConverterFactory(GsonConverterFactory.create()) .baseUrl(ApiConfig.BASE_URL) […]

By Abu Sufian Shawon
Categorized as android, dagger-hilt, mvp, retrofit2

How to implement View/Presenter in Android with Hilt; Error: Dagger/DependencyCycle

I im new to Android as well as to Hilt and fail to compile my code in this Model View Presenter(MVP) approach with dependency Injection via Hilt. Ich have already tried various ways, for example: How to MVP in Dagger Hilt? but nothing worked so far. As I have started programming with the Android framework […]

How to solve Dagger2 and Moxy conflict

Whenever I try to run the application it fails when opening FriendListActivity: Process: android.example.findmyfriends, PID: 4500 java.lang.RuntimeException: Unable to start activity ComponentInfo{android.example.findmyfriends/android.example.findmyfriends.ui.friendsactivity.FriendListActivity}: kotlin.UninitializedPropertyAccessException: lateinit property presenter has not been initialized at at at at at at$H.handleMessage( at android.os.Handler.dispatchMessage( at android.os.Looper.loop( at at java.lang.reflect.Method.invoke(Native Method) at$ at […]

By Dima Sidukov
Categorized as android, android-moxy, dagger-2, kotlin, mvp

How to handle multiple retrofit api calls with MVP pattern on Android, where the data fetching of all endpoints is not critical

I am implementing an android app that presents movies from TMDB api. I have implemented two parts of the app, giving the viewer the ability to view popular movies and also search through movies with textsearch (with retrofit2 calls). Now the final point of the app, is to be able to give full movie details […]

By Lampros Marantos
Categorized as android, endpoint, mvp, python-requests, retrofit

mvp recycler adapter not showing data

Myself as a beginner in Kotlin and MVP pattern. What I face a problem is, I cannot get data in recycler view. My datas are coming from api, and they are working and printing in console. I cannot find either the way how I am trying to set data in the adapter is wrong or […]

By Hubby Tiwari
Categorized as android, android-recyclerview, kotlin, mvp
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