Книга: Beginning Android

Step #2: Supply a Uri

Step #2: Supply a Uri

You also need to add a public static member… somewhere, containing the Uri for each collection your content provider supports. Typically this is a public static final Uri put on the content-provider class itself:

public static final Uri CONTENT_URI =
 Uri.parse("content://com.commonsware.android.tourit.Provider/tours");

You may wish to use the same namespace for the content Uri that you use for your Java classes, to reduce the chance of collision with others.

Оглавление книги


Генерация: 0.046. Запросов К БД/Cache: 0 / 0
поделиться
Вверх Вниз