<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>달콤 쌉싸래한 인생 &#187; Application Fundamentals</title>
	<atom:link href="http://jongsunkim.pe.kr/archives/category/mobile/android/application-fundamentals/feed" rel="self" type="application/rss+xml" />
	<link>http://jongsunkim.pe.kr</link>
	<description>Be fully awake if you want to dream</description>
	<lastBuildDate>Sun, 22 Apr 2012 12:02:24 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>컴포넌트 생명주기</title>
		<link>http://jongsunkim.pe.kr/archives/692</link>
		<comments>http://jongsunkim.pe.kr/archives/692#comments</comments>
		<pubDate>Fri, 05 Mar 2010 03:56:45 +0000</pubDate>
		<dc:creator>Kim Jong-seon</dc:creator>
				<category><![CDATA[Application Fundamentals]]></category>

		<guid isPermaLink="false">http://jongsunkim.pe.kr/?p=692</guid>
		<description><![CDATA[애플리케이션 컴포넌트는 생명주기를 가진다. &#8211; 그 생명주기는 인텐트에 응답하기 위해 안드로이드가 컴포넌트를 인스턴스화 할 때 시작해서, 그 인스턴스가 파괴될 때 끝난다. 앤티비티의 경우에는 그 사이에 활성화되거나 비활성화될 수도 있으며, 사용자에게 보이거나 보이지 않을 수 있다. &#8211; 액티비티, 서비스, 브로트캐스트 리시버에 대한 생명주기를 설명한다. 액티비티 생명주기 액티비티는 필수적으로 세 가지 상태를 가지고 있다. 활성화(active) 또는 실행 [...]]]></description>
			<content:encoded><![CDATA[<p>애플리케이션 컴포넌트는 생명주기를 가진다. &#8211; 그 생명주기는 인텐트에 응답하기 위해 안드로이드가 컴포넌트를 인스턴스화 할 때 시작해서, 그 인스턴스가 파괴될 때 끝난다. 앤티비티의 경우에는 그 사이에 활성화되거나 비활성화될 수도 있으며, 사용자에게 보이거나 보이지 않을 수 있다. &#8211; 액티비티, 서비스, 브로트캐스트 리시버에 대한 생명주기를 설명한다.</p>
<h2>액티비티 생명주기</h2>
<p>액티비티는 필수적으로 세 가지 상태를 가지고 있다.</p>
<ul>
<li>활성화(active) 또는 실행 중(running)인 상태</li>
<li>멈춤(paused) 상태</li>
<li>정지(stopped) 상태</li>
</ul>
<p>액티비티가 멈춤상태이거나 또는 정지상태라면, 시스템은 finish() 메소드를 호출함으로써 그것을 종료하게 하거나 또는 간단하게 해당 프로세스를 죽이는 방식으로 그것을 메모리에서 제거할 수 있다. 그리고 그것이 사용자에게 다시 보여지게 될 때, 그것은 완전하게 다시 시작되고 이전의 상태로 복구되어야 한다.</p>
<p>액티비티의 상태가 변할 때면, 그것은 다음과 같은 프로텍티드(protected)메소드가 호출됨으로써 그 변화가 통보된다.</p>
<ul>
<li>void onCreate(Bundle savedInstanceState)</li>
<li>void onStart()</li>
<li>void onRestart()</li>
<li>void onResume()</li>
<li>void onPause()</li>
<li>void onStop()</li>
<li>void onDestroy()</li>
</ul>
<p>이러한 모든 메소드는 액티비티의 상태가 변할 때, 적절한 작업을 수행하기 위해 오버라이드(override)할 수 있는 것이다. 모든 액티비티는 오브젝트가 최초로 인스턴스화 될 때 초기화를 설정하기 위한 onCreate()를 구현해야 한다. 많은 액티비티들이 데이터 변경을 저장하기 위해, 다른 경우로는 사용자와의 상호작용 중지를 준비하기 위해, onPause()를 구현할 것이다.</p>
<p>이러한 7가지의 메소드들이 함께 사용되어서, 하나의 액티비티에 대한 전체 생명주기가 정의된다. 이곳에는 구것들을 구현함으로써 모니터링할 수 잇는 3개의 네스티드 루프(nested loop)가 존재한다.</p>
<ul>
<li>액티비티의 인타이어 라이프타임(entire lifetime)은 onCreate()에 대한 첫번째 호출에서 onDestroy()에 대한 한번의 마지막 호출 사이에서 발생한다.</li>
<li>액티비티의 비저블 라이프타임(visible lifetime)은 onStart()에 대한 호출에서 그에 대응되는 onStop() 호출 사이에서 발생한다.</li>
<li>액티비티의 포어그라운드 라이프타임(foreground lifetime)은 onResume()의 호출과 그에 대응되는 onPause() 호출 사이에서 발생한다.</li>
</ul>
<p>아래 다이어그램은 이러한 루프들과 하나의 액티비티가 상태들을 이동해 가는 경로를 설명한다. 채색된 타원들은 액티비티가 존재하게 되는 주요 상태들이다. 직사각형들은 상태들 사이를 변화해 갈 때 오퍼레이션들을 수행하기 위해 구현할 수 있는 콜백(callback) 메소드를 나타낸다.</p>
<p><a href="http://jongsunkim.pe.kr/wp-content/uploads/2010/03/activity_lifecycle.png"><img class="alignnone size-full wp-image-694" title="activity_lifecycle" src="http://jongsunkim.pe.kr/wp-content/uploads/2010/03/activity_lifecycle.png" alt="" width="545" height="711" /></a></p>
<p>- 출처</p>
<p><a href="http://developer.android.com/guide/topics/fundamentals.html">http://developer.android.com/guide/topics/fundamentals.html</a></p>
<p>안드로이드 입문서 3rd edition</p>
]]></content:encoded>
			<wfw:commentRss>http://jongsunkim.pe.kr/archives/692/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>안드로이드 애플리케이션의 4가지 유형 컴퍼넌트</title>
		<link>http://jongsunkim.pe.kr/archives/678</link>
		<comments>http://jongsunkim.pe.kr/archives/678#comments</comments>
		<pubDate>Wed, 03 Mar 2010 05:17:03 +0000</pubDate>
		<dc:creator>Kim Jong-seon</dc:creator>
				<category><![CDATA[Application Fundamentals]]></category>

		<guid isPermaLink="false">http://jongsunkim.pe.kr/?p=678</guid>
		<description><![CDATA[액티비티 서비스 브로드캐스트 리시버 컨텐트 프로바이더]]></description>
			<content:encoded><![CDATA[<p>액티비티</p>
<p>서비스</p>
<p>브로드캐스트 리시버</p>
<p>컨텐트 프로바이더</p>
]]></content:encoded>
			<wfw:commentRss>http://jongsunkim.pe.kr/archives/678/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

