当你插入一个新的项目进入这样一个数据库
When you insert a new item into a database like this
Uri uri = getContentResolver().insert(Tournaments.CONTENT_URI, values);
有没有什么办法让从返回的URI的ID,这样我就不必运行一个查询,以获得ID,因为它已经在返回的URI?
is there any way to get the id from the uri that is returned so I don't have to run a query to get the id since its already in the returned uri?
ContentUris.parseId()最后路径段转换为long。
ContentUris.parseId() converts the last path segment to a long.