Android - Select max in contentProvider

前端 未结 3 1880
滥情空心
滥情空心 2021-01-13 13:58

I try to run this query on my custom contentprovider.

cursor = activity.getContentResolver().query(
                GoalDescriptor.CONTENT_URI,
                     


        
3条回答
  •  情歌与酒
    2021-01-13 14:20

    In my case the answer of nEx actually worked, but I forgot to also add "max_"+COLUMN_NAME within the getColumnIndexByName() method of the cursor.

    After I figured out this had also to be changed, it finally worked!

提交回复
热议问题