How can getContentResolver() be called in Android?
<p>I want to know the context in which <code>getContentResolver()</code> is called?</p>

<p>I have a scenario like this:<br>
I have an activity A that calls a method <code>myFunc()</code> of class B which is not an activity.<br>
So, in class B I have to use <code>getContentResolver()</code>. I directly called <code>getContentResolver()</code>. It was showing error. Then I called <code>myFunc(Acitivy act)</code> from the activity and called  <code>act.getContentResolver()</code> which solved my problem. Is this the only way to call <code>getContentResolver()</code>, which means it can be used in context with activity or can be used alone.</p>
