ºÝºÝߣ

ºÝºÝߣShare a Scribd company logo
Day
?8.
?(????
????)
? 
???
??????
????
????
???? 
? ????? ???? ???? ???? ?? ???! 
? LocalStorage? ???? ???? ?? ??? ??? 
? ?? ?? ??? ???? ???? ?? ???? 
? ????? ???? ???? ??? ????? ???
????? ??
?? Article? ???? ?? 
???? 
?? 
1. Homeview Activity? Resume? ? 
2. ActionBar? refresh??? ?? ?
?? APP ?? 
Server 
Activity 
database 
Proxy 
Dao
?? APP ?? 
Server 
Activity 
database 
Proxy 
Dao 
??? ?????
?? APP ?? 
Server 
Activity 
database 
Proxy 
Dao 
1. Proxy?? ??? ???.
?? APP ?? 
Server 
Activity 
database 
Proxy 
Dao 
2. Proxy? ???? ??? ???
?? APP ?? 
Server 
Activity 
database 
Proxy 
Dao 
3. ??? Proxy?? json???? 
????.
?? APP ?? 
Server 
Activity 
database 
Proxy 
Dao 
4. Proxy? Activity?? 
json???? ????.
?? APP ?? 
Server 
Activity 
database 
Proxy 
Dao 
5. Activity? Dao?? 
json???? ????.
?? APP ?? 
Server 
Activity 
database 
Proxy 
Dao 
5. Dao? json???? 
DB? ????.
?? ?? 
Proxy.getJson() 
Dao.insertJsonData() 
Homview.refreshData() 
1. Homeview Activity? onResume()?? 
2. ActionBar? refresh??? ?? ?
???? Refresh? ????? ???? ????? ???
Server 
Activity 
database 
Proxy 
Dao 
????? ???? ???? ? ????
section 1 
Service 
???????
???
???!
????? ????? ?????? ???? 
???? ? ? ?? ??????? 
??? ?????.
Android Service 
Service? ??????? ? ???? ?????? ??? ?? ???? 
???? ????? ???? ?? ????? ???? ?? 
?) ???? ??, ?? ??, I/O ?? ??, content provider? ???? ? ?? ?? ????? ??
Service? ??? ?? 
STARTED BOUND 
Activity?? Component?? 
startService() ???? ?? ???? 
Component?? bindService()???? 
?? ???? 
? ??????? ???? ??? ??? 
????? ???? ??? 
? caller?? ???? ???? ?? 
? ?? ??? ??? ???? ?? 
? Client - Serivce ????? ??(send 
request, get results, IPC) 
? Bind ???? ?? ???? ?? ?? 
??. Bind ???? ???? 0?? ? 
??? ???? ??
Service? ??? ?? 
STARTED BOUND 
Activity?? Component?? 
startService() ???? ?? ???? 
??? STARTED? ?? 
Component?? bindService()???? 
?? ???? 
? ??????? ???? ??? ??? 
????? ???? ??? 
? caller?? ???? ???? ?? 
? ?? ??? ??? ???? ?? 
? Client - Serivce ????? ??(send 
request, get results, IPC) 
? Bind ???? ?? ???? ?? ?? 
??. Bind ???? ???? 0?? ? 
??? ???? ??
Android Service ???? 
1. Service? ???? SyncDataService ???? ?? ?????. 
2. Service? ???? ?? AndroidManifest.xml? ??? ?????. 
3. Service? ?? ??? ???? ?????
Android Service LifeCycle
Service Class ?? 
? Service? ???? ??? SyncDataService? ?????.
Android Manifest ?? ?? 
?? ?? 
Service ???? ???? SyncDataService? ?? 
? Android?? Service? ???? ??? AndroidManifest.xml ??? ??? ???? ???. 
? application ?? ?? ??? ???.
????? ??? ?? 
SyncDataService?? ??? Override ???
????? ??? ?? 
SyncDataService?? ??? Override ??? 
? onCreate() : Service? ????? ? ??. 
? onDestroy() : Service? ????? ? ??. 
? onStartCommand() : ?? ?????? 
startService? ?? ????? ??.
????? ??? ?? 
SyncDataService?? ??? Override ??? 
? onCreate() : Service? ????? ? ??. 
? onDestroy() : Service? ????? ? ??. 
? onStartCommand() : ?? ?????? 
startService? ?? ????? ??. 
??? ? 3?? ???? ?????? ??? ????????.
Service? ?????(1) 
AndroidManifest.xml 
??? ???? ???? ?? intent-filter ??? ?????
Service? ?????(2) 
HomeView.java 
Service? ???? ??? ??? ?? ??? ?????? ???. 
ex) HomeView? onCreate()
Service? ?????(3) 
SyncDataService.java 
??? ???? ???? ??? ??? ???? ???.
Article? ????? ???? 
TimerTask ???? Timer ???? ??? ???? ??? ???? ??? ??? ????.
Article? ????? ????(1) 
Timer 
? ???? Timer(String name)? ???????.
Article? ????? ????(2) 
Timer? ??? 
¡­http://developer.android.com/reference/java/util/Timer.html 
? schedule ???? TimerTask (??? ??), ???? ??? ?, ??? ??? ?? 
??? ?????. 
? ? ???? schedule(TimerTask task, long delay, long period)? ???????.
Article? ????? ????(3) 
TimerTask 
Runnable? implements ?? ??? run() ???? ?? 
??? ????.
Article? ????? ????(3) 
TimerTask 
Runnable? implements ?? ??? run() ???? ?? 
??? ????. 
???? ??, ???? 3?? ???? ??? ??? ???.
Article? ????? ????(4) 
SyncDataService.java 
TimerTask? Timer ???? ??? ????? ???? ?????? ???. 
????? Log.i(TAGm ¡°Hello¡±); ? ????? ?????.
Service?? Article ???? 
??? ??? TimerTask class? run()? ???? Article? ??????.
Service?? Article ????(1) 
Service? Timer? ???? ???? ?????? ?? Article? ???? ??? 
????? ???. 
Proxy.getJson() 
Dao.insertJsonData() 
Article? ???? ???
Service?? Article ????(2) 
SyncDataService.java 
Proxy, Dao ???? ??? ?? ??? ?????.
Service?? Article ????(3) 
SyncDataService.java 
Proxy? Dao?? Application Context? ???? ?????. 
Proxy? Dao ??? ???? Application Context? ??? ???? ?????.
Service?? Article ????(3) 
SyncDataService.java 
Proxy.getJson() 
TimerTask? run() ??? ?? ? ??? ???. 
Dao.insertJsonD 
ata()
Server 
Activity 
database 
Proxy 
Dao 
Service 
Service? ????? ??? ????.
section 1 
Service 
???????
???
???! 
???
?? ????? ???? 
??? ? ?? ???? ?????? 
Service? ??? ?? ??? ???!
section 2 
Content Provider 
??
?????????
?
? 
?
???
????
?????
Activity 
Dao 
database 
???? ??? 
???? ???? ????
Activity 
Dao 
database 
???? ??? 
???? ???? ???? 
???? ?????? ??? 
???? ????? ????
Activity 
Dao 
database 
???? ??? 
???? ???? ???? 
???? ?????? ??? 
???? ????? ???? 
???? ????? 
???? ???? ????
Content Provider? ?? 
? ??? ??? ?? 
? Data? ??? ??, Data? ??? ?? ????? ?? 
? ? ?????? ???? ?? ????? ???? ?? ?? ?????
Content Provider 
Content Provider? ???? ?? ???? ???? 
(1). ContentProvider 
(2). ContentResolver 
(3). Cursor 
(4). Uri 
Database? ?? 
ContentProvider? ?? Application? ???? ?? ??? 
Resolver? ?? ??? ???? ?? 
???? ??? ? ?? ??? 
?????, DB.. ??
Content Provider 
?? ?? 
Application ContentResolver 
ContentProvider 
DataBase 
Application 
1 
URI 
Application? ??? Resolver?? ???? ??
Content Provider 
Application ContentResolver 
ContentProvider 
DataBase 
Application 
ContentResolver? URI? ??? ??????? 
ContentProvider? ?? ??? ?? 
2 
URI 
?? ??
Content Provider 
Application ContentResolver 
ContentProvider 
DataBase 
Application 
ContentProvider? Resolver? ??? ???? 
Database?? ?? 
3 
URI 
?? ??
Content Provider 
Application ContentResolver 
ContentProvider 
DataBase 
Application 
Cursor 
4 
ContentProvider? Resolver?? ???? ???? 
Resolver? ???? ??? Application?? Cursor ??? 
???? ?? 
?? ??
Content Provider ?? 
URI 
Application ContentResolver 
ContentProvider 
DataBase 
Application 
Cursor 
1. ContentResolver ??? Provider ??? ??? ???? ???. 
ContentResolver.query() ???? ContentProvider.query()? ???? ?? 
2. ContentResolver ??? Create, Retrieve, Update, Delete (CRUD)? ???
Content Provider ???? 
URI 
Application ContentResolver 
ContentProvider 
DataBase 
Application 
Cursor 
1. Application?? Content Resolver? ?????? 
ContentResolver? ?? ContentProvider? ??? ? ??? ??
Content Provider ???? 
URI 
Application ContentResolver 
ContentProvider 
DataBase 
Application 
Cursor 
2. Content Provider? ???? ?? 
Custom Content Provider? ??? ?? ??????? ?????? ??? ? ??? ??
ContentProvider? ????? 
ContentResolver? ???? ???? 
???? ???? ?? ???? ???? ????!
ContentResolver? ??? 
ContentProvider 
query() Provider? ?? ???? ???? ?? ?? (Cursor ??) 
insert() Provider? ?? ???? ???. (?? ??? row? URI? ??) 
update() Provider? ?? ???? ?????. (????? ??? ??? ??) 
delete() Provider? ?? ???? ???. (??? ??? ??? ??) 
¡­. (? ??? ?? ???? ??)
ContentResolver? ??? 
ContentProvider 
query() Provider? ?? ???? ???? ?? ?? (Cursor ??) 
insert() Provider? ?? ???? ???. (?? ??? row? URI? ??) 
update() Provider? ?? ???? ?????. (????? ??? ??? ? 
?) 
query()? ?? ?????? 
Content URI, Cursor ? ??? 
??? ??? ?? ???. 
delete() Provider? ?? ???? ???. (??? ??? ??? ??) 
¡­. (? ??? ?? ???? ??)
°Ù„²»ÈçÒ»ÒŠ 
???? ???? App? ??? 
Android ? ??? ???? ??? ???? ??? ? ?? 
Content Provider ? ?? ???? ????. 
??? ??? ? ??? Provider? ???? Resolver ? ??? 
1. Application?? Content Resolver? ?????? 
ContentResolver? ?? ContentProvider? ??? ? ??? ?? 
?? ???? ???????. 
??? Provider : http://developer.android.com/reference/android/provider/ContactsContract.Contacts.html
??? ???? ??
?? ??? 2?! 
1. Cursor getContactCursor () 
ContentResolver? ?? ??? Provider? ???? ??? ? 
??? Cursor? ???? ??? 
2. void printLogContactData (Cursor contactData) 
contentProvider? ?? Cursor??? ??? ???? Log? ???? ???
?? ??? 2?! 
1. Cursor getContactCursor () 
ContentResolver? ?? ??? Provider? ???? ??? ? 
??? Cursor? ???? ??? 
2. void printLogContactData (Cursor contactData) 
contentProvider? ?? Cursor??? ??? ???? Log? ???? ??? Cursor? ???
Cursor? ?????.
Cursor? ?????. 
d.android? ????.
Cursor? ?????. 
d.android? ????. 
(????) 
Database query? ?? ??? ??? ???? ???????..
Android ??? ??????.
[NEXT] ?? ???? ?? ????? ? ??? - ????? ???? ??? ??
[NEXT] ?? ???? ?? ????? ? ??? - ????? ???? ??? ??
[NEXT] ?? ???? ?? ????? ? ??? - ????? ???? ??? ??
[NEXT] ?? ???? ?? ????? ? ??? - ????? ???? ??? ??
Cursor? ?????? 
Application 
DB? ???? ???! (query) DB
Cursor? ?????? 
Application 
DB 
Data 
?. ???!
Cursor? ?????? 
DB 
Data 
Application 
???? ?? ?????
Cursor? ?????? 
DB 
Application 
Cursor 
Data 
Cursor ??? ?? 
???? ???? 
Cursor? ?? ? ??? ?? : http://developer.android.com/reference/android/database/Cursor.html
Manifest??? ?? ??
getContactCursor ??(1) 
ContentResolver? ?? ??? Provider? ???? ??? ?, ??? Cursor? ???? ??? 
??? ?????. 
Mac?? : command + shift + o ? ?? Import?? ?? ???? Import
getContactCursor ??(2) 
ContentResolver? ?? ??? Provider? ???? ??? ?, ??? Cursor? ???? ??? 
Uri contactURI ? Provider? ???? ???? ?? URI ???. 
ContactsContract.Contacts.CONTENT_URI ? ??? ?? ???? ??? ?????.
getContactCursor ??(3) 
ContentResolver? ?? ??? Provider? ???? ??? ?, ??? Cursor? ???? ??? 
¡ª¡ª¡ª¡ª¡ª 
??? ??? ?? 
Projection ? Provider? ?? ???? ?? ??? ?????.
getContactCursor ??(4) 
ContentResolver? ?? ??? Provider? ???? ??? ?, ??? Cursor? ???? ??? 
getContentResolver() ? ?? Resolver ??? ??? ? 
query() ???? ?????.
getContactCursor ??(4) 
ContentResolver? ?? ??? Provider? ???? ??? ?, ??? Cursor? ???? ??? 
getContentResolver() ? ?? Resolver ??? ??? ? 
query() ???? ?????. 
SQL query ? ???? ? ? ??? ???????.
getContactCursor ??(4) 
ContentResolver? ?? ??? Provider? ???? ??? ?, ??? Cursor? ???? ??? 
query() ??? SELECT ?? 
Uri FROM table_name Uri ? provider? ???? ???? ?? 
projection col, col, col, ¡­ ???? ??? col? ????. 
selection 
WHERE col = value 
WHERE ?? ?? ??? ????. 
??? ? ?? ?? 
selectionArgs selection? ?? ???? ?? ???? 
sortOrder Order By col, col¡­ sortOrder ? ??? Cursor? ???? 
???
getContactCursor ??(5) 
ContentResolver? ?? ??? Provider? ???? ??? ?, ??? Cursor? ???? ??? 
null? ?? ?? ?? 
.query(contactURI, projection, null, null, Contacts.DISPLAY_NAME+¡± asc¡±); 
SELECT _ID, display_name FROM contacts ORDER BY display_name ASC;
?? ??? 2?! 
1. Cursor getContactCursor () 
ContentResolver? ?? ??? Provider? ???? ??? ? 
??? Cursor? ???? ??? 
2. void printLogContactData (Cursor contactData) 
contentProvider? ?? Cursor??? ??? ???? Log? ???? ???
printLogContactData ??(1) 
contentProvider? ?? Cursor??? ??? ???? Log? ???? ??? 
id? displayName? ??? ??? ??? ??? ?????.
printLogContactData ??(1) 
contentProvider? ?? Cursor??? ??? ???? Log? ???? ??? 
null? ?? ?? ?? 
Cursor? null? ?? ??? ??? ?????.
printLogContactData ??(1) 
contentProvider? ?? Cursor??? ??? ???? Log? ???? ??? 
Cursor? getCount() ???? ??? ??? ???? 
???? ??? 0?? ??? ??? ???.
printLogContactData ??(1) 
contentProvider? ?? Cursor??? ??? ???? Log? ???? ??? 
1. idIndex? displayNameIndex? ?? ????. 
2. ??? ??? ?????. 
??? ??? ??? ??? ??? ??? ???.
printLogContactData ??(1) 
contentProvider? ?? Cursor??? ??? ???? Log? ???? ??? 
getColumnIndex()? ?? id? displayName? ???? ????.
printLogContactData ??(1) 
contentProvider? ?? Cursor??? ??? ???? Log? ???? ??? 
moveToNext() ???? ?? ???? ????? ???.
printLogContactData ??(1) 
contentProvider? ?? Cursor??? ??? ???? Log? ???? ??? 
getLong(), getString() ???? ?? Cursor??? ???? ?????.
?? 
?????? ?? ??? ??? ?????.
1. Cursor getContactCursor () 
2. void printLogContactData (Cursor contactData) 
???? ??? ???? 
1. Application?? Content Resolver? ?????? 
ContentResolver? ?? ContentProvider? ??? ? ??? ?? 
? ??????
Content Provider ??? ?? 
Custom Content Provider? ??? ?? ??????? ?????? ??? ? ??? ??
Content Provider? ??? ?? 
? Content Provider? ?? ???? ????? 
??? ?? 
1. ?? ???????? ??? ???, file? ???? ????. 
2. ???? ??? ??? ?? ??? ??? ???? ???? ????. 
3. Search Framework? ???? custom search? ???? ????. 
? ?? ???? Provider? ???? ?? ??? ?? 
Calendar, Contacts ?? ?? ???? Provider?? ????
Content Provider ??? ?? 
? NextgramProvider? ???. 
? Dao? ???? 
? Contract Class ??? 
? Content Provider ??????
? Dao? ???? 
?? ?? Dao.java? ??? ProviderDao.java? ????.
? Dao? ???? 
?????? ?????? ??? ??? ?????.
? Dao? ???? 
? ?? NEXTGRAM? DAO???? ??? DAO??? ??? 
???! 
1. Database? ???? ??, ???? Mashaling, Unmashaling?? ?? 
? ???? ??? ??? ??? ??.
???! 
Database? ?? 
json??? ??? 
??¡­. 
?? ???????. 
? Dao? ???? 
Dao.java 
ProviderDao.java 
NextgramProvider.java
? Dao? ???? 
NextgramProvider?? ??? ??? ???? ?????.
? Dao? ???? 
? Content Provider? ??????. 
? unimplemented methods? 
????? ??? 
onCreate 
query 
getType 
insert 
delete 
update
? Dao? ???? 
NextgramProvider ?? ??? ??? ProviderDao??? ??????. 
Database? ???? ?? 
? sqLiteInitialize 
? tableCreate 
? isTableExist 
NextgramProvider.java
? Dao? ???? 
NextgramProvider.java 
NextgramProvider ?? ??? ??? ??? ???.
? Dao? ???? 
NextgramProvider.java 
NextgramProvider? onCreate? ?????.
? Contract Class ??? 
? Contract class? Content Provider?? ??? ???? ????? ??????. 
? ??? ???????? Provider? ???? ?? ??? ??? ???? ????. 
??? Provider? Contract class ?? ??
? Contract Class ??? 
NextgramContract ?? public final class ? ??? ???
? Contract Class ??? 
NextgramContract.java 
NextgramContract ? AUTHORITY, CONTENT_URI? ?? ??? ?????.
??! 
Content URI, Authority?!
Content URI? ????? 
? Content URI? provider?? ???? ???? URI??. 
? Provider? ??? ???? Authority? ????? ??? ???? 
Path? ???? ??. 
Content URI 
Authority + Path
Content URI? ????? 
Authority? ?? ?????? ??? ??? ?? ¡°Android ??? ?? + ???¡± ? ???? 
Content URI 
Authority + Path 
org.nhnnext.nextgram.provider/table1 
?? :
Content URI? ????? 
Content URI ?? 
content://org.nhnnext.nextgram.provider/table1 
content://org.nhnnext.nextgram.provider/table2/dataset1 
content://org.nhnnext.nextgram.provider/table2/dataset2 
content://org.nhnnext.nextgram.provider/table3 
table1? ??. 
dataset1?? ??? table? ?? 
dataset2? ??? table? ?? 
table3? ???. 
URI? ?? ???? ?? 
URI? ?? ? ?? ?? 
content://org.nhnnext.nextgram.provider/table1/1 table1? ??. 
??? URI : content://authority/path 
? ?? URI : content://authority/path/id 
#? ?? ??? ?? 
*? ?? ??, ??? ??
? Contract Class ??? 
NextgramContract.java 
Inner class? BaseColumns? ???? Articles ???? ?????.
? Contract Class ??? 
NextgramContract.java 
???? ????? _ID, TITLE, WRITER, ID, CONTENT, WRITER_DATE, IMAGE_NAME? 
???? ??? ?????.
? Contract Class ??? 
NextgramContract.java 
Articles ???? ???? ???? CONTENT_URI? ?????.
? Contract Class ??? 
NextgramContract.java 
PROJECTION_ALL? ?? ??? ??? ???.
? Contract Class ??? 
NextgramContract.java 
???? ??? _ID? ???? ??? ???.
? Contract Class ??? 
??? ???? Contract Class? Provider? ???? ?? API?? 
???? ????. 
???? NextgramProvider? 
onCreate 
query 
getType 
insert 
delete 
update
? Contract Class ??? 
??? ???? Contract Class? Provider? ???? ?? API?? 
???? ????. 
???? NextgramProvider? 
onCreate 
query 
getType 
insert 
delete 
update 
MIME TYPE? ???? ??. 
?? ??? ?? 
?? ??? ??
? Contract Class ??? 
??? ???? Contract Class? Provider? ???? ?? API?? 
???? ????. 
???? NextgramProvider? 
onCreate 
query 
insert 
? ???????.
? Content Provider ?????? 
Android Manifest ???? 
manifest ?? ?? ???? 
Provider? ????? ???.
? Content Provider ?????? 
NextgramProvider.java 
query, insert?? ??? URI??? ??? Uri Matcher ??? ?????.
? Content Provider ?????? 
NextgramContract.java 
Resolver? ?? ??? ???? 
¡°org.nhnnext.nextgram.provider/Articles¡±? 1 (ARTICLE_LIST) ?? 
¡°org.nhnnext.nextgram.provider/Articles/#¡±? 2 (ARTICLE_ID) ??
? Content Provider ?????? 
???? insert? ???????.
? Content Provider ?????? 
???? ContentValues? ?????. 
??? ??? ????! 
NextgramProvider.java
? Content Provider ?????? 
NextgramProvider.java
? Content Provider ?????? 
NextgramProvider.java
? Content Provider ?????? 
NextgramProvider.java
? Content Provider ?????? 
insert? ??? ?????? query? ???????.
? Content Provider ?????? 
NextgramProvider.java 
Uri uri ??? ?? ??? ??? ???? ?????.
? Content Provider ?????? 
NextgramProvider.java 
URI? ¡°org.nhnnext.nextgram.provider¡± ?? 
URI_MATCHER? match()? ARTICLE_LIST(1)? ?????.
? Content Provider ?????? 
NextgramProvider.java 
NextgramContract.java 
sortOrder?? ??? _ID? ???? ?????.
? Content Provider ?????? 
NextgramProvider.java 
ARTICLE_ID ? ??? ??? ???? ????? ??? ?????.
? Content Provider ?????? 
ARTICLE_LIST, ARTICLE_ID ? ??? Uri? ?? ??? ??? ? 
Database? Query? ?????.
? Content Provider ?????? 
NextgramProvider.java 
??? ??!
? Content Provider ?????? 
NextgramProvider.java 
database.query? ?? 
Table, projection, selection, selectionArgs, sortOrder? ???? 
query? ????.
? Content Provider ?????? 
NextgramProvider.java 
??? cursor? return ??? ??!
? Content Provider ?????? 
NextgramProvider.java? insert, query? ?? ??? 
ProviderDao.java? ????? ?????.
? Content Provider ?????? 
ProviderDao.java? 
? sqLiteInitialize 
? tableCreate 
? isTableExist 
???? ??? ???. 
Database? ?? ?????? NextgramProvider? ?????.
? Content Provider ?????? 
ProviderDao.java? 
? insertJsonData 
? getArticleList 
? getArticle 
insert 
???? ??? ???. 
query
? Content Provider ?????? 
1. insertJsonData ??
? Content Provider ?????? 
?? Dao.java??? database? ?? insert?? ??? 
??? ??? ?? ?? ??? ??? ??????. 
??? ContentResolver? ???? database? ?? ??? 
? ???? ?? ??? ContentValues? ?? ???? ???.
? Content Provider ?????? 
ContentValues 
?? ???? 
??? ????
? Content Provider ?????? 
(??) Dao.java - insertJsonData ??? 
(insert ??? ??? database? ??) 
Database? ?? ???? ??? 
Resolver? ?? Provider? ????? ?????
? Content Provider ?????? 
(??) ProviderDao.java - insertJsonData ??? 
(? ??? ??? ContentValues? ??? values? ?? ??) 
Database? ?? ???? ??? 
Resolver? ?? Provider? ????? ?????
? Content Provider ?????? 
2. getArticleList ??
? Content Provider ?????? 
ProviderDao.java Dao.java 
getArticleList ??? ?? ?? ??
? Content Provider ?????? 
Dao.java 
ProviderDao.java
? Content Provider ?????? 
ProviderDao.java 
Dao.java
? Content Provider ?????? 
2. getArticleByArticleNumber ??
? Content Provider ?????? 
ProviderDao.java Dao.java 
getArticleByArticleNumber ??? ?? ?? ??
? Content Provider ?????? 
Dao.java 
ProviderDao.java
section 2 
Content Provider 
??
?????????
?
? 
?
???
????
????? 
???
Server 
??? ?? ?? 
Activity 
ProviderDao 
database 
Proxy 
Service 
Content Provider? ?? DB? ??? 
? ?? ????. 
Content Provider
Activity 
Dao 
database 
???? ??? 
???? ???? ???? 
???? ?????? ??? 
???? ????? ???? 
???? ????? 
???? ???? ????
Activity 
Dao 
database 
???? ??? 
???? ???? ???? 
???? ?????? ??? 
???? ????? ???? 
???? ????? 
???? ???? ????
Activity 
Dao 
database 
???? ??? 
???? ???? ???? 
???? ?????? ??? 
???? ????? ???? 
???? ????? 
???? ???? ????
Activity 
Dao 
database 
???? ??? 
???? ???? ???? 
???? ?????? ??? 
???? ????? ???? 
???? ????? 
???? ???? ????
???? ?????? ??? 
???? ????? ????
section 3 
Cursor Adapter 
????
?????
????
?????
?
? 
??????
???? ?????? ??? 
???? ????? ???? 
HomeViewAdapter? CursorAdpater? ????
HomeView ?? 
HomView.java 
Cursor Adapter? ???? ?????? ??? ??? ????. 
?? ????? ??? ?????? ???.
HomeView ?? 
HomView.java 
?? ??? onCreate? ??? ??? ?????? ???. 
??, listViewSimple1()? ???? ???.
HomeView ?? 
HomView.java 
CursorAdapter? ???? ?? ??? ?????. 
HomeViewAdapter? context, cursor, layout ??? ??? ????.
CursorAdapter? ??? ?? HomeView? ??? ???? 
ArrayAdapter? ???? HomeViewAdapter? ????? ???.
CursorAdapter ?? 
CursorAdapter.java 
CursorAdapter? ????? ?????.
CursorAdapter ?? 
CursorAdapter.java 
1. Context, Cursor, XML layoutID? ??? ???? ?????. 
2. LayoutInflater? ?? ?????? ???.
CursorAdapter ?? 
CursorAdapter.java 
CursorAdapter? ????? newView, bindView? ???????. 
? ?? ??? getView? ??? ??? ? ????. 
getView ???? ???????
newView, bindView 
newView? ?? view? ???? ?????. 
bindView? ?? ?? ??????? ?????.
newView, bindView? ???? ??!
ViewHolder Pattern 
??? HomeViewAdapter.java? getView() 
Adapter? ?????? findViewById()? ??? ??? ?????? 
?? ?? ViewHolder Pattern? ????? ?????. 
View??? ????? ?? ??
CursorAdapter ?? 
CursorAdapter.java 
CursorAdapter.java?? ViewHolderItem ???? ?????. 
???????? ????? ?????.
CursorAdapter ?? 
CursorAdapter.java 
xml????? inflate? View? ??? ???. 
??? ?? ??? ????.
CursorAdapter ?? 
CursorAdapter.java 
ViewHolderItem ??? ?????.

