Wiring up - Insert, Delete, Update: Android Data Persistence Tutorial - Part 14

preview_player
Показать описание
After impelling the query method in the previous video, in this video we continue with the implementation of custom content provider by implementing the insert, delete and update methods. We also take care to handle cases when a particular operation is not supported by using UnsupportedOperationException. In case of inner method implementation we make use of notifyDataChange to support Loader so that they can be notified about when data changes in the content provider.

Рекомендации по теме
Комментарии
Автор

One correction. In whereClause you can't use "id = ? name = ?". This is wrong and will produce error. The correct way to do so is "id = ? and name = ?".

CuiqkOfficial
Автор

I don't understand why you return the uri plus the path and the id of the row inserted for the insertToDo() method. Is that so the place making the request to save their data can get the ID of the row they just inserted? Would they have to parse that value out of the URI returned in that case?

BigLee
Автор

It would a lot better if you could provide a complete tutorial rather than these slides. But good job though.

rushidesai
join shbcf.ru