The problem is Context
, pass context of your Activity
which use your Class
in it's Constructor :
Context context;
public ContactManager (Context context) {
this.context = context;
}
then use
context.getContentResolver()
absolutely perfect the use of context here.