More Related Content

What's hot (19)

????? ???? ??? ??
????? ???? ??? ??  ????? ???? ??? ??
????? ???? ??? ??
YoungSu Son
?
???? ??? ?? ????? ?????
???? ??? ?? ????? ????????? ??? ?? ????? ?????
???? ??? ?? ????? ?????
Sungju Jin
?
5-5. html5 connectivity
5-5. html5 connectivity5-5. html5 connectivity
5-5. html5 connectivity
JinKyoungHeo
?
React ???? 2??
React ???? 2??React ???? 2??
React ???? 2??
?? ?
?
4-3. jquery
4-3. jquery4-3. jquery
4-3. jquery
JinKyoungHeo
?
????? ???? ?? - 0.1
????? ???? ?? - 0.1????? ???? ?? - 0.1
????? ???? ?? - 0.1
YoungSu Son
?
React Native? ???? ??? ???? ? ??
React Native? ???? ??? ???? ? ??React Native? ???? ??? ???? ? ??
React Native? ???? ??? ???? ? ??
Taegon Kim
?
??? 3.0 RESTful & restTemplate
??? 3.0  RESTful & restTemplate??? 3.0  RESTful & restTemplate
??? 3.0 RESTful & restTemplate
isyoon
?
[Hello world ?????]open api client??
[Hello world ?????]open api client??[Hello world ?????]open api client??
[Hello world ?????]open api client??
NAVER D2
?
ReactJS | ??? ??????? ??? ????
ReactJS | ??? ??????? ??? ????ReactJS | ??? ??????? ??? ????
ReactJS | ??? ??????? ??? ????
Taegon Kim
?
Json view ?? ??
Json view ?? ??Json view ?? ??
Json view ?? ??
Hyung Eun Jin
?
Meteor2015 codelab
Meteor2015 codelab Meteor2015 codelab
Meteor2015 codelab
WebFrameworks
?
[115] clean fe development_???????
[115] clean fe development_???????[115] clean fe development_???????
[115] clean fe development_???????
NAVER D2
?
GDG DevFest 2017 Seoul ????? ?? ????? ??? ????
 GDG DevFest 2017 Seoul ????? ?? ????? ??? ???? GDG DevFest 2017 Seoul ????? ?? ????? ??? ????
