How can getContentResolver() be called in Android?

前端 未结 8 1246
庸人自扰
庸人自扰 2020-12-02 16:58

I want to know the context in which getContentResolver() is called?

I have a scenario like this:
I have an activity A that calls a method myFu

8条回答
  •  孤城傲影
    2020-12-02 17:10

    A solution would be to get the ContentResolver from the context

    ContentResolver contentResolver = getContext().getContentResolver();
    

    Link to the documentation : ContentResolver

提交回复
热议问题