Can we please have a simple GET and POST added to the repo #549
danielwilson1702
started this conversation in
Ideas
Replies: 2 comments
-
+1 This is a more realistic case that developers need to handle. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Thanks for the suggestion. I can see how this would be useful. I will add it to our roadmap for consideration. In case it's useful, we recently added exception handling to the architecture samples app which demonstrates how you can show a an error message if an exception is thrown by the data layer. Relevant code: https://github.com/android/architecture-samples/blob/main/app/src/main/java/com/example/android/architecture/blueprints/todoapp/tasks/TasksViewModel.kt#L74 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
All data right now is fetched via SyncWorker and loaded via Room. The only error condition being a snackbar if the device is offline.
I think a far more common use case is to GET something while a screen is loaded (e.g. during a VMs init block) and POST something remotely when an action occurs (e.g. a user presses a button).
Using this repo I have no idea how to model those simple events with flows of data encapsulated in UI states. Could we add something, even with mocked data that simulates what 99% of apps need to do generally. It could show an error screen if the GET fails. These are things I am trying to achieve in my own app and struggling with.
Beta Was this translation helpful? Give feedback.
All reactions