I am using Clean Architecture in my project. Now I want to integrate a feature that asks the Facebook SDK to sign in.
Im my opinion, the Facebook SDK acts as a data provider (which provides an authentication service, similar to the other Restful login API) and should be configured and used in the module data
instead of the module app
. For example, if I want to log in to Facebook, I will choose the appropriate use case, then such a use case will call the module data
to do the actual work.
But the problem is with the Facebook method (see Facebook LoginManager, here ) to launch an Activity / Fragment instance.
So, should I move the Facebook SDK back to the module app
or pass an Activity instance to the storage
module?
I do not like their options. (felling is not happy, although it helps to resolve the demand). Anyone have a better approach? Thanks
source
share