IfiFW fin S iui

(4) ^BftContentProviderS-tWl^^WWl^^/yi, -A ft ill F0W:

• public boolean onCreate(), 3 ContentProvidcr ^/SflWMi$ffiilth'iko

• public Cursor query(Uri uri, String! ] projection, String selection,String! | selectionArgs, String sortOrder) , t Cursor »»ft»«»»«*.

• public Uri insert (Uri uri, Content Values initialValues), lit JjHifl -f tttii^ft^'I'ttA

Uri,

• public int delete (Uri uri. String where, String!] whereArgs). lit Jj wiMl^j'n^ Uri ifrlfrtKo

• public int update (Uri uri, Content Values values, String where,String!] whereArgs), lit JjiklA

• public String getType ( Uri uri )• jgUri (\'i MIME

(5) ft. AndroidManifest.xml SCf'l•,+,ifi/JN<provider>^^. Will. ft&l^'J H1 > ifcSlWiW^: < provider Android:name="DiaryContentProvider" Android:authorities "com.ex09 2 contentprovider. diarycontentprovider" />, K+ Android:name J^fJftfKlii ^ content provider Android: authorities content URI ftfi^J: "com.ex09 2_contentprovider. diarycontentprovider" o

Was this article helpful?

0 0

Post a comment