How can getContentResolver() be called in Android?

前端 未结 8 1190
庸人自扰
庸人自扰 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:21
      //create activity object to get activity from Activity class for use to content resolver
        private final Activity ActivityObj;
    
      //create constructor with ActivityObj to get activity from Activity class
        public RecyclerViewAdapterClass(Activity activityObj) {
            this.ActivityObj = activityObj;
        }
    
    
         ActivityObj.getContentResolver(),.....,.....,null);
    
    0 讨论(0)
  • 2020-12-02 17:21

    Access contentResolver in Kotlin , inside activities, Object classes &... :

    Application().contentResolver
    
    0 讨论(0)
提交回复
热议问题