GDG DevFest 2017 Seoul ????? ?? ????? ??? ????
Kenneth Ceyer
?
[KGIT_EWD]class03 0322
[KGIT_EWD]class03 0322[KGIT_EWD]class03 0322
[KGIT_EWD]class03 0322
jylee6977
?
Spring boot DI
Spring boot DISpring boot DI
Spring boot DI
Hyosang Hong
?
F3 ?????api??????
F3 ?????api??????F3 ?????api??????
F3 ?????api??????
NAVER D2
?
Jurano?? lec1. AndroidAnnotations ????
Jurano?? lec1. AndroidAnnotations ????Jurano?? lec1. AndroidAnnotations ????
Jurano?? lec1. AndroidAnnotations ????
Ju-ri Seo
?
[Codelab 2017] ReactJS ??
[Codelab 2017] ReactJS ??[Codelab 2017] ReactJS ??
[Codelab 2017] ReactJS ??
??? ???
?
???? ??? ?? ????? ?????
???? ??? ?? ????? ????????? ??? ?? ????? ?????
???? ??? ?? ????? ?????
Sungju Jin
?
5-5. html5 connectivity
5-5. html5 connectivity5-5. html5 connectivity
5-5. html5 connectivity
JinKyoungHeo
?
React ???? 2??
React ???? 2??React ???? 2??
React ???? 2??
?? ?
?
????? ???? ?? - 0.1
????? ???? ?? - 0.1????? ???? ?? - 0.1
????? ???? ?? - 0.1
YoungSu Son
?
React Native? ???? ??? ???? ? ??
React Native? ???? ??? ???? ? ??React Native? ???? ??? ???? ? ??
React Native? ???? ??? ???? ? ??
Taegon Kim
?
??? 3.0 RESTful & restTemplate
??? 3.0  RESTful & restTemplate??? 3.0  RESTful & restTemplate
??? 3.0 RESTful & restTemplate
isyoon
?
[Hello world ?????]open api client??
[Hello world ?????]open api client??[Hello world ?????]open api client??
[Hello world ?????]open api client??
NAVER D2
?
ReactJS | ??? ??????? ??? ????
ReactJS | ??? ??????? ??? ????ReactJS | ??? ??????? ??? ????
ReactJS | ??? ??????? ??? ????
Taegon Kim
?
[115] clean fe development_???????
[115] clean fe development_???????[115] clean fe development_???????
[115] clean fe development_???????
NAVER D2
?
GDG DevFest 2017 Seoul ????? ?? ????? ??? ????
 GDG DevFest 2017 Seoul ????? ?? ????? ??? ???? GDG DevFest 2017 Seoul ????? ?? ????? ??? ????
