The method managedQuery(Uri, String[], String, String[], String) from the type Activity is deprecated

后端 未结 2 1163
深忆病人
深忆病人 2021-01-01 21:25

When I compile the following code

cursor = activity.managedQuery( imageUri, proj, null, null, null );

I get following warning

2条回答
  •  误落风尘
    2021-01-01 22:30

    The above answer is very apt. I just wanted to add to this thread more info as to why managedQuery is deprecated. Here is a nice explanation for why the managedQuery is replaced by getContentResovler().query()

提交回复
热议问题