Dependency Injection #2

Open
opened 2022-10-14 17:35:53 +00:00 by Lonami · 1 comment
Owner

Eventually, it would probably be a good idea to use some form of Dependency Injection for the API calls. This would enable us to mock them (for tests, or running the application without actually connecting to Telegram). The linked page mentions:

Hilt is Jetpack's recommended library for dependency injection in Android. Hilt defines a standard way to do DI in your application by providing containers for every Android class in your project and managing their lifecycles automatically for you.

Eventually, it would probably be a good idea to use some form of [Dependency Injection](https://developer.android.com/training/dependency-injection) for the API calls. This would enable us to mock them (for tests, or running the application without actually connecting to Telegram). The linked page mentions: > [Hilt](https://developer.android.com/training/dependency-injection/hilt-android) is Jetpack's recommended library for dependency injection in Android. Hilt defines a standard way to do DI in your application by providing containers for every Android class in your project and managing their lifecycles automatically for you.
Author
Owner

Also we probably want to call things Repository and not Source? Not sure which term is the accepted one.

Also we probably want to call things `Repository` and not `Source`? Not sure which term is the accepted one.
Sign in to join this conversation.
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Lonami/Talaria#2
No description provided.