In the small app I’m developing I want the users to have the option to turn automatic updates on and off. So that when activated, the data in the repository is updated every, lets say, 1 hour. And if turned off, the data will refresh only when the users open the app, and at least ..
Category : repository
EDIT: I NEED TO PASS A CONTEXT AS A PARAMETER TO THE CLASS (DataStore and repository is the same class, don’t get confused) I have two activities, A and B and one repository. Activity A opens activity B and activity B saves data in the repository(DataStore a part of android jetpack). I am using LiveData ..
I’m adding firebase to my mobile app. I’m wondering what I should include and ignore from my GitHub repository? I ignored everything from the Android.gitignore here: https://github.com/github/gitignore/ However firebase adds the following folder: Is there anything I should put in my repository from this folder? Thanks! Source: Android..
so I’ve been reading the last few days about clean architecture and I’ve decided to implement it on my project. The layers I’m using are, from outer layer to inner layer: Framework/UI Data/UseCases Domain As far as I know, with this approach I can have all of the Android stuff in the outer layer (framework/UI ..
I tried to create a registration using MVVM + Repository pattern with DI, and I used @ViewModelInject and everything was OK, but now @ViewModelInject is deprecated and I changed @ViewModelInject to @HiltViewModel + @Inject constructor() and faced with the error: [Dagger/MissingBinding] *.AuthRepository cannot be provided without an @Provides-annotated method. I tried to add a @Provides ..
I am creating a Room based language learning app. Here is how my Entity looks: @Entity(tableName = "word_table") public class WordEntity { @PrimaryKey(autoGenerate = true) private int id; private String word; private String translation; private String category; public WordEntity(String word, String translation, String category) { this.word = word; this.translation = translation; this.category = category; } ..
I’m developing an android app, and I need to save some images from url to the smartphone internal memory. Now in the repository I’m using file output stream and retrieving the uri with the Android FileProvider, with the application context, and store the as string in the Room Database. But this approach breaks the MVVM ..
I have a working Activity (TwalksRouteActivity) that accepts a record id (routeID) from a bundle (passed from a Fragment), pulls the associated record from my repository (routesRepository), and passes an associated value/column (routeName) to my UI. This works fine. However, as I understand best practice (I am learning Android development), the call to my Repository ..
I have one entity "drinks" which have [id;name;thumb] and I`m using these entities for 2 response calls. One response returns me a NonAlcohol list of drinks, another AlcoholList, I’m using Room for caching the data. But when I run the app, I saw that my lists merged, after some thought, I found a solution to ..
I’m working on a project where I need to connect to a server to get data and draw markers out of that data on a map, whenever the data changes, I need to update the map with the new positions. I’m using a Roomdatabase, Livedata to observe the changes and a service that connects to ..
Recent Comments