๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ

Android & Kotlin

Lesson 4: Activity & Fragment Lifecycle

Udacity ์—์„œ Developing Android Apps with Kotlin ์ด๋ผ๋Š” ๊ฐ•์˜๋ฅผ ๋“ฃ๊ณ  lesson ๋ณ„๋กœ ์ค‘์š”ํ•˜๋‹ค๊ณ  ์ƒ๊ฐํ•œ ๋ถ€๋ถ„์„ ํ•„๊ธฐํ•œ ๋‚ด์šฉ์ด๋‹ค. 
์˜์–ด ๊ฐ•์˜๋ฅผ ๋“ฃ๊ณ  ํ•„๊ธฐํ•œ ๋‚ด์šฉ์ด๋‹ค ๋ณด๋‹ˆ ๋ฒˆ์—ญ์ด๋‚˜ ํ•ด์„์ด ์ž˜๋ชป๋œ ๋ถ€๋ถ„์ด ์žˆ์„ ์ˆ˜ ์žˆ๋‹ค. ๋˜ ์ผ๋ถ€๋Š” ์˜์–ด ๋‹จ์–ด๋‚˜ ๋ฌธ์žฅ์„ ๊ทธ๋Œ€๋กœ ์ ์–ด๋†“์•˜๋‹ค. 
์ •ํ™•ํ•œ ๋‚ด์šฉ์€ ๊ฐ•์˜๋ฅผ ์ง์ ‘ ์ฐธ๊ณ ํ•˜๋Š” ๊ฒƒ์„ ๊ถŒํ•œ๋‹ค.

 

Developing Android Apps with Kotlin | Udacity Free Courses

Take Udacity's free online course and learn Android development with Kotlin. Master the fundamentals of the Kotlin programming language taught by Kotlin experts at Google.

www.udacity.com


2. Why Track Activity State?

๋ชจ๋“  activity์™€ fragment๋Š” lifecycle์ด ์กด์žฌํ•œ๋‹ค. activity lifecycle์€ activity๊ฐ€ ๊ฑฐ์น˜๋Š” ๋‹ค๋ฅธ ์ƒํƒœ๋“ค๋กœ ๊ตฌ์„ฑ๋˜์–ด ์žˆ๋Š”๋ฐ ์ฒ˜์Œ ์ดˆ๊ธฐํ™”๋ถ€ํ„ฐ destroy๋  ๋•Œ๊นŒ์ง€ ์ด๋‹ค. ์‚ฌ์šฉ์ž๊ฐ€ ํฐ์„ ์‚ฌ์šฉํ•  ๋•Œ ์•ฑ์ด ์ž˜ ๋™์ž‘ํ•˜๊ณ  ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋ Œ๋”๋˜๋Š” ๊ฒƒ์ด ์ค‘์š”ํ•˜๋‹ค. activity๋“ค๊ณผ fragment๋“ค์€ ์ œํ•œ๋œ OS์˜ ์ž์›๋“ค์„ ์‚ฌ์šฉํ•˜๋Š” ๊ฒƒ์„ ๋ฐฉ์ง€ํ•จ์œผ๋กœ ๊ทธ๋ ‡๊ฒŒ ํ•  ์ˆ˜ ์žˆ๋‹ค. 

์•ˆ๋“œ๋กœ์ด๋“œ OS๋Š” ๋ฐฐํ„ฐ๋ฆฌ์™€ ์•ฑ ์„ฑ๋Šฅ์„ ํ–ฅ์ƒ์‹œํ‚ค๊ธฐ ์œ„ํ•ด์„œ activity์˜ state๋ฅผ ๊ด€์ฐฐํ•œ๋‹ค. ๊ทธ๋ž˜์„œ OS๋Š” ๋•Œ๋•Œ๋กœ behind the scenes์—์„œ ์•ฑ์„ ์ค‘์ง€์‹œํ‚ค๊ฑฐ๋‚˜ ์žฌ์‹œ์ž‘ํ•œ๋‹ค. ๋”ฐ๋ผ์„œ ํ”„๋กœ๊ทธ๋žจ์€ proactive, defensiveํ•ด์•ผํ•œ๋‹ค. 
- proactive(์‚ฌ์ „์— ๋Œ€์ฒ˜ํ•˜๋Š”): clean up unused resources => onscreen activity๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋™์ž‘ํ•˜๊ฒŒ ํ•œ๋‹ค. 
- defensive(๋ฐฉ์–ด์— ๋„์›€์ด ๋˜๋Š”): OS๊ฐ€ ์•ฑ์„ ์žฌ์‹œ์ž‘ํ•˜๋Š” ๊ฒƒ๊ณผ ๊ฐ™์€ ๋™์ž‘์— ๋Œ€์‘. 