GDG DevFest 2017 Seoul ????? ?? ????? ??? ????
Kenneth Ceyer
?
[KGIT_EWD]class03 0322
[KGIT_EWD]class03 0322[KGIT_EWD]class03 0322
[KGIT_EWD]class03 0322
jylee6977
?
F3 ?????api??????
F3 ?????api??????F3 ?????api??????
F3 ?????api??????
NAVER D2
?
Jurano?? lec1. AndroidAnnotations ????
Jurano?? lec1. AndroidAnnotations ????Jurano?? lec1. AndroidAnnotations ????
Jurano?? lec1. AndroidAnnotations ????
Ju-ri Seo
?
[Codelab 2017] ReactJS ??
[Codelab 2017] ReactJS ??[Codelab 2017] ReactJS ??
[Codelab 2017] ReactJS ??
??? ???
?

Viewers also liked (8)

???? Jedis ???? ?? (redis java ?????)
???? Jedis ???? ?? (redis java ?????) ???? Jedis ???? ?? (redis java ?????)
???? Jedis ???? ?? (redis java ?????)
YoungSu Son
?
??????????? ???? ?????????????? ?????? 2
??????????? ???? ?????????????? ?????? 2??????????? ???? ?????????????? ?????? 2
??????????? ???? ?????????????? ?????? 2
YoungSu Son
?
[NEXT] Android ?? ?? ???? 5?? (Actionbar, SideNavigation)
[NEXT] Android ?? ?? ???? 5?? (Actionbar, SideNavigation)[NEXT] Android ?? ?? ???? 5?? (Actionbar, SideNavigation)
[NEXT] Android ?? ?? ???? 5?? (Actionbar, SideNavigation)
YoungSu Son
?
[NEXT] Flask ? Restful API ?? ???
[NEXT] Flask ? Restful API ?? ??? [NEXT] Flask ? Restful API ?? ???
[NEXT] Flask ? Restful API ?? ???
YoungSu Son
?
[NEXT] Android Profiler ???
[NEXT] Android Profiler ??? [NEXT] Android Profiler ???
[NEXT] Android Profiler ???
YoungSu Son
?
FullStack ??? ??? ?? ?? (Android + MEAN Stack + Redis ???)
FullStack ??? ??? ?? ??  (Android + MEAN Stack + Redis ???) FullStack ??? ??? ?? ??  (Android + MEAN Stack + Redis ???)
FullStack ??? ??? ?? ?? (Android + MEAN Stack + Redis ???)
YoungSu Son
?
[NEXT] Android ?? ?? ???? 4?? (Networking)
[NEXT] Android ?? ?? ???? 4?? (Networking)[NEXT] Android ?? ?? ???? 4?? (Networking)
[NEXT] Android ?? ?? ???? 4?? (Networking)
YoungSu Son
?
SW ???? ????
SW ???? ???? SW ???? ????
SW ???? ????
YoungSu Son
?
???? Jedis ???? ?? (redis java ?????)
???? Jedis ???? ?? (redis java ?????) ???? Jedis ???? ?? (redis java ?????)
???? Jedis ???? ?? (redis java ?????)
YoungSu Son
?
??????????? ???? ?????????????? ?????? 2
??????????? ???? ?????????????? ?????? 2??????????? ???? ?????????????? ?????? 2
??????????? ???? ?????????????? ?????? 2
YoungSu Son
?
[NEXT] Android ?? ?? ???? 5?? (Actionbar, SideNavigation)
[NEXT] Android ?? ?? ???? 5?? (Actionbar, SideNavigation)[NEXT] Android ?? ?? ???? 5?? (Actionbar, SideNavigation)
[NEXT] Android ?? ?? ???? 5?? (Actionbar, SideNavigation)
YoungSu Son
?
[NEXT] Flask ? Restful API ?? ???
[NEXT] Flask ? Restful API ?? ??? [NEXT] Flask ? Restful API ?? ???
[NEXT] Flask ? Restful API ?? ???
YoungSu Son
?
[NEXT] Android Profiler ???
[NEXT] Android Profiler ??? [NEXT] Android Profiler ???
[NEXT] Android Profiler ???
YoungSu Son
?
FullStack ??? ??? ?? ?? (Android + MEAN Stack + Redis ???)
FullStack ??? ??? ?? ??  (Android + MEAN Stack + Redis ???) FullStack ??? ??? ?? ??  (Android + MEAN Stack + Redis ???)
FullStack ??? ??? ?? ?? (Android + MEAN Stack + Redis ???)
YoungSu Son
?
[NEXT] Android ?? ?? ???? 4?? (Networking)
[NEXT] Android ?? ?? ???? 4?? (Networking)[NEXT] Android ?? ?? ???? 4?? (Networking)
[NEXT] Android ?? ?? ???? 4?? (Networking)
YoungSu Son
?

Similar to [NEXT] ?? ???? ?? ????? ? ??? - ????? ???? ??? ?? (20)

2023.06.12 ????? ???? : JPA / ??? ??
2023.06.12 ????? ???? : JPA / ??? ??2023.06.12 ????? ???? : JPA / ??? ??
2023.06.12 ????? ???? : JPA / ??? ??
HONG YONG JUN
?
Spring portfolio2
Spring portfolio2Spring portfolio2
Spring portfolio2
ssuser25d7ff
?
React native development
React native developmentReact native development
React native development
SangSun Park
?
[Td 2015]?? ?? ?? ?? ???? ???? ??? azure ? ???(???)
[Td 2015]?? ?? ?? ?? ???? ???? ??? azure ? ???(???)[Td 2015]?? ?? ?? ?? ???? ???? ??? azure ? ???(???)
[Td 2015]?? ?? ?? ?? ???? ???? ??? azure ? ???(???)
Sang Don Kim
?
Java rmi ?? ???
Java rmi ?? ???Java rmi ?? ???
Java rmi ?? ???
?? ?
?
Mirantis open stack deployment automation
Mirantis open stack deployment automationMirantis open stack deployment automation
Mirantis open stack deployment automation
WooKyun Jeon
?
????? OAuth 1.0a, 2.0 ?? - Naver, Google API
????? OAuth 1.0a, 2.0 ?? - Naver, Google API ????? OAuth 1.0a, 2.0 ?? - Naver, Google API
????? OAuth 1.0a, 2.0 ?? - Naver, Google API
Gosu Ok
?
Androidpn guide-0.5.0-ko
Androidpn guide-0.5.0-koAndroidpn guide-0.5.0-ko
Androidpn guide-0.5.0-ko
sandeepreddyp42
?
AWS DevDay ?? ??? - Rekognition ?? Twitter?
AWS DevDay ?? ??? - Rekognition ?? Twitter?AWS DevDay ?? ??? - Rekognition ?? Twitter?
AWS DevDay ?? ??? - Rekognition ?? Twitter?
Amazon Web Services Korea
?
Spring integration??? ?????_????????_???????_????
Spring integration??? ?????_????????_???????_????Spring integration??? ?????_????????_???????_????
Spring integration??? ?????_????????_???????_????
Wangeun Lee
?
Google Firebase? ???? ???? - IO Extended 2016
Google Firebase? ???? ???? - IO Extended 2016Google Firebase? ???? ???? - IO Extended 2016
Google Firebase? ???? ???? - IO Extended 2016
Chiung Choi
?
???????? ?? AWS ???? ?? ? ?? ?? - AWS Summit Seoul 2017
???????? ?? AWS ???? ?? ? ?? ?? - AWS Summit Seoul 2017???????? ?? AWS ???? ?? ? ?? ?? - AWS Summit Seoul 2017
???????? ?? AWS ???? ?? ? ?? ?? - AWS Summit Seoul 2017
Amazon Web Services Korea
?
???? ?? (AWS) ???? ?? ??
???? ?? (AWS) ???? ?? ?? ???? ?? (AWS) ???? ?? ??
???? ?? (AWS) ???? ?? ??
AWSKRUG - AWS???????
?
Metaworks3 Framework workbook 2015
Metaworks3 Framework workbook 2015Metaworks3 Framework workbook 2015
Metaworks3 Framework workbook 2015
uEngine Solutions
?
????3 ??? - ???? ? ??, ??? ??? API????
????3 ??? - ???? ? ??, ??? ??? API???? ????3 ??? - ???? ? ??, ??? ??? API????
????3 ??? - ???? ? ??, ??? ??? API????
uEngine Solutions
?
?????????? ???? ??? ???????
?????????? ???? ??? ????????????????? ???? ??? ???????
?????????? ???? ??? ???????
YoungSu Son
?
Progressive Web App(PWA) ??? ???? - ???(???)
Progressive Web App(PWA) ??? ???? - ???(???)Progressive Web App(PWA) ??? ???? - ???(???)
Progressive Web App(PWA) ??? ???? - ???(???)
Wonseok Jang
?
Portfolio
PortfolioPortfolio
Portfolio
ByungHak Jang
?
Android ContentProvider Adapter Activity Relation
Android ContentProvider Adapter Activity RelationAndroid ContentProvider Adapter Activity Relation
Android ContentProvider Adapter Activity Relation
?? ?
?
Jurano?? lec2. sample application ????
Jurano?? lec2. sample application ????Jurano?? lec2. sample application ????
Jurano?? lec2. sample application ????
Ju-ri Seo
?
2023.06.12 ????? ???? : JPA / ??? ??
2023.06.12 ????? ???? : JPA / ??? ??2023.06.12 ????? ???? : JPA / ??? ??
2023.06.12 ????? ???? : JPA / ??? ??
HONG YONG JUN
?
React native development
React native developmentReact native development
React native development
SangSun Park
?
[Td 2015]?? ?? ?? ?? ???? ???? ??? azure ? ???(???)
[Td 2015]?? ?? ?? ?? ???? ???? ??? azure ? ???(???)[Td 2015]?? ?? ?? ?? ???? ???? ??? azure ? ???(???)
[Td 2015]?? ?? ?? ?? ???? ???? ??? azure ? ???(???)
Sang Don Kim
?
Java rmi ?? ???
Java rmi ?? ???Java rmi ?? ???
Java rmi ?? ???
?? ?
?
Mirantis open stack deployment automation
Mirantis open stack deployment automationMirantis open stack deployment automation
Mirantis open stack deployment automation
WooKyun Jeon
?
????? OAuth 1.0a, 2.0 ?? - Naver, Google API
????? OAuth 1.0a, 2.0 ?? - Naver, Google API ????? OAuth 1.0a, 2.0 ?? - Naver, Google API
????? OAuth 1.0a, 2.0 ?? - Naver, Google API
Gosu Ok
?
Spring integration??? ?????_????????_???????_????
Spring integration??? ?????_????????_???????_????Spring integration??? ?????_????????_???????_????
Spring integration??? ?????_????????_???????_????
Wangeun Lee
?
Google Firebase? ???? ???? - IO Extended 2016
Google Firebase? ???? ???? - IO Extended 2016Google Firebase? ???? ???? - IO Extended 2016
Google Firebase? ???? ???? - IO Extended 2016
Chiung Choi
?
???????? ?? AWS ???? ?? ? ?? ?? - AWS Summit Seoul 2017
???????? ?? AWS ???? ?? ? ?? ?? - AWS Summit Seoul 2017???????? ?? AWS ???? ?? ? ?? ?? - AWS Summit Seoul 2017
???????? ?? AWS ???? ?? ? ?? ?? - AWS Summit Seoul 2017
Amazon Web Services Korea
?
Metaworks3 Framework workbook 2015
Metaworks3 Framework workbook 2015Metaworks3 Framework workbook 2015
Metaworks3 Framework workbook 2015
uEngine Solutions
?
????3 ??? - ???? ? ??, ??? ??? API????
????3 ??? - ???? ? ??, ??? ??? API???? ????3 ??? - ???? ? ??, ??? ??? API????
????3 ??? - ???? ? ??, ??? ??? API????
uEngine Solutions
?
?????????? ???? ??? ???????
?????????? ???? ??? ????????????????? ???? ??? ???????
?????????? ???? ??? ???????
YoungSu Son
?
Progressive Web App(PWA) ??? ???? - ???(???)
Progressive Web App(PWA) ??? ???? - ???(???)Progressive Web App(PWA) ??? ???? - ???(???)
Progressive Web App(PWA) ??? ???? - ???(???)
Wonseok Jang
?
Android ContentProvider Adapter Activity Relation
Android ContentProvider Adapter Activity RelationAndroid ContentProvider Adapter Activity Relation
Android ContentProvider Adapter Activity Relation
?? ?
?
Jurano?? lec2. sample application ????
Jurano?? lec2. sample application ????Jurano?? lec2. sample application ????
Jurano?? lec2. sample application ????
Ju-ri Seo
?

