Hello there! My name is Domenic and I am a passionate developer with a bunch of Android experience. Over the last 8 years I have found myself building apps for a variety of companies, spanning a range of industries, with varying team sizes. I have started this channel to give back to the community, start my passion for teaching, and provide a practical resource that I wish I had when first getting started.
Whether you are a seasoned vet or someone with no development experience, I'll provide a comprehensive overview of core components and everything you'll need to publish an app on your own! This channel will be entirely focused on Kotlin (the suggested programming language for Android apps) and will keep up to date on the latest Android news, trends, tools, and development practices. Compose coming soon - need to learn it better myself before trying to mentor others about it! xD
I think there is a log plugin that you can attach to the Ktor instance and set it to prettyPrint=true somewhere. Take a look at their docs and it should be pretty straightforward hopefully!
I been searching for months for a good channel that explain in great detail the topics for make me get started and learn android development and I found you!! I'll stick with your channel, thanks for sharing your knowledge.
Amazing!! I'm glad you found me :) the channel has plenty of content on it that evolves linearly in complexity, so feel free to checkout the playlists and watch them in order if you want to :) sharing the channel with anyone else that may find it helpful is always appreciated 🙌
@GCkk yeah it could be done by defining an interface in the library module that needs application context, and is implemented in the app module. I'd consider alternate ways of doing this as well though as a thought exercise, for instance: do you actually need the application context as opposed to another context? Is there a way you can restructure things so whatever needs the application context can be injected into the library as opposed to the library requiring the context itself? It may not be wrong what you're doing, but it may be easier if you try to solve the problem a different way. Just something to think about! Hope this helps
Hi I just started this season I am beginner. First episodes of this series is easy for me. But when you start MVVM and this video I got confused. It looks a little hard and I don't understand full of code. What should I do. I actually hate learning something new without practice. Everyday I want to do something myself then I think I should continue this series and I get stuck again
Understandable -- there's another series on the channel where I build a "digital clock" using LiveData and I think that might go you understand the concepts better. It is a shorter series and specific to how the architecture + tooling works, so maybe try some videos there
I'd say this series is a good thing to come back to when you learn new things so you can "put it all together" into an app. The digital clock series should help you understand how LiveData works in general and then this series is a more practical example of how to use the tool inside the MVVM architecture pattern
I have completed the playlist today. I must say you have covered most of the important aspects of a basic to intermediate-level project. Thanks a ton, mate. I look forward to more insightful videos in this playlist. One suggestion: please implement pagination in this project. ✨🙏
I appreciate your support and will make some more content to complete this app. Although, I already did make a video in this series about pagination - just our own custom implementation as opposed to using a library for it
Possibly. Mainly just showing off something you can do. To me it is a "version" so it does have a place in the file, but there could be an argument either way I suppose
I am beginner with android programming. First I learn basic and watch Season 1 from your channel. What do you prefer next I can watch season 3 or should I continue with this season
Well first off, welcome! Thanks for stopping by the channel :) I would recommend the older Rick and Morty season since that is a full app in XML and this is a full app in Jetpack Compose. All the code is available on GitHub for both seasons, but that other project may help explain some other concepts and is a little simpler than this one. We use dependency injection, a new networking library, and this project is multi-module which is a little advanced in my opinion for a beginner. Once you complete that season though, this one will be fun to watch as well since you'll be familiar with the data and other core concepts of Android development. I'd also recommend the "digital clock" season since that shows some good separation of concerns and LiveData concepts to send data around!
@@TheAndroidFactory Thank you for reply. This channel is really very good for beginners. You are hero. I have 1 more question. When I should stop watching tutorials and try to create simple projects by myself
I always try to reply! I'd say pulling the code down from GitHub might be a good start because you have something to learn from/reference and you can build off of it to make tweaks to something you want to try. You'll also have "plumbing" in the project already for making an API call or building a certain UI. But you'll learn really quickly what you know and don't know when you try something yourself! I wouldn't wait too long, but I would keep the projects simple to start so you can build momentum building something!
4:06 When PaddingValues is used in the LazyColumn, the padding works horizontally and at the start and end of the composable. This is why we are not able to see the padding while scrolling. However, when you reach the start or end of the list, you will be able to see the padding.
@@TheAndroidFactory im not saying that lightly, ive been searching for an explanation of how to create modules and manage them in a production level everywhere. none of them explain that simply, and google's documentation sucks.
More than happy to chat. I'm very much living in a wild multi-module architecture in production myself right now so it's absolutely real! I appreciate your support ❤️
Im first time seeing this like wrapping whole screen into a state ? is this actually better than regular screens ( dont know how to explain to you like most of tutorials and repository code i found) and inside that screen i call collectAsState from viewModel and then i add items from that state to list etc.. hope you can understand what i mean :D
I believe I understand. And the answer likely is: "it depends". When you have a screen that should react "as a whole" I like this pattern, but if you had a screen that held many different data points and ways for the user to interact, it may be better to separate them out. Then again, you could have all of those elements of state in a single data class that has everything you need, and at that point it would boil down to listening for N different pieces of state or having one piece of state that contains N elements. In most cases it may not matter which approach you go with, but sometimes this way or the way you're asking about is better for the use case. Good to be aware of all the options so you can make the best decision when the time comes! Hope that helps haha
@@TheAndroidFactory Im way less expirienced than you(2 years but 1 year work expirience with old old android 13y old code in that company, i started learning jetpack compose 1 year ago) so now i have one more thing to keep in mind i think i understand you a little because in my case i have a screen where ill have a list with some clients info and after i click on it i will have more of clients details so this is all about the screen i guess your way with state is great then ? and i actually wanted to implement some paginating (also custom i didnt want to rely on library i wanted to expand my understanding of android etc). And i managed to get to your video so im thinking to redo my whole screen , i managed to implement some pagination by having lastLoadedId variable in my repository then i gave it value lastLoadedClientId = clientList.last().clientId , so i have two functions one for initialLoading with limit of 7 and the other is loadMore with limit of 4 with .startAfter(lastLoadedClientId) ( im using firebase for this app) , so i made it work somehow and i didnt know if its a good way of doing(i think it is not thats why im trying to find some other solutions). Im talking too much haha , thank you for your response anyway :D
@@TheAndroidFactory if i understood good in my case this will be good since i also have screen with a list of clients( 3 fields displaying on a card) after i click im opening clients info screen where i can see more fields about him and a picture. i wanted to implement a custom pagination because i didnt want to rely on library , so i found you at the right time :D also i did some i think bad way of paginating and thats why i want to find more solutions private var lastLoadedClientId: String? = null in my repository than i have initialLoad fun where i limit 7 items to load and give the lastLoadedClientId = clientList.last().clientId and i have another function which will be called multiple times as long i have items to load loadMore with limit of 4 items and .startAfter(lastLoadedClientId) and giving also value lastLoadedClientId = clientList.last().clientId . Im using firebase , and from my ui i had some similar logic to your to detect when to call loadMore function . Hope i explained well to you :D thanks for any answers
if i understood good in my case this will be good since i also have screen with a list of clients( 3 fields displaying on a card) after i click im opening clients info screen where i can see more fields about him and a picture. i wanted to implement a custom pagination because, also i did some i think bad way of paginating and thats why i want to find more solutions private var lastLoadedClientId: String? = null in my repository than i have initialLoad fun where i limit 7 items to load and give the lastLoadedClientId = clientList.last().clientId and i have another function which will be called multiple times as long i have items to load loadMore with limit of 4 items and .startAfter(lastLoadedClientId) and giving also value lastLoadedClientId = clientList.last().clientId . Im using firebase , and from my ui i had some similar logic to your to detect when to call loadMore function . Hope i explained well to you :D thanks for any answers
Of course you can! It may be a weird way to use horizontal scroll; normally the content that scrolls there isn't infinite BUT there's nothing stopping you from doing it! It's functionally the same thing as vertical scroll pagination:)
@@TheAndroidFactory The entire screen is made with epoxy and the controller is implemented AsyncEpoxyController() how to make a horizontal paging list inside the same controller using carousel
hey I can't assign viewModel: CharacterDetailsViewModel = hiltViewModel() in detail screen , any ideas ? it says hiltViewModel is unresolved reference edit : No idea how it worked seems like newer navigation hilt dependency was problem.
@@TheAndroidFactory I was talking about clicking and linking with each sticky header. if you click season 4 header you'll be automatically scrolled to s4 episodes list in the lazycolumn
Hi Dom, I have a question I guess more about MVVM architecture. Specifically the repository pattern. My question is, do we want to be creating a new repository for each network call, like you do in this video? One for the characters by Id, and one for character repository? In my understanding, one repository is supposed to provide the data thats needed. I suppose you could separate repositories by data source (one for network, one for Room, say), but at the very least I think there should be a single repository per network API right?
Hey great question, but there are a handful of acceptable ways. Traditionally though, I like to "separate by path" of the endpoint. So if you had 5 API calls related to characters, and 3 for episodes, and 2 for something else, you would have 3 repositories that have 5, 3, 2 functions in them respectively. A character repository, an episode repository, etc. It makes your API calls easy to find and groups them appropriately!
@@TheAndroidFactory I suppose it makes sense. Seems like that would grow the code size, but I guess thats really only a problem with small projects. The real benefits would be in larger projects.
I wouldn't worry much about code size to be honest when it comes to something like this. It definitely helps readability and discoverability in the project which is very important as time goes on
Hey this is a great question, but no we want this DI module in the app module because we are using Hilt in the app to inject our networking "library" into the main module. If you had dependencies you needed to organize in the network module to make that function properly, you could use Hilt again in that module to map your dependencies. Does that make sense?
@@TheAndroidFactory I think so. So if I have a Repository in a data module that uses a KtorClient (that resides in the network module) I would make the NetworkModule (that provides the KtorClient) inside the data module, correct?
Yes, correct. You use the Hilt modules inside your modules that contain the code to either (1) map dependencies your module needs internally for itself to work or (2) fetch dependencies from "outside" your module that your code depends on to operate.
I think it is Alt + j on Windows and CTRL + g on Mac! Super useful shortcut once you get the hang of it. Copy and paste over multiple cursors works too which is satisfying 😎
Fantastic group UI you made. I'm trying to make my own google-calendar-app and so confused how to implement the group thing with sqlite statement. Now I'm back on my track
I am working on a very easy case and i am not able to understand what android propose for such simple think. I am using compose and viewmodel. I have two screens. First screen displays a list of email boxes for example. When user clicks the email box, a second screen opened. Now the viewmodel of the second screen will get all the emails assosiated with the selected email box. The problem is sending this id from previous screen to viewmodel state. I use navigation argumends but when i initilize the state of the viewmodel, i do not have this id at hand. Can you make a tuturial for a such case, there is need here. I am looking for statehandle but not sure yet and there not many examples descrbing this. Maybe i am missing something.
Yeah I would look to contain your state at some shared location, like a Singleton or at the Activity level or something and have both your ViewModels reference the same source of data. This series covers this concept quite well, so I hope it helps!
Thank you very much, the problem i am having is every one teaching something about android asumes that we know everything except the mentioned topic :) And google always changes things all the time, now i am struggling with dependencies. A tutorial about how gradle version catalog or in general dependency works, where to look to find things would be nice.
Wow, these last three videos just made things so much more complex! Im still following along, i think theyre clever solutions and i think im learning a lot following an experienced developer like yourself. The best way improve your own code is to read code by your betters, after all. Still not sure I'd be confident implementing this in my own apps, but handy to have a reference on how its done. Thanks a lot for sharing your knowledge, Dom, youre the best!
Hey thanks for the support and feedback! It can be daunting at first, but after you do it once or twice you'll get the hang of it! Also a lot of the newer content on the channel may be helpful too. Try looking at the series with the digit clock and MVVM pattern. It's an interesting display of the architecture that may help explain it another way :)
@@TheAndroidFactory Yes! I'm gonna try using this kind of pattern in my apps, as I said its nice to have a reference I can use. I'm planning on going through each season on your channel. Will take me months, but I'm learning a lot! I've already become a much better developer since just watching this and the last season
That's some dedication!! Haha thank you for everything and I hope you enjoy all the content. It gets progressively better as well because I became better at creating content along the way. Most of the code is available on GitHub too, so you should be able to download it quite easily :)