【单选题】创建自定义的一个内容提供者,其名为MyContentProvider,则其下哪个是正确定义。
A. public class MyContentProvider
B. public class MyContentProvider extends ContentProvider
C. public class MyContentProvider extends ContentResolver
D. public class MyContentProvider extends SqlOpenHelper
查看答案
【单选题】与已经注册的Uri进行匹配的语句是( )
A. int match = matcher.match(uri);
B. int match = matcher.matchUri(uri);
C. int match = matcher.Uri(uri);
D. int match = matcher.query(uri);
【多选题】以下哪个正确的将Uri注册到UriMatcher中( )
A. matcher.addURI(“edu.wfu.contentprovider", “bookInfo", 0);
B. matcher.addURI(“edu.wfu.contentprovider", “bookInfo/
C. ", 1);
D. matcher.register(“edu.wfu.contentprovider", “bookInfo", 0);
E. matcher.register(“edu.wfu.contentprovider", “bookInfo/*", 1);
【多选题】Uri为内容提供者中的数据建立了唯一标识符。它主要由以下哪几部分组成?( )
A. scheme
B. authorities
C. path
D. table
【多选题】内容提供者创建完成后,Android Studio会自动在AndroidManifest.xml中对内容提供者进行注册。以下哪些是其属性标签。( )
A. name
B. authorities
C. enabled
D. exported