More from YoungSu Son (20)

Fault Tolerance ??
Fault Tolerance ?? Fault Tolerance ??
Fault Tolerance ??
YoungSu Son
?
Clean Code, Software Architecture, Performance Tuning
Clean Code, Software Architecture, Performance TuningClean Code, Software Architecture, Performance Tuning
Clean Code, Software Architecture, Performance Tuning
YoungSu Son
?
???? ??????? ??? ??? ?? - ???? ???
???? ??????? ??? ??? ?? - ???? ??????? ??????? ??? ??? ?? - ???? ???
???? ??????? ??? ??? ?? - ???? ???
YoungSu Son
?
Prototype ?? (???)
Prototype ?? (???) Prototype ?? (???)
Prototype ?? (???)
YoungSu Son
?
Chain of Responsibility (??? - ????? ????? 10?)
Chain of Responsibility (??? - ????? ????? 10?)Chain of Responsibility (??? - ????? ????? 10?)
Chain of Responsibility (??? - ????? ????? 10?)
YoungSu Son
?
Singleton ?? (??? - EVA, ??? 10?)
Singleton ?? (??? -  EVA, ??? 10?) Singleton ?? (??? -  EVA, ??? 10?)
Singleton ?? (??? - EVA, ??? 10?)
YoungSu Son
?
?? ?? ????? ???
?? ?? ????? ??? ?? ?? ????? ???
?? ?? ????? ???
YoungSu Son
?
?? ?? (??? - ??? 10?)
?? ?? (??? - ??? 10?) ?? ?? (??? - ??? 10?)
?? ?? (??? - ??? 10?)
YoungSu Son
?
?? ???/???? ?? ???? ???
?? ???/???? ?? ???? ??? ?? ???/???? ?? ???? ???
?? ???/???? ?? ???? ???
YoungSu Son
?
DevOps ???? ??? (????, ??? ??)
DevOps ???? ??? (????, ??? ??) DevOps ???? ??? (????, ??? ??)
DevOps ???? ??? (????, ??? ??)
YoungSu Son
?
??? ? ?? ?? ?? 101 (Mobile Application Performance Analysis Methodology 101)
??? ? ?? ?? ?? 101 (Mobile Application Performance Analysis Methodology 101) ??? ? ?? ?? ?? 101 (Mobile Application Performance Analysis Methodology 101)
??? ? ?? ?? ?? 101 (Mobile Application Performance Analysis Methodology 101)
YoungSu Son
?
DevOps ??? ???? ???? ??
DevOps ??? ???? ???? ?? DevOps ??? ???? ???? ??
DevOps ??? ???? ???? ??
YoungSu Son
?
???? ???? ???? ?? ???
???? ???? ???? ?? ??????? ???? ???? ?? ???
???? ???? ???? ?? ???
YoungSu Son
?
Android ?? ??? Oreo ? ????
Android ?? ???  Oreo ? ???? Android ?? ???  Oreo ? ????
Android ?? ??? Oreo ? ????
YoungSu Son
?
????? Oreo? ??? ??? ?/???? ??? ?? ?? ??
????? Oreo? ???  ??? ?/???? ??? ?? ?? ??????? Oreo? ???  ??? ?/???? ??? ?? ?? ??
????? Oreo? ??? ??? ?/???? ??? ?? ?? ??
YoungSu Son
?
???? & ??? ???? ??? ? ?? ?? ???
???? & ??? ???? ??? ? ?? ?? ??????? & ??? ???? ??? ? ?? ?? ???
???? & ??? ???? ??? ? ?? ?? ???
YoungSu Son
?
Android Studio ?? ?? + Genymotion
Android Studio ?? ?? + GenymotionAndroid Studio ?? ?? + Genymotion
Android Studio ?? ?? + Genymotion
YoungSu Son
?
URQA ?? ???? ??
URQA ?? ???? ?? URQA ?? ???? ??
URQA ?? ???? ??
YoungSu Son
?
[NEXT] Nextgram Refactoring
[NEXT] Nextgram Refactoring[NEXT] Nextgram Refactoring
[NEXT] Nextgram Refactoring
YoungSu Son
?
[NEXT] Android Profiler
[NEXT] Android Profiler[NEXT] Android Profiler
[NEXT] Android Profiler
YoungSu Son
?
Fault Tolerance ??
Fault Tolerance ?? Fault Tolerance ??
Fault Tolerance ??
YoungSu Son
?
Clean Code, Software Architecture, Performance Tuning
Clean Code, Software Architecture, Performance TuningClean Code, Software Architecture, Performance Tuning
Clean Code, Software Architecture, Performance Tuning
YoungSu Son
?
???? ??????? ??? ??? ?? - ???? ???
???? ??????? ??? ??? ?? - ???? ??????? ??????? ??? ??? ?? - ???? ???
???? ??????? ??? ??? ?? - ???? ???
YoungSu Son
?
Prototype ?? (???)
Prototype ?? (???) Prototype ?? (???)
Prototype ?? (???)
YoungSu Son
?
Chain of Responsibility (??? - ????? ????? 10?)
Chain of Responsibility (??? - ????? ????? 10?)Chain of Responsibility (??? - ????? ????? 10?)
Chain of Responsibility (??? - ????? ????? 10?)
YoungSu Son
?
Singleton ?? (??? - EVA, ??? 10?)
Singleton ?? (??? -  EVA, ??? 10?) Singleton ?? (??? -  EVA, ??? 10?)
Singleton ?? (??? - EVA, ??? 10?)
YoungSu Son
?
?? ?? (??? - ??? 10?)
?? ?? (??? - ??? 10?) ?? ?? (??? - ??? 10?)
?? ?? (??? - ??? 10?)
YoungSu Son
?
?? ???/???? ?? ???? ???
?? ???/???? ?? ???? ??? ?? ???/???? ?? ???? ???
?? ???/???? ?? ???? ???
YoungSu Son
?
DevOps ???? ??? (????, ??? ??)
DevOps ???? ??? (????, ??? ??) DevOps ???? ??? (????, ??? ??)
DevOps ???? ??? (????, ??? ??)
YoungSu Son
?
??? ? ?? ?? ?? 101 (Mobile Application Performance Analysis Methodology 101)
??? ? ?? ?? ?? 101 (Mobile Application Performance Analysis Methodology 101) ??? ? ?? ?? ?? 101 (Mobile Application Performance Analysis Methodology 101)
??? ? ?? ?? ?? 101 (Mobile Application Performance Analysis Methodology 101)
YoungSu Son
?
DevOps ??? ???? ???? ??
DevOps ??? ???? ???? ?? DevOps ??? ???? ???? ??
DevOps ??? ???? ???? ??
YoungSu Son
?
???? ???? ???? ?? ???
???? ???? ???? ?? ??????? ???? ???? ?? ???
???? ???? ???? ?? ???
YoungSu Son
?
Android ?? ??? Oreo ? ????
Android ?? ???  Oreo ? ???? Android ?? ???  Oreo ? ????
Android ?? ??? Oreo ? ????
YoungSu Son
?
????? Oreo? ??? ??? ?/???? ??? ?? ?? ??
????? Oreo? ???  ??? ?/???? ??? ?? ?? ??????? Oreo? ???  ??? ?/???? ??? ?? ?? ??
????? Oreo? ??? ??? ?/???? ??? ?? ?? ??
YoungSu Son
?
???? & ??? ???? ??? ? ?? ?? ???
???? & ??? ???? ??? ? ?? ?? ??????? & ??? ???? ??? ? ?? ?? ???
???? & ??? ???? ??? ? ?? ?? ???
YoungSu Son
?
Android Studio ?? ?? + Genymotion
Android Studio ?? ?? + GenymotionAndroid Studio ?? ?? + Genymotion
Android Studio ?? ?? + Genymotion
YoungSu Son
?
[NEXT] Nextgram Refactoring
[NEXT] Nextgram Refactoring[NEXT] Nextgram Refactoring
[NEXT] Nextgram Refactoring
YoungSu Son
?
[NEXT] Android Profiler
[NEXT] Android Profiler[NEXT] Android Profiler
[NEXT] Android Profiler
YoungSu Son
?

