I have a class that creates a bitmap object.
It needs access to a bitmap resource so it needs access to the context which I pass into its constructor so I call it like myClass(context)
Ideally i'd like to inject the dependency somehow. I wanted to do this with a factory so I could just ask the factory for the object and it creates it for me, but I can only get context from activity classes which create new windows. So it seems I'll have to keep passing in context from my main activity.
I asked a similar question recently and was told I shouldnt call context statically at all and should always be passing it around.
This means if I want to test this class my test class needs access to the android framework (which means I can't test locally and will have to use AndroidTests).
Is this how it is supposed to work? My class just needs a bitmap but I can't test locally now because of context.