It's there any difference between use the context stored on this class and use and activity as context?
Yes. Please read Dave Smith's epic blog post on the subject. In summary: only use an Application
when you know why Application
is the right answer... and it rarely is.
It is a good practice to have this class
IMHO, not usually. You may sometimes need an Application
object, but you do not need your own custom subclass, and you do not need to make it a singleton.
should I provide an activity as context to any class who needs it?
You supply the right Context
instance to any method that needs it. As Dave Smith describes in that blog post, not all Context
instances are created equal. Only use Application
when Application
is the right sort of Context
.