I like Clean architecture however something that has always troubled me is the access to Resource files across layers.
I know that layers other than the View layer shouldn't have references to anything related to Android SDK. But there are times where specific texts need to be managed and it becomes a headache the further the layer goes.
Specifically, I have the following scenario which made me uncertain on how to implement correctly:
When the screen is opened, a warning message should be presented. This warning message may be retrieved from a remote source according to a flag or taken from a local string if the flag is off.
As I understand, the presenter shouldn't mind the value of the flag and simply call UseCase.getWarningMessage(). Going deeper, the UseCase should probably only take the flag value and send it to the repository (I'm still not sure if the flag should be instead accessed directly in the Repository).
After that, the repository would check the flag and retrieve the remote message or simply take it from the local strings.
At this point, how could the repository take the Resource string? Should dependency be sent all the way to the Repository layer in case it needs access to resources? Should the presenter instead be the responsibility of managing the flag to know if warning messages should be retrieved remotely or locally?