lesson 2. connect sunshine to the cloud, lesson 3. new activities and intents
Post on 15-Jul-2015
137 Views
Preview:
TRANSCRIPT
Lesson����������� ������������������ 2.����������� ������������������ COnnect����������� ������������������ SUnshine����������� ������������������ to����������� ������������������ the����������� ������������������ cloud
도우미����������� ������������������ 이찬형
Introduction
•basic����������� ������������������ UI����������� ������������������ with����������� ������������������ mock����������� ������������������ data����������� ������������������
•hook����������� ������������������ sunshine����������� ������������������ up����������� ������������������ with����������� ������������������ Cloud����������� ������������������
•OPenWeatherMap����������� ������������������ API����������� ������������������
•permission����������� ������������������ System����������� ������������������
•Network����������� ������������������ I/O
Review����������� ������������������ Data����������� ������������������ Provided����������� ������������������ by����������� ������������������ OpenWeatherMap
•provides����������� ������������������ a����������� ������������������ free����������� ������������������ weather����������� ������������������ data����������� ������������������
•forecast����������� ������������������ API����������� ������������������
•Open����������� ������������������ API����������� ������������������ ?
Find����������� ������������������ the����������� ������������������ Query����������� ������������������ We����������� ������������������ want•1����������� ������������������ week����������� ������������������
•Postal����������� ������������������ code����������� ������������������
•Json����������� ������������������
•http://ko.wikipedia.org/wiki/JSON����������� ������������������
•metric����������� ������������������ (����������� ������������������ matric����������� ������������������ vs����������� ������������������ imperial����������� ������������������ )����������� ������������������
•http://api.openweathermap.org/data/2.5/forecast/daily?q=94043&mode=json&units=metric&cnt=7
HTTP����������� ������������������ Request����������� ������������������ for����������� ������������������ Weather����������� ������������������ Data
•Make����������� ������������������ Http����������� ������������������ Request����������� ������������������
•Read����������� ������������������ Response����������� ������������������ from����������� ������������������ input����������� ������������������ stream����������� ������������������
•Clean����������� ������������������ up����������� ������������������ and����������� ������������������ log����������� ������������������ any����������� ������������������ errors
HTTP����������� ������������������ Requests
•HttpUrlConnection����������� ������������������ vs����������� ������������������ HttpClient����������� ������������������
•http://aroundck.tistory.com/2301
Logcat
•log.e����������� ������������������
•adb����������� ������������������ logcat����������� ������������������
•Android����������� ������������������ Debug����������� ������������������ Monitor
Logging����������� ������������������ on����������� ������������������ Android•ERROR����������� ������������������
•WARN����������� ������������������
•INFO����������� ������������������
•DEBUG����������� ������������������
•VERBOSE����������� ������������������
•http://blog.joins.com/media/folderlistslide.asp?uid=xever21&folder=6&list_id=13535949
Network����������� ������������������ Call
•Copy����������� ������������������ and����������� ������������������ paste����������� ������������������ on����������� ������������������ onCreateView����������� ������������������
•What����������� ������������������ happens����������� ������������������ ?
Main����������� ������������������ Thread����������� ������������������ vs����������� ������������������ Background����������� ������������������ Thread
•Main����������� ������������������ Thread����������� ������������������ ?����������� ������������������
•Background����������� ������������������ Thread����������� ������������������ ?����������� ������������������
•Why����������� ������������������ AyncTask����������� ������������������ ?
Which����������� ������������������ Thread����������� ������������������ for����������� ������������������ AcyncTask
•doInBackground()����������� ������������������
•onPreExcute()����������� ������������������
•onProgressUpdate()����������� ������������������
•onPostExcute()
Move����������� ������������������ to����������� ������������������ AsyncTask
•FetchWeatherTask����������� ������������������
•LOG_TAG����������� ������������������ =����������� ������������������ ?
Why����������� ������������������ AsyncTask����������� ������������������ is����������� ������������������ Not����������� ������������������ Optimal
Menu����������� ������������������ Buttons
Refresh����������� ������������������ Button����������� ������������������ Behavior
•inflate����������� ������������������ in����������� ������������������ Forecast����������� ������������������ Fragment����������� ������������������
•setHasOptionMenu(true)����������� ������������������
•onOptionItemSelected()
Permissions
•app����������� ������������������ run����������� ������������������ within����������� ������������������ its����������� ������������������ instance����������� ������������������ in����������� ������������������ AVM����������� ������������������
•manifest����������� ������������������
•absolute����������� ������������������ minimum����������� ������������������ of����������� ������������������ persons����������� ������������������
•<uses-permission����������� ������������������ android����������� ������������������ :����������� ������������������ name����������� ������������������ =����������� ������������������ “android.permission.INTERNET”/>
Postal����������� ������������������ Code����������� ������������������ Param����������� ������������������ and����������� ������������������ Parsing����������� ������������������ JSONObject
•UriBuilder����������� ������������������
•JSONObject����������� ������������������
•http://ralroo.tistory.com/6
Update����������� ������������������ the����������� ������������������ Adapter
•ArrayAdapter<String>����������� ������������������ mForecastAdapter����������� ������������������
•onPostExcute
Lesson����������� ������������������ 3.����������� ������������������ New����������� ������������������ Activities����������� ������������������ and����������� ������������������ Intents
도우미����������� ������������������ 이찬형
Introduction����������� ������������������ to����������� ������������������ Lession3
•how����������� ������������������ to����������� ������������������ create����������� ������������������ activities����������� ������������������
•how����������� ������������������ to����������� ������������������ navigate����������� ������������������ between����������� ������������������ screens
Sunshine����������� ������������������ App����������� ������������������ UX����������� ������������������ Mocks
List����������� ������������������ Item����������� ������������������ Click����������� ������������������ Listener
•setOnItemClickListener����������� ������������������
•Toast����������� ������������������
•useful����������� ������������������ for����������� ������������������ debugging
Create����������� ������������������ New����������� ������������������ Activity
•Blank����������� ������������������ Activity����������� ������������������ with����������� ������������������ Fragment����������� ������������������
•http://blog.pluralsight.com/android-fragments����������� ������������������
•Hierachical����������� ������������������ Parent����������� ������������������ :����������� ������������������ MainActivity
Intents����������� ������������������ Framework����������� ������������������
•explicitly����������� ������������������ intent����������� ������������������
•startActivity����������� ������������������ -����������� ������������������ lunch����������� ������������������ Detail����������� ������������������ Activity����������� ������������������
•packaged����������� ������������������ as����������� ������������������ Extras����������� ������������������ -����������� ������������������ Display����������� ������������������ Content����������� ������������������ in����������� ������������������ Detail����������� ������������������ Activity����������� ������������������
•Implicit����������� ������������������ intent
Setting����������� ������������������ UX
•DON’T����������� ������������������ make����������� ������������������ everything����������� ������������������ a����������� ������������������ setting
Preference
•CheckBox,����������� ������������������ List,����������� ������������������ EditText����������� ������������������
•SharedPreference����������� ������������������
•PreferenceActivity����������� ������������������
•PreferenceFragment
Location����������� ������������������ Setting����������� ������������������ XML
•pref_general.xml����������� ������������������
•EditTextPreference����������� ������������������
•addPreferencesFromResource����������� ������������������
•bindPreferenceSummaryToValue
Use����������� ������������������ SharedPreference
•Update����������� ������������������ Data����������� ������������������ on����������� ������������������ Activity����������� ������������������ Start����������� ������������������
•Temperature����������� ������������������ Units����������� ������������������ Setting
Add����������� ������������������ Map����������� ������������������ Location����������� ������������������ Intent•Implicit����������� ������������������ Intents����������� ������������������
•“geo:0,0?”����������� ������������������
•Intent.ACTION_VIEW����������� ������������������
•resolveActivity����������� ������������������
•Maps����������� ������������������ app����������� ������������������ included����������� ������������������ an����������� ������������������ intent����������� ������������������ filter
Share����������� ������������������ Intent����������� ������������������ is����������� ������������������ Awesome•Android����������� ������������������ 4.0����������� ������������������
•Share����������� ������������������ action����������� ������������������ provider����������� ������������������
•support����������� ������������������ library����������� ������������������
•Flags����������� ������������������ :����������� ������������������ Intent.FALG_ACTIVITY_CLEAR_WHEN_TASk_RSET����������� ������������������
•http://theeye.pe.kr/archives/1298����������� ������������������
•Intent.ACTION_SEND
Broadcast����������� ������������������ Intent
•device����������� ������������������ is����������� ������������������ charing����������� ������������������
•finished����������� ������������������ rebooting����������� ������������������
•sendBroadcast����������� ������������������
•receiver����������� ������������������
•intent����������� ������������������ filters
Manifest����������� ������������������ vs����������� ������������������ Dynamic
top related