์ด๋ ‡๊ฒŒ ๋ชจ๋“  ๊ฒƒ์„ handling ํ•˜๋ ค๋ฉด knowing exactly what's going on behind the scenes with activity state and the Android OS ๊ฒƒ์ด ํ•„์š”ํ•˜๋‹ค. 

3. Exercise: Introduction to the Activity Lifecycle Diagram

์ด๋ฆ„์ด ๊ฐ€๋ฆฌํ‚ค๋Š” ๊ฒƒ์ฒ˜๋Ÿผ ์œ„์˜ states๋Š” activity์˜ ์ƒํƒœ๋ฅผ ๋‚˜ํƒ€๋ƒ„. 

์ด ๋ฉ”์†Œ๋“œ๋“ค์€ activity๊ฐ€ ํ•œ ์ƒํƒœ์—์„œ ๋‹ค๋ฅธ ์ƒํƒœ๋กœ ์ด๋™ํ•  ๋•Œ ํ˜ธ์ถœ๋œ๋‹ค.
์–ธ์ œ ์ด ๋ฉ”์†Œ๋“œ๋“ค์ด ํ˜ธ์ถœ๋˜๋Š”์ง€, ๊ฐ ์ฝœ๋ฐฑ์ด ๋ฌด์—‡์„ ํ•˜๋Š”์ง€๋ฅผ ์•„๋Š” ๊ฒƒ์€ ์ค‘์š”ํ•˜๋‹ค. 

4. Exercise: Introduction to Logging

5. Exercise: The Application Class and Timber

Timber: Logging ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ

Timber์˜ ์ด์ 

  1. tags๋ฅผ ์ƒ์„ฑํ•ด์คŒ. 
  2. ์•ฑ ๋ฐฐํฌ์‹œ์— apk์— log๊ฐ€ ํฌํ•จ๋˜๋Š” ๊ฒƒ์„ ๋ฐฉ์ง€ํ•จ.
  3. ํฌ๋ž˜์‹œ ๋ฆฌํฌํŠธ์™€์˜ ํ†ตํ•ฉ์ด ์‰ฌ์›€. 

Application Class๋Š” ์ „์ฒด ์•ฑ์— ๋Œ€ํ•œ global application state๋ฅผ ๊ฐ–๊ณ  ์žˆ๋Š” ๋ฒ ์ด์Šค ํด๋ž˜์Šค๋กœ OS๊ฐ€ ์•ฑ๊ณผ ์ƒํ˜ธ์ž‘์šฉํ•˜๊ธฐ ์œ„ํ•œ main object์ด๊ธฐ๋„ ํ•˜๋‹ค. OS์—์„œ ์‚ฌ์šฉํ•˜๋Š” default apllication class๊ฐ€ ์žˆ์ง€๋งŒ subclass๋กœ ํŠน์ • setup๋„ ๊ฐ€๋Šฅํ•˜๋‹ค. 

6. Lifecycle: Open and Close

onDestory์˜ ๊ฒฝ์šฐ activity๊ฐ€ ์™„์ „ํžˆ shutdown ๋˜์—ˆ๊ณ  garbage collect(๋” ์ด์ƒ ์‚ฌ์šฉํ•˜์ง€ ์•Š๋Š” object๋“ค์„ ์ž๋™์œผ๋กœ cleanup ํ•˜๋Š” ๊ฒƒ) ๋  ์ˆ˜ ์žˆ๋‹ค๋Š” ๊ฒƒ. 

7. Lifecycle: Share dialog

onStart: onStart is called when the activity becomes visible
onResume: OnResume is called when the activity has *focus
onPause: onPause is called when the activity loses focus.
onStop: onStop is called when the activity goes off screen
*Having focus is when you actually interact with the activity