[NEXT] ?? ???? ?? ????? ? ??? - ????? ???? ??? ??

  • 1. Day
  • 2. ?8.
  • 9. ???? ? ????? ???? ???? ???? ?? ???! ? LocalStorage? ???? ???? ?? ??? ??? ? ?? ?? ??? ???? ???? ?? ???? ? ????? ???? ???? ??? ????? ???
  • 11. ?? Article? ???? ?? ???? ?? 1. Homeview Activity? Resume? ? 2. ActionBar? refresh??? ?? ?
  • 12. ?? APP ?? Server Activity database Proxy Dao
  • 13. ?? APP ?? Server Activity database Proxy Dao ??? ?????
  • 14. ?? APP ?? Server Activity database Proxy Dao 1. Proxy?? ??? ???.
  • 15. ?? APP ?? Server Activity database Proxy Dao 2. Proxy? ???? ??? ???
  • 16. ?? APP ?? Server Activity database Proxy Dao 3. ??? Proxy?? json???? ????.
  • 17. ?? APP ?? Server Activity database Proxy Dao 4. Proxy? Activity?? json???? ????.
  • 18. ?? APP ?? Server Activity database Proxy Dao 5. Activity? Dao?? json???? ????.
  • 19. ?? APP ?? Server Activity database Proxy Dao 5. Dao? json???? DB? ????.
  • 20. ?? ?? Proxy.getJson() Dao.insertJsonData() Homview.refreshData() 1. Homeview Activity? onResume()?? 2. ActionBar? refresh??? ?? ?
  • 21. ???? Refresh? ????? ???? ????? ???
  • 22. Server Activity database Proxy Dao ????? ???? ???? ? ????
  • 23. section 1 Service ???????
  • 24. ???
  • 25. ???!
  • 26. ????? ????? ?????? ???? ???? ? ? ?? ??????? ??? ?????.
  • 27. Android Service Service? ??????? ? ???? ?????? ??? ?? ???? ???? ????? ???? ?? ????? ???? ?? ?) ???? ??, ?? ??, I/O ?? ??, content provider? ???? ? ?? ?? ????? ??
  • 28. Service? ??? ?? STARTED BOUND Activity?? Component?? startService() ???? ?? ???? Component?? bindService()???? ?? ???? ? ??????? ???? ??? ??? ????? ???? ??? ? caller?? ???? ???? ?? ? ?? ??? ??? ???? ?? ? Client - Serivce ????? ??(send request, get results, IPC) ? Bind ???? ?? ???? ?? ?? ??. Bind ???? ???? 0?? ? ??? ???? ??
  • 29. Service? ??? ?? STARTED BOUND Activity?? Component?? startService() ???? ?? ???? ??? STARTED? ?? Component?? bindService()???? ?? ???? ? ??????? ???? ??? ??? ????? ???? ??? ? caller?? ???? ???? ?? ? ?? ??? ??? ???? ?? ? Client - Serivce ????? ??(send request, get results, IPC) ? Bind ???? ?? ???? ?? ?? ??. Bind ???? ???? 0?? ? ??? ???? ??
  • 30. Android Service ???? 1. Service? ???? SyncDataService ???? ?? ?????. 2. Service? ???? ?? AndroidManifest.xml? ??? ?????. 3. Service? ?? ??? ???? ?????
  • 32. Service Class ?? ? Service? ???? ??? SyncDataService? ?????.
  • 33. Android Manifest ?? ?? ?? ?? Service ???? ???? SyncDataService? ?? ? Android?? Service? ???? ??? AndroidManifest.xml ??? ??? ???? ???. ? application ?? ?? ??? ???.
  • 34. ????? ??? ?? SyncDataService?? ??? Override ???
  • 35. ????? ??? ?? SyncDataService?? ??? Override ??? ? onCreate() : Service? ????? ? ??. ? onDestroy() : Service? ????? ? ??. ? onStartCommand() : ?? ?????? startService? ?? ????? ??.
  • 36. ????? ??? ?? SyncDataService?? ??? Override ??? ? onCreate() : Service? ????? ? ??. ? onDestroy() : Service? ????? ? ??. ? onStartCommand() : ?? ?????? startService? ?? ????? ??. ??? ? 3?? ???? ?????? ??? ????????.
  • 37. Service? ?????(1) AndroidManifest.xml ??? ???? ???? ?? intent-filter ??? ?????
  • 38. Service? ?????(2) HomeView.java Service? ???? ??? ??? ?? ??? ?????? ???. ex) HomeView? onCreate()
  • 39. Service? ?????(3) SyncDataService.java ??? ???? ???? ??? ??? ???? ???.
  • 40. Article? ????? ???? TimerTask ???? Timer ???? ??? ???? ??? ???? ??? ??? ????.
  • 41. Article? ????? ????(1) Timer ? ???? Timer(String name)? ???????.
  • 42. Article? ????? ????(2) Timer? ??? ¡­http://developer.android.com/reference/java/util/Timer.html ? schedule ???? TimerTask (??? ??), ???? ??? ?, ??? ??? ?? ??? ?????. ? ? ???? schedule(TimerTask task, long delay, long period)? ???????.
  • 43. Article? ????? ????(3) TimerTask Runnable? implements ?? ??? run() ???? ?? ??? ????.
  • 44. Article? ????? ????(3) TimerTask Runnable? implements ?? ??? run() ???? ?? ??? ????. ???? ??, ???? 3?? ???? ??? ??? ???.
  • 45. Article? ????? ????(4) SyncDataService.java TimerTask? Timer ???? ??? ????? ???? ?????? ???. ????? Log.i(TAGm ¡°Hello¡±); ? ????? ?????.
  • 46. Service?? Article ???? ??? ??? TimerTask class? run()? ???? Article? ??????.
  • 47. Service?? Article ????(1) Service? Timer? ???? ???? ?????? ?? Article? ???? ??? ????? ???. Proxy.getJson() Dao.insertJsonData() Article? ???? ???
  • 48. Service?? Article ????(2) SyncDataService.java Proxy, Dao ???? ??? ?? ??? ?????.
  • 49. Service?? Article ????(3) SyncDataService.java Proxy? Dao?? Application Context? ???? ?????. Proxy? Dao ??? ???? Application Context? ??? ???? ?????.
  • 50. Service?? Article ????(3) SyncDataService.java Proxy.getJson() TimerTask? run() ??? ?? ? ??? ???. Dao.insertJsonD ata()
  • 51. Server Activity database Proxy Dao Service Service? ????? ??? ????.
  • 52. section 1 Service ???????
  • 53. ???
  • 55. ?? ????? ???? ??? ? ?? ???? ?????? Service? ??? ?? ??? ???!
  • 56. section 2 Content Provider ??
  • 58. ?
  • 59. ? ?
  • 60. ???
  • 61. ????
  • 62. ?????
  • 63. Activity Dao database ???? ??? ???? ???? ????
  • 64. Activity Dao database ???? ??? ???? ???? ???? ???? ?????? ??? ???? ????? ????
  • 65. Activity Dao database ???? ??? ???? ???? ???? ???? ?????? ??? ???? ????? ???? ???? ????? ???? ???? ????
  • 66. Content Provider? ?? ? ??? ??? ?? ? Data? ??? ??, Data? ??? ?? ????? ?? ? ? ?????? ???? ?? ????? ???? ?? ?? ?????
  • 67. Content Provider Content Provider? ???? ?? ???? ???? (1). ContentProvider (2). ContentResolver (3). Cursor (4). Uri Database? ?? ContentProvider? ?? Application? ???? ?? ??? Resolver? ?? ??? ???? ?? ???? ??? ? ?? ??? ?????, DB.. ??
  • 68. Content Provider ?? ?? Application ContentResolver ContentProvider DataBase Application 1 URI Application? ??? Resolver?? ???? ??
  • 69. Content Provider Application ContentResolver ContentProvider DataBase Application ContentResolver? URI? ??? ??????? ContentProvider? ?? ??? ?? 2 URI ?? ??
  • 70. Content Provider Application ContentResolver ContentProvider DataBase Application ContentProvider? Resolver? ??? ???? Database?? ?? 3 URI ?? ??
  • 71. Content Provider Application ContentResolver ContentProvider DataBase Application Cursor 4 ContentProvider? Resolver?? ???? ???? Resolver? ???? ??? Application?? Cursor ??? ???? ?? ?? ??
  • 72. Content Provider ?? URI Application ContentResolver ContentProvider DataBase Application Cursor 1. ContentResolver ??? Provider ??? ??? ???? ???. ContentResolver.query() ???? ContentProvider.query()? ???? ?? 2. ContentResolver ??? Create, Retrieve, Update, Delete (CRUD)? ???
  • 73. Content Provider ???? URI Application ContentResolver ContentProvider DataBase Application Cursor 1. Application?? Content Resolver? ?????? ContentResolver? ?? ContentProvider? ??? ? ??? ??
  • 74. Content Provider ???? URI Application ContentResolver ContentProvider DataBase Application Cursor 2. Content Provider? ???? ?? Custom Content Provider? ??? ?? ??????? ?????? ??? ? ??? ??
  • 75. ContentProvider? ????? ContentResolver? ???? ???? ???? ???? ?? ???? ???? ????!
  • 76. ContentResolver? ??? ContentProvider query() Provider? ?? ???? ???? ?? ?? (Cursor ??) insert() Provider? ?? ???? ???. (?? ??? row? URI? ??) update() Provider? ?? ???? ?????. (????? ??? ??? ??) delete() Provider? ?? ???? ???. (??? ??? ??? ??) ¡­. (? ??? ?? ???? ??)
  • 77. ContentResolver? ??? ContentProvider query() Provider? ?? ???? ???? ?? ?? (Cursor ??) insert() Provider? ?? ???? ???. (?? ??? row? URI? ??) update() Provider? ?? ???? ?????. (????? ??? ??? ? ?) query()? ?? ?????? Content URI, Cursor ? ??? ??? ??? ?? ???. delete() Provider? ?? ???? ???. (??? ??? ??? ??) ¡­. (? ??? ?? ???? ??)
  • 78. °Ù„²»ÈçÒ»ÒŠ ???? ???? App? ??? Android ? ??? ???? ??? ???? ??? ? ?? Content Provider ? ?? ???? ????. ??? ??? ? ??? Provider? ???? Resolver ? ??? 1. Application?? Content Resolver? ?????? ContentResolver? ?? ContentProvider? ??? ? ??? ?? ?? ???? ???????. ??? Provider : http://developer.android.com/reference/android/provider/ContactsContract.Contacts.html
  • 80. ?? ??? 2?! 1. Cursor getContactCursor () ContentResolver? ?? ??? Provider? ???? ??? ? ??? Cursor? ???? ??? 2. void printLogContactData (Cursor contactData) contentProvider? ?? Cursor??? ??? ???? Log? ???? ???
  • 81. ?? ??? 2?! 1. Cursor getContactCursor () ContentResolver? ?? ??? Provider? ???? ??? ? ??? Cursor? ???? ??? 2. void printLogContactData (Cursor contactData) contentProvider? ?? Cursor??? ??? ???? Log? ???? ??? Cursor? ???
  • 84. Cursor? ?????. d.android? ????. (????) Database query? ?? ??? ??? ???? ???????..
  • 90. Cursor? ?????? Application DB? ???? ???! (query) DB
  • 91. Cursor? ?????? Application DB Data ?. ???!
  • 92. Cursor? ?????? DB Data Application ???? ?? ?????
  • 93. Cursor? ?????? DB Application Cursor Data Cursor ??? ?? ???? ???? Cursor? ?? ? ??? ?? : http://developer.android.com/reference/android/database/Cursor.html
  • 95. getContactCursor ??(1) ContentResolver? ?? ??? Provider? ???? ??? ?, ??? Cursor? ???? ??? ??? ?????. Mac?? : command + shift + o ? ?? Import?? ?? ???? Import
  • 96. getContactCursor ??(2) ContentResolver? ?? ??? Provider? ???? ??? ?, ??? Cursor? ???? ??? Uri contactURI ? Provider? ???? ???? ?? URI ???. ContactsContract.Contacts.CONTENT_URI ? ??? ?? ???? ??? ?????.
  • 97. getContactCursor ??(3) ContentResolver? ?? ??? Provider? ???? ??? ?, ??? Cursor? ???? ??? ¡ª¡ª¡ª¡ª¡ª ??? ??? ?? Projection ? Provider? ?? ???? ?? ??? ?????.
  • 98. getContactCursor ??(4) ContentResolver? ?? ??? Provider? ???? ??? ?, ??? Cursor? ???? ??? getContentResolver() ? ?? Resolver ??? ??? ? query() ???? ?????.
  • 99. getContactCursor ??(4) ContentResolver? ?? ??? Provider? ???? ??? ?, ??? Cursor? ???? ??? getContentResolver() ? ?? Resolver ??? ??? ? query() ???? ?????. SQL query ? ???? ? ? ??? ???????.
  • 100. getContactCursor ??(4) ContentResolver? ?? ??? Provider? ???? ??? ?, ??? Cursor? ???? ??? query() ??? SELECT ?? Uri FROM table_name Uri ? provider? ???? ???? ?? projection col, col, col, ¡­ ???? ??? col? ????. selection WHERE col = value WHERE ?? ?? ??? ????. ??? ? ?? ?? selectionArgs selection? ?? ???? ?? ???? sortOrder Order By col, col¡­ sortOrder ? ??? Cursor? ???? ???
  • 101. getContactCursor ??(5) ContentResolver? ?? ??? Provider? ???? ??? ?, ??? Cursor? ???? ??? null? ?? ?? ?? .query(contactURI, projection, null, null, Contacts.DISPLAY_NAME+¡± asc¡±); SELECT _ID, display_name FROM contacts ORDER BY display_name ASC;
  • 102. ?? ??? 2?! 1. Cursor getContactCursor () ContentResolver? ?? ??? Provider? ???? ??? ? ??? Cursor? ???? ??? 2. void printLogContactData (Cursor contactData) contentProvider? ?? Cursor??? ??? ???? Log? ???? ???
  • 103. printLogContactData ??(1) contentProvider? ?? Cursor??? ??? ???? Log? ???? ??? id? displayName? ??? ??? ??? ??? ?????.
  • 104. printLogContactData ??(1) contentProvider? ?? Cursor??? ??? ???? Log? ???? ??? null? ?? ?? ?? Cursor? null? ?? ??? ??? ?????.
  • 105. printLogContactData ??(1) contentProvider? ?? Cursor??? ??? ???? Log? ???? ??? Cursor? getCount() ???? ??? ??? ???? ???? ??? 0?? ??? ??? ???.
  • 106. printLogContactData ??(1) contentProvider? ?? Cursor??? ??? ???? Log? ???? ??? 1. idIndex? displayNameIndex? ?? ????. 2. ??? ??? ?????. ??? ??? ??? ??? ??? ??? ???.
  • 107. printLogContactData ??(1) contentProvider? ?? Cursor??? ??? ???? Log? ???? ??? getColumnIndex()? ?? id? displayName? ???? ????.
  • 108. printLogContactData ??(1) contentProvider? ?? Cursor??? ??? ???? Log? ???? ??? moveToNext() ???? ?? ???? ????? ???.
  • 109. printLogContactData ??(1) contentProvider? ?? Cursor??? ??? ???? Log? ???? ??? getLong(), getString() ???? ?? Cursor??? ???? ?????.
  • 110. ?? ?????? ?? ??? ??? ?????.
  • 111. 1. Cursor getContactCursor () 2. void printLogContactData (Cursor contactData) ???? ??? ???? 1. Application?? Content Resolver? ?????? ContentResolver? ?? ContentProvider? ??? ? ??? ?? ? ??????
  • 112. Content Provider ??? ?? Custom Content Provider? ??? ?? ??????? ?????? ??? ? ??? ??
  • 113. Content Provider? ??? ?? ? Content Provider? ?? ???? ????? ??? ?? 1. ?? ???????? ??? ???, file? ???? ????. 2. ???? ??? ??? ?? ??? ??? ???? ???? ????. 3. Search Framework? ???? custom search? ???? ????. ? ?? ???? Provider? ???? ?? ??? ?? Calendar, Contacts ?? ?? ???? Provider?? ????
  • 114. Content Provider ??? ?? ? NextgramProvider? ???. ? Dao? ???? ? Contract Class ??? ? Content Provider ??????
  • 115. ? Dao? ???? ?? ?? Dao.java? ??? ProviderDao.java? ????.
  • 116. ? Dao? ???? ?????? ?????? ??? ??? ?????.
  • 117. ? Dao? ???? ? ?? NEXTGRAM? DAO???? ??? DAO??? ??? ???! 1. Database? ???? ??, ???? Mashaling, Unmashaling?? ?? ? ???? ??? ??? ??? ??.
  • 118. ???! Database? ?? json??? ??? ??¡­. ?? ???????. ? Dao? ???? Dao.java ProviderDao.java NextgramProvider.java
  • 119. ? Dao? ???? NextgramProvider?? ??? ??? ???? ?????.
  • 120. ? Dao? ???? ? Content Provider? ??????. ? unimplemented methods? ????? ??? onCreate query getType insert delete update
  • 121. ? Dao? ???? NextgramProvider ?? ??? ??? ProviderDao??? ??????. Database? ???? ?? ? sqLiteInitialize ? tableCreate ? isTableExist NextgramProvider.java
  • 122. ? Dao? ???? NextgramProvider.java NextgramProvider ?? ??? ??? ??? ???.
  • 123. ? Dao? ???? NextgramProvider.java NextgramProvider? onCreate? ?????.
  • 124. ? Contract Class ??? ? Contract class? Content Provider?? ??? ???? ????? ??????. ? ??? ???????? Provider? ???? ?? ??? ??? ???? ????. ??? Provider? Contract class ?? ??
  • 125. ? Contract Class ??? NextgramContract ?? public final class ? ??? ???
  • 126. ? Contract Class ??? NextgramContract.java NextgramContract ? AUTHORITY, CONTENT_URI? ?? ??? ?????.
  • 127. ??! Content URI, Authority?!
  • 128. Content URI? ????? ? Content URI? provider?? ???? ???? URI??. ? Provider? ??? ???? Authority? ????? ??? ???? Path? ???? ??. Content URI Authority + Path
  • 129. Content URI? ????? Authority? ?? ?????? ??? ??? ?? ¡°Android ??? ?? + ???¡± ? ???? Content URI Authority + Path org.nhnnext.nextgram.provider/table1 ?? :
  • 130. Content URI? ????? Content URI ?? content://org.nhnnext.nextgram.provider/table1 content://org.nhnnext.nextgram.provider/table2/dataset1 content://org.nhnnext.nextgram.provider/table2/dataset2 content://org.nhnnext.nextgram.provider/table3 table1? ??. dataset1?? ??? table? ?? dataset2? ??? table? ?? table3? ???. URI? ?? ???? ?? URI? ?? ? ?? ?? content://org.nhnnext.nextgram.provider/table1/1 table1? ??. ??? URI : content://authority/path ? ?? URI : content://authority/path/id #? ?? ??? ?? *? ?? ??, ??? ??
  • 131. ? Contract Class ??? NextgramContract.java Inner class? BaseColumns? ???? Articles ???? ?????.
  • 132. ? Contract Class ??? NextgramContract.java ???? ????? _ID, TITLE, WRITER, ID, CONTENT, WRITER_DATE, IMAGE_NAME? ???? ??? ?????.
  • 133. ? Contract Class ??? NextgramContract.java Articles ???? ???? ???? CONTENT_URI? ?????.
  • 134. ? Contract Class ??? NextgramContract.java PROJECTION_ALL? ?? ??? ??? ???.
  • 135. ? Contract Class ??? NextgramContract.java ???? ??? _ID? ???? ??? ???.
  • 136. ? Contract Class ??? ??? ???? Contract Class? Provider? ???? ?? API?? ???? ????. ???? NextgramProvider? onCreate query getType insert delete update
  • 137. ? Contract Class ??? ??? ???? Contract Class? Provider? ???? ?? API?? ???? ????. ???? NextgramProvider? onCreate query getType insert delete update MIME TYPE? ???? ??. ?? ??? ?? ?? ??? ??
  • 138. ? Contract Class ??? ??? ???? Contract Class? Provider? ???? ?? API?? ???? ????. ???? NextgramProvider? onCreate query insert ? ???????.
  • 139. ? Content Provider ?????? Android Manifest ???? manifest ?? ?? ???? Provider? ????? ???.
  • 140. ? Content Provider ?????? NextgramProvider.java query, insert?? ??? URI??? ??? Uri Matcher ??? ?????.
  • 141. ? Content Provider ?????? NextgramContract.java Resolver? ?? ??? ???? ¡°org.nhnnext.nextgram.provider/Articles¡±? 1 (ARTICLE_LIST) ?? ¡°org.nhnnext.nextgram.provider/Articles/#¡±? 2 (ARTICLE_ID) ??
  • 142. ? Content Provider ?????? ???? insert? ???????.
  • 143. ? Content Provider ?????? ???? ContentValues? ?????. ??? ??? ????! NextgramProvider.java
  • 144. ? Content Provider ?????? NextgramProvider.java
  • 145. ? Content Provider ?????? NextgramProvider.java
  • 146. ? Content Provider ?????? NextgramProvider.java
  • 147. ? Content Provider ?????? insert? ??? ?????? query? ???????.
  • 148. ? Content Provider ?????? NextgramProvider.java Uri uri ??? ?? ??? ??? ???? ?????.
  • 149. ? Content Provider ?????? NextgramProvider.java URI? ¡°org.nhnnext.nextgram.provider¡± ?? URI_MATCHER? match()? ARTICLE_LIST(1)? ?????.
  • 150. ? Content Provider ?????? NextgramProvider.java NextgramContract.java sortOrder?? ??? _ID? ???? ?????.
  • 151. ? Content Provider ?????? NextgramProvider.java ARTICLE_ID ? ??? ??? ???? ????? ??? ?????.
  • 152. ? Content Provider ?????? ARTICLE_LIST, ARTICLE_ID ? ??? Uri? ?? ??? ??? ? Database? Query? ?????.
  • 153. ? Content Provider ?????? NextgramProvider.java ??? ??!
  • 154. ? Content Provider ?????? NextgramProvider.java database.query? ?? Table, projection, selection, selectionArgs, sortOrder? ???? query? ????.
  • 155. ? Content Provider ?????? NextgramProvider.java ??? cursor? return ??? ??!
  • 156. ? Content Provider ?????? NextgramProvider.java? insert, query? ?? ??? ProviderDao.java? ????? ?????.
  • 157. ? Content Provider ?????? ProviderDao.java? ? sqLiteInitialize ? tableCreate ? isTableExist ???? ??? ???. Database? ?? ?????? NextgramProvider? ?????.
  • 158. ? Content Provider ?????? ProviderDao.java? ? insertJsonData ? getArticleList ? getArticle insert ???? ??? ???. query
  • 159. ? Content Provider ?????? 1. insertJsonData ??
  • 160. ? Content Provider ?????? ?? Dao.java??? database? ?? insert?? ??? ??? ??? ?? ?? ??? ??? ??????. ??? ContentResolver? ???? database? ?? ??? ? ???? ?? ??? ContentValues? ?? ???? ???.
  • 161. ? Content Provider ?????? ContentValues ?? ???? ??? ????
  • 162. ? Content Provider ?????? (??) Dao.java - insertJsonData ??? (insert ??? ??? database? ??) Database? ?? ???? ??? Resolver? ?? Provider? ????? ?????
  • 163. ? Content Provider ?????? (??) ProviderDao.java - insertJsonData ??? (? ??? ??? ContentValues? ??? values? ?? ??) Database? ?? ???? ??? Resolver? ?? Provider? ????? ?????
  • 164. ? Content Provider ?????? 2. getArticleList ??
  • 165. ? Content Provider ?????? ProviderDao.java Dao.java getArticleList ??? ?? ?? ??
  • 166. ? Content Provider ?????? Dao.java ProviderDao.java
  • 167. ? Content Provider ?????? ProviderDao.java Dao.java
  • 168. ? Content Provider ?????? 2. getArticleByArticleNumber ??
  • 169. ? Content Provider ?????? ProviderDao.java Dao.java getArticleByArticleNumber ??? ?? ?? ??
  • 170. ? Content Provider ?????? Dao.java ProviderDao.java
  • 171. section 2 Content Provider ??
  • 173. ?
  • 174. ? ?
  • 175. ???
  • 176. ????
  • 178. Server ??? ?? ?? Activity ProviderDao database Proxy Service Content Provider? ?? DB? ??? ? ?? ????. Content Provider
  • 179. Activity Dao database ???? ??? ???? ???? ???? ???? ?????? ??? ???? ????? ???? ???? ????? ???? ???? ????
  • 180. Activity Dao database ???? ??? ???? ???? ???? ???? ?????? ??? ???? ????? ???? ???? ????? ???? ???? ????
  • 181. Activity Dao database ???? ??? ???? ???? ???? ???? ?????? ??? ???? ????? ???? ???? ????? ???? ???? ????
  • 182. Activity Dao database ???? ??? ???? ???? ???? ???? ?????? ??? ???? ????? ???? ???? ????? ???? ???? ????
  • 183. ???? ?????? ??? ???? ????? ????
  • 184. section 3 Cursor Adapter ????
  • 185. ?????
  • 186. ????
  • 187. ?????
  • 188. ?
  • 190. ???? ?????? ??? ???? ????? ???? HomeViewAdapter? CursorAdpater? ????
  • 191. HomeView ?? HomView.java Cursor Adapter? ???? ?????? ??? ??? ????. ?? ????? ??? ?????? ???.
  • 192. HomeView ?? HomView.java ?? ??? onCreate? ??? ??? ?????? ???. ??, listViewSimple1()? ???? ???.
  • 193. HomeView ?? HomView.java CursorAdapter? ???? ?? ??? ?????. HomeViewAdapter? context, cursor, layout ??? ??? ????.
  • 194. CursorAdapter? ??? ?? HomeView? ??? ???? ArrayAdapter? ???? HomeViewAdapter? ????? ???.
  • 195. CursorAdapter ?? CursorAdapter.java CursorAdapter? ????? ?????.
  • 196. CursorAdapter ?? CursorAdapter.java 1. Context, Cursor, XML layoutID? ??? ???? ?????. 2. LayoutInflater? ?? ?????? ???.
  • 197. CursorAdapter ?? CursorAdapter.java CursorAdapter? ????? newView, bindView? ???????. ? ?? ??? getView? ??? ??? ? ????. getView ???? ???????
  • 198. newView, bindView newView? ?? view? ???? ?????. bindView? ?? ?? ??????? ?????.
  • 200. ViewHolder Pattern ??? HomeViewAdapter.java? getView() Adapter? ?????? findViewById()? ??? ??? ?????? ?? ?? ViewHolder Pattern? ????? ?????. View??? ????? ?? ??
  • 201. CursorAdapter ?? CursorAdapter.java CursorAdapter.java?? ViewHolderItem ???? ?????. ???????? ????? ?????.
  • 202. CursorAdapter ?? CursorAdapter.java xml????? inflate? View? ??? ???. ??? ?? ??? ????.
  • 203. CursorAdapter ?? CursorAdapter.java ViewHolderItem ??? ?????.
  • 204. CursorAdapter ?? CursorAdapter.java 1. ViewHolderItem ???? resourceID? ?? ??? ??????. 2. View?? setTag()? ??? ??????.
  • 206. CursorAdapter ?? CursorAdapter.java Cursor??? View? ??? ???? ?????.
  • 207. CursorAdapter ?? CursorAdapter.java getTag? ?? viewHolderItem ??? ??? ? articleNumber, writer, title? ?????.
  • 208. CursorAdapter ?? CursorAdapter.java ImageView? ????? ???.
  • 209. CursorAdapter.java ????? HomeView?? Item? ????? ArticleNumber? ???? ??? ????? ???.
  • 210. ??? ArrayAdpater??? HomeViewAdapter? CursorAdapter ???? ?? ??!
  • 212. ? Cursor Adapter ??? ?????? Adpater ArrayAdapter ?? ???? ??? ????? Adapter
  • 213. ? Cursor Adapter ??? ?????? Adpater ArrayAdapter ?? ???? ??? ????? Adapter Array DB??? ???? ???? ???? Array? ??.
  • 214. ? Cursor Adapter ??? ?????? Adpater ArrayAdapter ?? ???? ??? ????? Adapter list_item.xml Array ArrayAdapter ArrayAdapter? Array? ???? xml ??? ??.
  • 215. ? Cursor Adapter ??? ?????? Adpater ArrayAdapter ?? ???? ??? ????? Adapter list_item.xml Array ArrayAdapter ???? ??? ???.
  • 216. ? Cursor Adapter ??? ?????? Adpater ArrayAdapter ?? ???? ??? ????? Adapter Array ??? DB??? ????? ??? ??? ???? ???
  • 217. ? Cursor Adapter ??? CursorAdapter Cursor? ?? ??? ???? ??? ????? Adapter Cursor list_item.xml CursorAdapter DB Uri? ?? Cursor? ?? DB? ???.
  • 218. ? Cursor Adapter ??? CursorAdapter Cursor? ?? ??? ???? ??? ????? Adapter list_item.xml Cursor CursorAdapter ???? ??? ???.
  • 219. ? Cursor Adapter ??? CursorAdapter Cursor? ?? ??? ???? ??? ????? Adapter list_item.xml Cursor CursorAdapter DB? ??? ?????? ???? ??? ???? ???
  • 220. ? Cursor Adapter ??? CursorAdapter? ContentProvider??? ?? list_item.xml Cursor CursorAdapter ContentProvider
  • 221. Cursor Adapter ? Content Provider ?? : ???A? HomeView? ????? ???B? ??? ?? ???? ??
  • 222. ???B? ???? ???? ??? ???? ????. ???B Server
  • 223. ???? ????? ???A? ??????? ???? ???? ???. Server ??? A
  • 224. ???A? ??????? ContentProvider? ?? Database? insert? ??? A
  • 225. ???A? ??????? ContentProvider? ?? Database? insert? ??? A insert?? notifyChange??
  • 226. Cursor? ?? ?????? CursorAdapter? ??? ? ??? list_item.xml ???? ????! Cursor CursorAdapter ContentProvider
  • 227. Cursor? ?? ?????? CursorAdapter? ??? ? ??? list_item.xml Cursor CursorAdapter ContentProvider ???!
  • 228. Cursor? ?? ?????? CursorAdapter? ??? ? ??? list_item.xml Cursor CursorAdapter ContentProvider CursorAdapter? ContentProvider???? ???? ?????
  • 230. ContentProvider CursorAdapter publisher/Subscribe Pattern ??? CursorAdapter Register ContentProvider Subscribe Subscribe Notify 1. Content Provider? notifyChange???? ????. 2. ?????? Subscribe?? OnChange()? ????. 3. CursorAdapter? ????? notifyDataSetChanged()? ????.
  • 231. section 3 Cursor Adapter ????
  • 232. ?????
  • 233. ????
  • 234. ?????