Introduces Dagger Dependency Injection in the VoiceCommand module, for BaseAimybox class.
Also fixes #986
This PR does the following:
[x] Transforms the BaseAimybox instance into an application context
[x] Ensures singularity for Aimybox instance
[x] Removes BaseAimyboxViewModel, as we do not use Aimybox UI components
[x] Establishes Single Responsibility Principle by assigning dependency jobs to Dagger
[x] Ensures a less coupled system
Reasons:
Due to use of BaseAimyboxViewModel viz. essentially for Aimybox UI components, we differed from the default application scoped implementation of Aimybox, which also resulted in #986
As fundamentally, there should only be one running instance of Aimybox in an application, using Dagger Singleton Scope we ensure this.
BaseAimybox provides functionalities that are used by many other UI elements (Activities/ Fragments), this results in high coupling between classes, with Dagger we address this.
Introduces Dagger Dependency Injection in the VoiceCommand module, for BaseAimybox class.
Also fixes #986
This PR does the following:
BaseAimybox
instance into an application contextAimybox
instanceBaseAimyboxViewModel
, as we do not use Aimybox UI componentsReasons:
Due to use of
BaseAimyboxViewModel
viz. essentially for Aimybox UI components, we differed from the default application scoped implementation of Aimybox, which also resulted in #986As fundamentally, there should only be one running instance of Aimybox in an application, using Dagger Singleton Scope we ensure this.
BaseAimybox
provides functionalities that are used by many other UI elements (Activities/ Fragments), this results in high coupling between classes, with Dagger we address this.