8. onCreate vs. onStart

onPause, onStop, onDestroy๊ฐ€ ํ˜ธ์ถœ๋˜๋ฉด ๊ฐœ๋ฐœ์ž๊ฐ€ ๋ญ”๊ฐ€๋ฅผ cleanup ํ•ด์•ผํ•œ๋‹ค๋Š” ์‹ ํ˜ธ. (cleanup resources)
onStart, onResume, onCreate๊ฐ€ ํ˜ธ์ถœ๋˜๋ฉด ํ•„์š”ํ•œ resources๋“ค์„ ๋‹ค์‹œ ์‚ฌ์šฉํ•˜๋Š” ์ฝ”๋“œ๋ฅผ ์ž‘์„ฑํ•  ์ˆ˜ ์žˆ์Œ. (setup resources)

12. Exercise: Setup and Teardown

๋งŒ์•ฝ resource๋ฅผ setup ํ–ˆ๋‹ค๋ฉด, ๊ธฐ์–ตํ–ˆ๋‹ค๊ฐ€ ํ•ด์ฒด/ํŒŒ๊ดด(teardown) ํ•˜๋Š” ๊ฒƒ์„ ์žŠ์–ด๋ฒ„๋ ค์„œ๋Š” ์•ˆ๋œ๋‹ค. 
setup/tear down์€ ๋Œ€์‘ํ•˜๋Š”/mirrored method์—์„œ ์ง„ํ–‰ํ•ด์•ผํ•œ๋‹ค. e.g.) onStart <-> onStop, onCreate <-> onDestroy

13. Introduction to the Lifecycle Library

์ˆ˜๋งŽ์€ ๊ฒƒ๋“ค์„ onCreate / onStart์—์„œ setupํ•˜๊ณ  onDestroy / onStop์—์„œ tear down ํ•ด์•ผํ•˜๋Š”๋ฐ ํ•˜๋‚˜๋ผ๋„ ์ œ๋Œ€๋กœ ์ฒ˜๋ฆฌํ•˜์ง€ ์•Š์œผ๋ฉด ๋ฒ„๊ทธ๋กœ ์ด์–ด์ง€๊ฑฐ๋‚˜ ๊ณจ์นซ๊ฑฐ๋ฆฌ๊ฐ€ ๋˜๊ธฐ ์‹ญ์ƒ์ด๋‹ค. 

๋งŒ์ผ ์•Œ์•„์„œ ์ œ๋•Œ์— start / stop ํ•  ์ˆ˜ ์žˆ๋‹ค๋ฉด ์–ผ๋งˆ๋‚˜ ์ข‹์„๊นŒ?

๊ทธ๋ž˜์„œ 2017๋…„ ๊ตฌ๊ธ€์—์„œ๋Š” Lifecycle library๋ฅผ ์†Œ๊ฐœํ–ˆ๋‹ค. 
๋ชฉํ‘œ๋Š” activitiy์™€ fragment์˜ Lifecycle์„ ๋‹จ์ˆœํ™”ํ•˜์—ฌ ์ž‘์—…ํ•˜๊ธฐ ์œ„ํ•จ์ด๋‹ค. 

Lifecycle library ์ด์ „์—๋Š” fragment์™€ activity lifecycle๊ณผ interactํ•  ์ˆ˜ ์žˆ๋Š” ๋ฐฉ๋ฒ•์€ callback์„ ์ด์šฉํ•˜๋Š” ๊ฒƒ์ด์—ˆ๋Š”๋ฐ, lifecycle library๋Š” ์‹ค์ œ object๋ฅผ ๋„์ž…ํ•˜์˜€๋‹ค. ์ด object๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ queryํ•˜๊ฑฐ๋‚˜ state๋ฅผ ํ™•์ธํ•  ์ˆ˜ ์žˆ๋‹ค. 

LifecycleOwner์™€ LifecycleObserver interface๋ฅผ ์†Œ๊ฐœํ•˜์˜€๋Š”๋ฐ LifecycleOwner is a class that has a Lifecycle(Fragment & Activitiy). LifecycleObserver๋Š” object๊ฐ€ LifecycleOwner๋ฅผ ๊ด€์ฐฐํ•  ์ˆ˜ ์žˆ๊ฒŒ ํ•ด์ค€๋‹ค. 

