• p

    psk

    9 months ago
    I am trying a vanilla MVI for my new project with channels and flow. I’ve used RxJava before and tried some frameworks like Mvrx, Grox. I have few questions I’d like to get answers for and see how this situations are handled. 1. Two ui intents are mapped to async calls but they should be emitted sequentially so that the UI updates are sequential. For example event A and B are emitted, async operation trigged by event B finishes before event A. But the state updates should be sequential right?  2. On-off async operations or side effects like uploading or downloading a pdf. This needs to only show a snackbar and there is no state preserved. 3. Suggestions for state loss problems or back pressure?
    p
    Ravi
    4 replies
    Copy to Clipboard
  • l

    Lilly

    9 months ago
    Hi, how would you name a class that acts as a single entry point to a library and is glue for multiple objetcs with different responsibilities. It's like a summary of multiple little APIs that form a greater API that is exposed to the client. My first thought was a
    Facade
    . Any ideas?
    l
    Daniel
    +1
    3 replies
    Copy to Clipboard
  • m

    mattinger

    9 months ago
    So i’m trying to use anvil to build a 3 layer application graph where different libraries can contribute. I plan on having a shared set of scopes: • ApplicationScope • ActivityScope • FragmentScope I can use ContributesTo to add inject methods to the scopes, but i’m curious what’s the best way to get hold of the actual instances, since the host app would be the one that would know about the actual factories. I was thinking of defining the components in the library as well, but not running the anvil compiler there and instead just running it in the host app.
    m
    u
    5 replies
    Copy to Clipboard
  • Nacho Ruiz Martin

    Nacho Ruiz Martin

    9 months ago
    Hey! 👋 Given a classic MVI approach with Jetpack’s
    ViewModel
    , how would you share some logic between different
    ViewModels
    ? I have a 1:1 relationship between screens and VM and the latest is in charge of any change to the state. So a lot of logic may be shared, for example the management of a textfield with value update, validation, error setting and such.
    Nacho Ruiz Martin
    Will Shelor
    +1
    3 replies
    Copy to Clipboard
  • m

    mattinger

    9 months ago
    I’m having a bit of an issue with compose (see pictures in thread). I have full page content with buttons anchored at the bottom. When i click in a text field, the keyboard is appearing and pushing the buttons up, which ends up shrinking the column the input text is in, and pushing into the scrollable area offscreen.
    m
    5 replies
    Copy to Clipboard
  • s

    Sergio C.

    9 months ago
    Using MVVM and clean code how should I create the connections to the ViewModel in the scenario where I need to have the Context to be able to show several Dialogs in a process when the user performs an action? Imagine the user clicks a button to create a document, in this process I need several inputs from the user, for that I need to pass the Context to show a dialog to select items, or choose yes, no or other options etc, creating a document has it’s business logic but the issue is it’s not a one shot operation where the user clicks and waits for the result, it’s a back and forth View to business logic. Passing the Context to the ViewModel it’s the easy way but I think is not a great idea and it should create memory leaks, creating an observer in the activity for every user interaction in the process of creating a document is going to be messy and confusing… Any other good options to solve this? Or a project sample with the same kind of logic?
    s
    marlonlom
    +2
    10 replies
    Copy to Clipboard
  • 이준학

    이준학

    8 months ago
    I am currently developing an android service app. A problem arose while developing a foreground service app. This is the situation when the activity gets data from the service. One way is to use a bind service and call a method from the service instance.
    Another way is to get data using intents.
    
    I've searched a lot, but almost all of them are using intents. If the lifecycle fits well, isn't it convenient and good to call a function as a bind service? I'd like to hear your opinion.
    (In the service, it does not actually work, but creates and manages a working thread.)
    이준학
    FunkyMuse
    3 replies
    Copy to Clipboard
  • Sanendak

    Sanendak

    8 months ago
    Hello everyone! I have a question about collecting data from multiple data sources into one list. I have two sources: remote and local. Models for these items almost the same except several fields. It's okay to merge them into one source for viewmodel? In that case new shared model will have several null fields. Or I should collect data separately and not merge models? In the list local items always placed first. Thanks.
    Sanendak
    Max Ferrier
    +3
    5 replies
    Copy to Clipboard
  • u

    ursus

    8 months ago
    Is it needed to sequentialize data sync? sync contains api get + db write. Db writes are synchronized. So only way this can get messed up if the 2nd concurrent sync arrived sooner than 1st Is this really relevant for production? Should I put Mutex everywhere?
    u
    gildor
    +1
    35 replies
    Copy to Clipboard
  • u

    ursus

    8 months ago
    How do you think the spotify year review story animations are made? giant lottie files per page?
    u
    1 replies
    Copy to Clipboard