14. Exercise: Lifecycle Observation

๊ฐ•์˜ ์ค‘ ๋‚˜์˜จ ๋„ํ‘œ๋ฅผ ์ง์ ‘ ์†์œผ๋กœ ๊ทธ๋ฆฐ ๊ฒƒ

callback์„ ์‚ฌ์šฉํ•  ๋•Œ๋Š” MainActivity๊ฐ€ timer๋ฅผ ์‹œ์ž‘ํ•  ๊ฒƒ์ธ์ง€ ๋ฉˆ์ถœ ๊ฒƒ์ธ์ง€ ๊ด€์—ฌํ–ˆ์ง€๋งŒ observer๋ฅผ ์‚ฌ์šฉํ•˜๋ฉด ๊ด€๊ณ„๊ฐ€ ๋’ค๋ฐ”๋€๋‹ค. (์˜ˆ์ œ ์•ฑ์— ํƒ€์ด๋จธ ๊ธฐ๋Šฅ์ด ์žˆ์Œ.) Timer๊ฐ€ activity์˜ observer๊ฐ€ ๋œ๋‹ค. activity์˜ state๊ฐ€ ๋ณ€ํ•˜๋ฉด Timer๋Š” ์•Œ๋ฆผ์„ ๋ฐ›๋Š”๋‹ค. ๊ทธ๋Ÿฌ๋ฉด ๊ทธ state๊ฐ€ ๋ฐ”๋€ ๊ฒƒ์— ๋Œ€ํ•ด ๋ฌด์—‡์„ ํ•  ๊ฒƒ์ธ๊ฐ€๋Š” Timer์˜ ์ฑ…์ž„์ด๋‹ค. ์˜ˆ์ œ์˜ ๊ฒฝ์šฐ ์Šค์Šค๋กœ start ํ•  ๊ฒƒ์ธ์ง€ stop ํ•  ๊ฒƒ์ธ์ง€ ๊ฒฐ์ •ํ•œ๋‹ค. 

์ฆ‰ Timer๊ฐ€ MainActivity๋ฅผ observeํ•˜๊ณ  MainActivity์˜ ์ƒํƒœ์— ๋”ฐ๋ผ ์ž์‹ ์ด ๋ฌด์—‡์„ ํ•  ๊ฒƒ์ธ์ง€ ๊ฒฐ์ •ํ•˜๊ฒ ๋‹ค๋Š” ๊ฒƒ์ด๋‹ค. 

15. Process Shutdown

์•ˆ๋“œ๋กœ์ด๋“œ ๊ธฐ๊ธฐ์—์„œ ์ž ๊น ์•ฑ์„ ๋– ๋‚ฌ๋‹ค๊ฐ€ ๋Œ์•„์˜จ๋‹ค๊ณ  ๋ฐ์ดํ„ฐ๊ฐ€ ์‚ฌ๋ผ์ง€์ง„ ์•Š์ง€๋งŒ ์•ˆ๋“œ๋กœ์ด๋“œ OS์˜ ์ฃผ๋œ ๊ด€์‹ฌ์‚ฌ, ์ค‘์š”ํ•œ ๋ฌธ์ œ ์ค‘ ํ•˜๋‚˜๋Š” foreground์˜ activity๋ฅผ smoothํ•˜๊ฒŒ ๋™์ž‘์‹œํ‚ค๋Š” ๊ฒƒ์ด๋‹ค. OS๋Š” foreground์˜ ์•ฑ์„ issue ์—†์ด ๋™์ž‘ํ•˜๊ฒŒ ํ•˜๊ธฐ ์œ„ํ•ด Background์˜ ์•ฑ์„ regulateํ•œ๋‹ค. ์—ฌ๊ธฐ์—๋Š” ๋™์ž‘ํ•˜๋Š” app์˜ ์ˆซ์ž๋ฅผ ์ œํ•œํ•˜๋Š” ๊ฒƒ๋„ ํฌํ•จ๋œ๋‹ค. ํŠน์ • ์ƒํ™ฉ์—์„œ๋Š” ์ „์ฒด ์•ฑ์˜ ํ”„๋กœ์„ธ์Šค๋ฅผ shutdown์‹œํ‚จ๋‹ค. ๊ทธ๋Ÿฐ๋ฐ ์‚ฌ์šฉ์ž๊ฐ€ ์•ฑ์ด shutdown๋œ ๊ฒƒ์„ ์•Œ์•„์ฑˆ๋‹ค๋ฉด ์ข‹์€ ์‚ฌ์šฉ์ž ๊ฒฝํ—˜์ด ์•„๋‹ ๊ฒƒ์ด๋‹ค. ๋”ฐ๋ผ์„œ ๋‹ค์‹œ app์œผ๋กœ ์ด๋™ํ•˜๋ฉด ์•ฑ์„ ๋‹ค์‹œ ์žฌ์‹œ์ž‘ํ•ด์ค€๋‹ค. OS๋Š” ์ž๋™์œผ๋กœ ์ผ๋ถ€ UI์ •๋ณด๋“ค์„ ํ”„๋กœ์„ธ์Šค๊ฐ€ ์žฌ์ƒ์„ฑ๋˜์—ˆ์„ ๋•Œ๋ฅผ ์œ„ํ•ด์„œ ์ €์žฅํ•ด๋‘”๋‹ค. acitivity์˜ ์ •ํ™•ํ•œ ์ด์ „ ์ƒํƒœ๋ฅผ ๋ณต๊ตฌํ•˜๋Š”๋ฐ์—๋Š” ๋Œ€๊ฐœ ๊ฐœ๋ฐœ์ž์˜ ์ž‘์—…์ด ํ•„์š”ํ•˜๋‹ค. 

16. Process Shutdown

์•ˆ๋“œ๋กœ์ด๋“œ OS๋Š” ์•ฑ์„ ์žฌ์‹œ์ž‘ํ•  ๋•Œ ์ด์ „ ์ƒํƒœ ๊ทธ๋Œ€๋กœ ๋ณต์›ํ•˜๊ธฐ ์œ„ํ•ด ์ตœ์„ ์„ ๋‹คํ•œ๋‹ค. OS๋Š” activity์—์„œ navigate awayํ•  ๋•Œ ์ผ๋ถ€ views์˜ ์ •๋ณด๋ฅผ Bundle(key:value pair๋กœ ์ €์žฅ)์— ์ €์žฅํ•œ๋‹ค. ์˜ˆ๋ฅผ ๋“ค๋ฉด ID set์ด ๋“ค์–ด์žˆ๋Š” EDIT TEXT์˜ ๊ฒฝ์šฐ ์ž๋™ ์ €์žฅ๋œ๋‹ค. ๋˜ backstack๋„ ์ €์žฅํ•ด์ค€๋‹ค. ๊ทธ๋Ÿฐ๋ฐ OS๊ฐ€ activity์˜ ๋ชจ๋“  ๋ฐ์ดํ„ฐ๋ฅผ ๋ชจ๋ฅด๋Š” ๊ฒฝ์šฐ๋„ ์žˆ๋‹ค. custom variable๊ฐ™์€ ๊ฒฝ์šฐ๊ฐ€ ๊ทธ๋Ÿฌํ•˜๋‹ค. ๊ทธ๋ž˜์„œ ์ด ๊ฒฝ์šฐ manually add the data to the bundle yourself๊ฐ€ ํ•„์š”ํ•˜๋‹ค. 

17. Exercise: onSaveInstanceState

onSaveInstanceState๋Š” OS๊ฐ€ app์„ destroyํ•  ๊ฒฝ์šฐ์— ํ•„์š”ํ•œ ๋ฐ์ดํ„ฐ๋ฅผ ์ €์žฅํ•  ์ˆ˜ ์žˆ๋Š” callback์ด๋‹ค. onStop ๋’ค์— ํ˜ธ์ถœ๋œ๋‹ค. System์€ ์ด bundle์„ RAM์— ๊ฐ€์ง€๊ณ  ์žˆ๋‹ค. ๋”ฐ๋ผ์„œ bundle๋‚ด์˜ ๋ฐ์ดํ„ฐ ํฌ๊ธฐ๋ฅผ ์ค„์ด๋Š” ๊ฒƒ์ด ์ข‹๋‹ค. Bundle์˜ ํฌ๊ธฐ๋Š” ์ œํ•œ๋˜์–ด ์žˆ๋‹ค. 100kb์•„๋ž˜๋กœ ์ €์žฅํ•ด์•ผํ•œ๋‹ค. ์ด๊ฒƒ์„ ๋„˜์–ด๊ฐ€๋ฉด ์•ฑ์ด transactionTooLargeException์œผ๋กœ crash๋  ์œ„ํ—˜์ด ๋†’์•„์ง„๋‹ค.

- ์•ฑ์ด ์ฒ˜์Œ ์‹คํ–‰๋œ๋‹ค๋ฉด onCreate(saveInstanceBundle: Bundle?)์—์„œ saveInstanceBundle์ด null์ผ ๊ฒƒ์ด๋‹ค. ๋”ฐ๋ผ์„œ != null์„ ํ†ตํ•ด ์ฒ˜์Œ ์‹คํ–‰๋œ ๊ฒƒ์ธ์ง€ recreating ๋œ ๊ฒƒ์ธ์ง€๋ฅผ ๋ถ„๋ณ„ํ•  ์ˆ˜ ์žˆ๋‹ค. 

- onRestoreInstanceState๋„ savedInstanceBundle๊ณผ ํ•จ๊ป˜ ํ˜ธ์ถœ๋œ๋‹ค. ๊ทธ๋Ÿฐ๋ฐ ๋ณดํ†ต onCreate์—์„œ activity state๋ฅผ ๋ณต์›ํ•œ๋‹ค. ์™œ๋ƒํ•˜๋ฉด onRestoreInstanceState๋Š” onStart ํ›„์— ํ˜ธ์ถœ๋˜๊ธฐ ๋•Œ๋ฌธ์ด๋‹ค. ํ•˜๋‹จ์˜ Lifecycle ์ •๋ฆฌ ๋„ํ‘œ ์ฐธ์กฐ. 

18. Configuration Changes

Rotate screen is considered a configuration change. Configuration change is a major change a device undergoes that causes the activity to be rebuilt. 

์—ฌ๊ธฐ์—๋Š” ์‚ฌ์š”์ž๊ฐ€ ๊ธฐ๊ธฐ์˜ ์–ธ์–ด๋ฅผ ๋ฐ”๊พธ๋Š” ๊ฒƒ, ๋ฌผ๋ฆฌ์  ํ‚ค๋ณด๋“œ์— ์—ฐ๊ฒฐํ•˜๋Š” ๊ฒƒ, ๊ธฐ๊ธฐ์˜ ๋ฐฉํ–ฅ ๋ณ€๊ฒฝํ•˜๋Š” ๊ฒƒ์ด ํฌํ•จ๋œ๋‹ค. 

onSaveInstanceState()์—์„œ super method ํ˜ธ์ถœํ•˜์ง€ ์•Š์œผ๋ฉด ๊ธฐ๋ณธ์ ์œผ๋กœ ์ €์žฅ๋˜๋„๋ก ์ฒ˜๋ฆฌ๋˜๋Š” ๋ฐ์ดํ„ฐ๋“ค์ด ์ €์žฅ๋„์ง€ ์•Š์•„ ๋‚˜์ค‘์— ๋ณต๊ตฌ๋˜์ง€ ์•Š์„ ์ˆ˜ ์žˆ๋‹ค. 

 

Lifecycle ์ •๋ฆฌ ๋„ํ‘œ

Lesson 4์—์„œ ๋‚˜์˜ค๋Š” Activity Lifecycle ๊ด€๋ จ ๋ฉ”์†Œ๋“œ ์„ค๋ช…์„ ํ•œ ๊ทธ๋ฆผ์— ์ง์ ‘ ๋‹ค ๋ชจ์•„๋†“์€ ๊ฒƒ

 

'Android & Kotlin' ์นดํ…Œ๊ณ ๋ฆฌ์˜ ๋‹ค๋ฅธ ๊ธ€

Lesson 5: App Architecture(UI Layer)  (0) 2022.02.22
๊ณต๋ถ€ ์ฃผ์ œ  (0) 2022.02.19
Lesson 3: App Navigation  (0) 2022.02.08
Lesson 2: Layouts  (0) 2022.02.06
Lesson 1: Build your First App  (0) 2022.02.06