PMP 자격증 시험 관련 요약서

1267271949_PDC_PMPHandbook.pdf

2009년 정보시스템감리사 기출문제

1267267422_2009감리사시험문제(공지).hwp

정보시스템감리사

정보시스템감리사는 정보시스템 전반을 알아야 하는 고급 기술자다.

정보시스템감리사는 정보시스템의 구축 운영에 관한 사항을 종합적으로 점검 평가하고 개선이 필요한 사항을 감리하여 의뢰인에게 권고하는 직업이다. 건축에서 감리를 통해 잘못된 건축물의 문제점을 개선하고 제대로 된 건축물을 짓도록 하는 것처럼 전산 시스템에서도 감리를 통해 잘못된 시스템을 개선하고 제대로 된 시스템을 구축하도록 하는 것이 정보시스템감리의 목적이다.

정보화시대가 진전되면서 정보시스템은 기업이나 기관의 가장 중요한 자산이 되어가고 있다. 기업의 영업 비밀, 인사 기록, 고객 자료 등 각종 중요 정보가 모두 정보시스템 안에 저장되어 있다. 이런 정보시스템은 매우 편리하지만 보안에 취약성이 있기 때문에 사고가 발생할 경우 큰 손실을 가져온다. 이런 손실을 막기 위해서 정보시스템감리가 필요하다. 실제 정보시스템 구축과 운용에서 만나는 많은 위험 요인을 통제하고 시스템에 맞는 설정과 운영에 대한 적절한 방법론을 확립해야 하며, 이를 적용하는 정보시스템 감리 요원이 필요한 것이다.

정보시스템감리는 정보화 추진 방향을 설정하는 기본 설계부터, 정보시스템개발 및 운영상의 효율성, 자료의 신뢰성 및 안전성 등을 종합적으로 검토해 정보시스템 구축과 운영에서 나타날 수 있는 문제점을 사전에 예방하는 작업이다. 정보화시대를 맞이하여 정보자산의 가치가 기업과 기관에서 차지하는 중요성이 커지면서 정보시스템감리의 필요성도 함께 커지고 있다.

정보시스템감리사는 한국전산원이나 민간 감리법인에서 근무한다. 민간 감리법인은 감리 전문 법인으로 존재하기도 하지만 SI업체나 컨설팅 업체에서 감리 업무를 수행하는 경우도 많다. 꽤 많은 감리사들이 SI 업체나 컨설팅 업체의 직원으로 일하면서 컨설팅과 감리 업무를 수행한다.
일반적으로 국내 정보시스템에 대한 주요 공공 프로젝트에 대해서는 한국전산원에서 국가정보화 감리업무를 수행하고 있다. 기업의 경우에는 최근 정보시스템의 감리를 전문적으로 수행하는 민간법인들이 활동을 하고 있다. 2002년에는 20~30개 사이의 감리법인이 활동했으나 이 수는 점차 증가하고 있다.

특히 국가 정보화사업의 원활한 수행과 부실방지를 위해 일정 규모 이상의 주요 공급 프로젝트에 대한 감리실시가 의무화되면서 정보시스템의 감리 시장은 큰 폭으로 성장하고 있다. 따라서 앞으로 정보시스템감리사의 수요는 계속 증가할 전망이다.

감리 업무는 정보시스템의 기획 개발 운영 및 유지 보수 단계 별로 구분하여 수행한다. 정보시스템감리사는 정보시스템 감리 요청이 들어오면 관련 자료를 제출받아 감리를 실시하고 감리보고서를 작성하여 감리 의뢰인에게 통보한다. 이 과정에서 시스템의 분석, 설계, 개발이 제대로 이루어지고 있는지, 시스템의 설계 원칙과 사양에 준거하여 정보시스템이 구축 이행되는지, 정보 자산을 보호하기 위한 요건을 충족하는지를 평가 확인한다. 물론 이 과정에서 미비한 부분은 지속적으로 수정해 시스템의 완전성을 높여나가도록 유도한다.


정보시스템감리사는 40대, 50대 활동 비중이 더욱 많으며 최고의 보수를 받는 직종이다.

정보시스템감리사 관련자격증으로는 한국산업인력공단에서 시행하는 정보관리기술사, 정보처리기사, 정보처리산업기사, 전자계산조직응용기술사, 전자계산기조직응용기사, 전자계산기조직응용산업기사, 정보기술산업기사 등이 있다. 그러나 이 자격증은 기초적인 자격증으로 이 자격증을 취득한다고 해서 정보시스템감리사가 되는 것은 아니다.

해외에서 발행하는 국제자격증으로는 정보시스템감사통제협회(ISACA :Information Systems Audit and Control Association)에서 시행하는 국제공인정보시스템감사사(CISA :Certified Information Systems Auditor) 자격증이 있다. 이 자격증은 세계적으로 널리 인정되는 자격증으로 희소성이 높지만 취득하기 매우 어려운 자격증이다. CISA를 취득한 사람은 국내에서도 소수에 불과해 개인의 능력 향상에 큰 도움이 되며, CISA를 취득한다면 고액 연봉을 받는 정보시스템감리사로 활동할 수 있다.

그외 한국전산원에서 수여하는 국가공인 정보시스템감리사 자격증이 있는데 아무나 취득할 수 있는 것이 아니다. 정보통신 분야에서 일정 수준 이상의 자격을 갖춘 지원자를 선발하여 교육을 실시한 후에, 정보시스템 감리 관련 전문가로 구성된 정보시스템감리사 평가위원회의 심사를 거쳐 수여한다. 따라서 현장에서 꽤 오랜 기간 근무한 사람이 취득할 수 있는 자격증이다.

정보시스템감리사는 정보 시스템의 모든 것을 감리해야 하므로 상당한 수준의 기술력이 필요하다. 시스템 분석, 설계, 개발, 운영, 보수, 유지에 필요한 모든 지식을 갖추어야만 감리가 가능하기 때문이다. 이 때문에 정보시스템의 감리 활동을 할 수 있으려면 특급 기술자 수준 이상이 되어야 한다.

감리사로 활동하기 배워야 할 내용은 다양하다. 정보시스템의 감사업무 프로세스, 정보시스템의 관리, 계획, 조직, 기술 하부구조, 운영실무, 정보자산의 보호, 재해복구, 응용시스템 개발, 구입, 구현, 유지 보수, 업무 프로세스평가, 위험관리, 프로젝트 관리, 감리보고서 작성법 등을 배우는데 시스템에 대한 전반적인 내용을 배운다고 보면 된다.

요구하는 능력이 크고 매우 중요하고 전문적인 일인 관계로 다른 IT 직종에 비해 보수는 매우 높다. 종사자 평균이 월 345만원으로 IT 직종에서는 매우 높은 보수를 받고 있는 직종이다. 더구나 감리 의무화로 일감은 증가하는 반면 인력은 부족해 정보시스템감리사의 보수는 계속 상승하고 있다.

정보시스템감리사는 고졸 이하가 0%, 전문대졸 이하가 2%로 저학력층이 거의 없는 반면 대학원졸 이상이 34%나 되는 고학력 직종이다. 전공은 컴퓨터/통신이 41%, 경영/경제가 29%를 차지한다. 기본적으로 정보시스템감리사로 활동하기 위해서는 4년제 이상의 대학에서 전산계통관련 전공을 하거나, 관련 자격을 취득하는 것이 기본이다. 하지만 무엇보다 현장에서의 다양한 실무경험이 뒷받침되어야 한다. 다양한 현장 경험이 없다면 감리 활동을 수행하기 어렵다.

다양한 현장경험이 필요하다는 것을 증명하는 것은 연령층 비율이다. 일반적으로 지금까지 소개한 대부분의 IT 직종은 20대와 30대 비율이 거의 100%에 달하고 40대 이상은 거의 없는 반면 정보시스템 감리 직종은 거꾸로 40대 비율이 36%로 가장 높고, 50세 이상 고연령자도 31%나 된다. 반면 20대는 10%에 불과하고 30대도 23%에 불과하다. 즉 정보시스템감리사는 많은 경험이 필요한 분야라는 뜻이다. 이 때문에 개발자, 프로그래머, IT컨설턴트 등의 다양한 직종으로 취업했던 IT 종사자의 상당수가 정보시스템감리사를 목표로 경력을 쌓고 있다.

현재 정보시스템감리사로 종사하는 사람이 대부분은 남자다. 이는 정보시스템감리사라는 직종이 비교적 최근에 개척된 직종인 반면 감리사가 되기 위해서는 오랜 경력이 필요한 분야이기 때문이다. 웹디자인이나 프로그래머처럼 학원에서 몇 달 배우면 취업할 수 있는 분야가 아니라 현업에서 10년 이상 개발자나 엔지니어로 근무했던 사람이 감리사로 전환하는 경우가 많기 때문에 여성 인력의 진출이 거의 없는 것이다. 하지만 정보시스템감리사의 업무는 여성에게도 적합하다. 고학력 여성들이 진출하기에 적합한 분야이므로 현재 현업에서 활동하는 IT 종사자라면 정보시스템감리사라는 직종에 목표를 두고 개인 능력을 개발하는 것이 좋다.

Top 20 Free Windows Mobile Applications

20 Free Applications for Windows Mobile

1. Facebook – Facebook has now become the most famous social network, connecting millions of people around the World. So, Microsoft has developed the official Facebook client for Windows Mobile. Now, keep updated with the latest news and posts with Facebook on your phone.

windowsmobile facebook

2. TwitTodayTwitter is one of the most popular micro blogging client.With TwitToday, you can control all your twitter activities and tweet from your windows mobile easily. Once installed, it adds a textbox to the Today screen of a Windows Mobile phone.

3. NET Compact Framework 3.5 – Most of the applications require .net framework to run. It’s an official pack which contains the common language runtime and class libraries built for the .NET Compact Framework.

4. ViigoViigo is a free, fast and easy to use RSS reader which provides the best way to read anything on your Blackberry and Windows Mobile. Viigo provides Instant access to favorite blogs, breaking news, entertainment, sports, finance, weather, flight schedules, restaurant reviews, games, local attractions, and much more.

5. Google Maps Mobile – Google Maps is a free app which lets you determine your current location with or without GPS using Maps. Just visit m.google.com/maps on your mobile.

6. TreeSize Mobile – TreeSize Mobile helps to easily locate the big files on your Smartphone when it runs out of disk space. The file system is represented in a tree view and it shows you the size of folders, including their subfolders.

7. CleanRAM – CleanRAM is an useful utility which can clean up the wasted RAM memory without having to restart the device. It offers various functionalities unlike other tools. There are 3 levels (Basic purge, Quality purge, Fundamental purge) to perform RAM cleanup.

clean ram clean-ram-settings

You can choose custom processes to clean and schedule the clean up at a specific time. This is surely an amazing tool for Windows mobile users. Give it a try!

8. Pocket RAR – Pocket RAR is the WinRAR version for PocketPC, the popular and successful file compressor for windows. It allows you to compress and decompress any file using your PocketPC without the need of PC. It has a very intuitive interface.

9. iFonz 2 – iFonz is a perfect theme which provides a complete iphone interface to your windows mobile. It includes a lots of customization and a fully graphical design and animations for Windows Mobile 5/6 completely written in .NET.

10. Nitrogen 1.0 – Nitrogen is a powerful audio player to enjoy your music on your phone. It allows you to play MP3/OGG songs stored on your Pocket PC device. It features a file browser, full skin support, smart shuffle and repeat modes, a 10-band equalizer, built-in sleep mode.

windowsmobile-nitrogen

11. DivX Mobile Player – DivX Mobile Player is the official DivX player for smartphones and any other Windows Mobile devices. It supports a wide range of formats, so you can play DivX videos with no problems. You can view the videos in full screen, forward or rewind, rotate the video, synchronize, etc.

12. S2P (Slide 2 Play) – S2P is a stylus-free MP3/WMA player application. It simply lets you browse your music files & play. It fully integrates with S2U2 & supports A2DP & AVRCP as well. It also features a very cool and intuitive interface.

13. Opera Mobile – Opera Mobile is the most popular browser to access Internet on smartphones. Though it’s not free like Opera Mini but its beta version is absolutely free to use. Its advanced features include: Opera Turbo, Widgets, tabbed browsing, Pan and zoom, Save pages and/or images, History and bookmarks and much more.. It truly delivers an ultimate web experience.

14. Skyfire – Skyfire is a free mobile web browser which runs on Windows Mobile (smartphones and PPC) and Nokia N and E Series (Symbian S60, 3rd Edition) phones. It provides a PC like browsing experience with speedy page loads, full video, images and audio. It supports video and audio streaming along with full Flash and Windows Media videos.

15. w0lf’s Translator – WOlf’s Translator uses the Google Translate engine to provide translations. It’s a small program to translate from/to many languages at any time. It has Auto-detect feature to know the input language. It requires .Net Compact Framework 3.5 has to be installed on the device.

wolfs translator

16. EverNote – Evernote is an application and web service that lets you capture, store and synchronize all information on your PDA, PC and online. Now, you can Create text notes and quickly access and search them whenever you like. It allows you to send snapshots, capture web clippings, store voice notes, images and files. You’ll need to sign up for a free Evernote account to use it.

17. HD Tweak & Diamond Tweak – Diamond Tweak and HD Tweak have been specifically designed forHTC devices. This free programs lets you tweak, customize and optimize your windows mobile as you want. Read the installation and Useinstructions before trying out this app. It also includes the AppToDate support.

18. Adobe Reader 7.0 – Adobe Acrobat Reader is the tiny version of Adobe reader specially designed for Pocket PC and Windows mobile. It allows viewing PDF files in high quality even on smaller screens, while preserving their rich content. You can easily share or submit your data formsover theInternet. PDF can be viewed in portrait or landscape mode on your handheld device.

19. Macromedia Flash Player 7 – Nowadays, most of the websites includes flash content which require a flash addon. Flash Player 7 is an official app from Adobe, which allows viewing Flash content embedded in web pages. Developers can also start developing and experiencing rich Flash content, enterprise applications and mobile services right from their Pocket PC.

20. Pocket Uno Uno is one of the world’s most popular family card games to play on WM. Just play cards from your hand by matching color, number, or word. Try to rid yourself of cards before opponents do.

windowsmobile-uno

Check the game rules and instructions on their site. Have Fun!

즐겁기만한 놀이... 넥슨별...


















aion의 세계란....




'사이버탐험기' 카테고리의 다른 글

아이온 aion의 저랩 여행기....  (0) 2010.03.01
즐겁기만한 놀이... 넥슨별...  (0) 2010.02.15
Wow의 여전사 랩업중...  (0) 2010.02.15
SecondLife의 요정들...  (0) 2010.02.13
넥슨별 랩3 달성  (0) 2010.02.12

Wow의 여전사 랩업중...

















'사이버탐험기' 카테고리의 다른 글

즐겁기만한 놀이... 넥슨별...  (0) 2010.02.15
aion의 세계란....  (0) 2010.02.15
SecondLife의 요정들...  (0) 2010.02.13
넥슨별 랩3 달성  (0) 2010.02.12
넥슨별! 이제 슬슬.....  (0) 2010.02.07

SecondLife의 요정들...



'사이버탐험기' 카테고리의 다른 글

aion의 세계란....  (0) 2010.02.15
Wow의 여전사 랩업중...  (0) 2010.02.15
넥슨별 랩3 달성  (0) 2010.02.12
넥슨별! 이제 슬슬.....  (0) 2010.02.07
WOW 막막한 퀘스트......  (0) 2010.02.06

넥슨별 랩3 달성











'사이버탐험기' 카테고리의 다른 글

Wow의 여전사 랩업중...  (0) 2010.02.15
SecondLife의 요정들...  (0) 2010.02.13
넥슨별! 이제 슬슬.....  (0) 2010.02.07
WOW 막막한 퀘스트......  (0) 2010.02.06
넥슨별의 여행자.....  (0) 2010.02.06

넥슨별! 이제 슬슬.....







'사이버탐험기' 카테고리의 다른 글

SecondLife의 요정들...  (0) 2010.02.13
넥슨별 랩3 달성  (0) 2010.02.12
WOW 막막한 퀘스트......  (0) 2010.02.06
넥슨별의 여행자.....  (0) 2010.02.06
에버플레닛... 준비운동..  (0) 2010.01.30

Lars Vogel

Version 1.7

13.01.2009

Revision History
Revision 0.104.07.2009Lars Vogel
Created
Revision 0.208.07.2009Lars Vogel
First working example
Revision 0.330.08.2009Lars Vogel
Improved description
Revision 0.430.10.2009Lars Vogel
Updated to use Android 2.0
Revision 0.501.11.2009Lars Vogel
Started XML support
Revision 0.602.11.2009Lars Vogel
Added the android log view
Revision 0.703.11.2009Lars Vogel
Access to the shell access, uninstall android application
Revision 0.804.11.2009Lars Vogel
Networking
Revision 0.905.11.2009Lars Vogel
Added the usage of SharedPreferences
Revision 1.006.11.2009Lars Vogel
Usage of ContentProvider
Revision 1.110.11.2009Lars Vogel
Assign handler to button via XML (thanks to Jason Arora for the tip)
Revision 1.221.11.2009Lars Vogel
Emulator console added
Revision 1.322.11.2009Lars Vogel
Authorization mentioned
Revision 1.425.11.2009Lars Vogel
Google API, location API, MapView
Revision 1.513.12.2009Lars Vogel
Fixed text for button assignment
Revision 1.630.12.2009Lars Vogel
Fixed typo
Revision 1.713.01.2009Lars Vogel
Updated screenshot

Programming with Google Android and Eclipse

This article describes how to create Android applications with Eclipse.

The article is based on Eclipse 3.5 and Android 2.0.


1.Overview

1.1.Android

Android is an operating system based on Linux with a Java programming interface. It provides tools, e.g. a compiler, debugger and a device emulator as well as its own Java Virtual machine (Dalvik).

Android is created by the Open Handset Alliance which is lead by Google.

Android uses a special Java virtual machine (Dalvik) which is based on the Apache Harmony Java implementation. Dalvik uses a special Bytecode so that you have to use the Android compiler to create this special byte-code.

Android supports 2-D and 3-D graphics using the OpenGL libraries and supports data storage in a SQLLite database.

For development Google provides the Android Development Tools (ADT) for Eclipse to develop Android applications.

1.2.Android Application

An Android application consists out of the following parts:

  • Activity - A screen in the Android application

  • Intent / Broadcast Receiver - allow the application to request and / or provide services from other application. For example the application call ask via an intent for a contact application. Application register themself via an IntentFilter

  • Services - Background activities without UI

  • Content Provider - provides data to applications, Android contains a SQLLite DB which can serve as data provider

An Android application is described the file "AndroidManifest.xml". This files contains all classes of the application and the required permissions for the application, e.g. if the application requires network access. "AndroidManifest.xml" can be thought as the deployment descriptor for an Android application.

2.Installation

The following assume that you have already Eclipse install. For installing and using Eclipse please see Eclipse Tutorial

To use Android you need to install the Eclipse Android Plugin and the base Android SDK. Afterwards you can install different Android versions via the Eclipse Android plugin . You will also need to configure a device which will be used to emulate your real device.

2.1.Eclipse

Use the update manager of Eclipse to install all available plugins for the Android Development Tools (ADT) from the URL https://dl-ssl.google.com/android/eclipse/ . See Using the Eclipse update manager for details on how to use the update manager and how to install new plugins.

Tip

Ehe Eclipse Android SDK does not seem to have an option to install the Android (Java) source code to make it available in Eclipse. Please join me in starring at bug Make Android Source available in Eclipse - Bug report .

2.2.Android

Download the Android SDK from the Android homepage under Android Homepage .

The download contains a zip file which you can extract to any place in your file system, e.g. I placed it under "c:\android-sdk-windows" .

2.3.Configuration

In Eclipse open the Preferences dialog via Windows -> Preferences. Select Android and maintain the installation path of the Android SDK.

Tip

If you maintain the location the Android plugin will remind you frequently (and for every workspace). Join me in starring at Bug 3210 to get this improved.

Select now Window -> Android SDK and AVD Manager from the menu.

Select available packages and select everything expect the older version of the SDK.

Press "Install selected" and confirm the license for all package.

After the installation restart Eclipse.

2.4.Device

You need to define a device which can be used for emulation. Press the device manager button, press "New" and maintain the following.

Press "Create AVD".

To test if you setup is correct, eelect your device and press "Start".

After (a long time) your device should be started.

Tip

You can use the perspective "DDMS" to monitor your device.

3.Your first Android project

3.1.Create Project

. Select File -> New -> Other -> Android -> Android Project and create the Android project "de.vogella.android.first" Maintain the following.

Tip

I think this wizard should have the option to add the project to an existing working set. Please stare at Issue 4523 to get this functionality.

Press "Finish".

This should create the following directory structure.

R.java is a generated class which contains the text and the UI elements. Please do not try to modify this class manually.

3.2.Add UI Elements

Select main.xml and open the editor via double-click. The result should look like the following.

From the "Views" bar, drag in an "EditText" and three "Buttons". The result should look like the following.

Tip

Check R.javait will contain your new elements.

3.3.Create and use attributes

Select "string.xml" and press "Add".

Select color and maintain "white" as the name and "#FFFFFF" as the value.

Go back to "main.xml", select the complete widget and use the Properties view to set the background to this attribute.

3.4.Code your applicatioin

Change your code in "Hello.java" to the following.

				package de.vogella.android.first;import android.app.Activity;import android.os.Bundle;import android.view.View;import android.widget.EditText;public class Hello extends Activity {	private EditText text;	/** Called when the activity is first created. */	@Override	public void onCreate(Bundle savedInstanceState) {		super.onCreate(savedInstanceState);		setContentView(R.layout.main); // bind the layout to the activity		text = (EditText) findViewById(R.id.EditText01);		text.setText("No button pressed");	}	// Will be connected with the buttons via XML	public void myClickHandler(View view) {		switch (view.getId()) {		case R.id.Button01:			text.setText("Button 1 was clicked");			break;		case R.id.Button02:			text.setText("Button 2 was clicked");			break;		case R.id.Button03:			text.setText("Button 3 was clicked");			break;		}	}}			

Tip

The next chapter will connect the handler methods with the buttons via XML.

3.5.Define the button handler

Open again main.xml and select your first button. Via the property view assign the method "myClickHandlerButton" to the "on Click" property of the first button.

Assign "myClickHandlerButton" to the other buttons.

The resulting main.xml should look like the following.

				<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"    android:orientation="vertical"    android:layout_width="fill_parent"    android:layout_height="fill_parent"    android:background="@color/white"><TextView      android:layout_width="fill_parent"     android:layout_height="wrap_content"     android:text="@string/hello"    /><EditText android:text="@+id/EditText01" android:id="@+id/EditText01" android:layout_width="wrap_content" android:layout_height="wrap_content"></EditText><Button android:text="@+id/Button01" android:id="@+id/Button01" android:layout_width="wrap_content" android:layout_height="wrap_content" android:onClick="myClickHandler"></Button><Button android:text="@+id/Button02" android:id="@+id/Button02" android:layout_width="wrap_content" android:layout_height="wrap_content" android:onClick="myClickHandler"></Button><Button android:text="@+id/Button03" android:id="@+id/Button03" android:layout_width="wrap_content" android:layout_height="wrap_content" android:onClick="myClickHandler"></Button></LinearLayout>			

3.6.Start Project

To start the Android Application, select your project, right click on it, Run-As-> Android Application

Tip

Be patient, the emulator is sometimes very slow.

You should get the following result.

3.7.Using the phone menue

If you press the Home button you can also select your application.

4.Important views

4.1.Log

You can see the log (including System.out.print() statements) via the LogCat view.

4.2.File explorer

The file explorer allows to see the files on the android simulator.

5.Networking

5.1.Networking

Android allows to access the network via the the java.net.URL class.

Tip

You can also read XML, e.g. RSS feeds. Unfortunately Android does not have a Stax parser included in it SDK. Vote for Android should have a Stax parser to get support. Currently you have to use the android specific class XmlPullParser.

5.2.Proxy

To set the proxy you can use the class Settings. For example you could add the following line to your onCreate method in your activity.

				Settings.System.putString(getContentResolver(), Settings.System.HTTP_PROXY, "myproxy:8080");			

Tip

It seems that DNS resolving doesn't work behind a proxy. See Bug 2764

5.3.Permissions

You also have to give your application the right to change the settings "android.permission.WRITE_SETTINGS" in "AndroidManifest.xml".

5.4.Example

Create the project "de.vogella.android.network.html". Add the following elements to your activity:

  • EditText with the ID "address"

  • TextView with the ID "pagetext"

  • Button with the ID "ReadWebPage"

Create the following code to read a webpage and show the HTML code in the TextView.

This example also demonstrate the usage of Android preferences to store user data. The URL which the user has typed is stored in the preferences in the method onPause(). This method is called whenever the Activity is send into the background.

				package de.vogella.android.network.html;import java.io.BufferedReader;import java.io.InputStreamReader;import java.net.URL;import android.app.Activity;import android.content.SharedPreferences;import android.content.SharedPreferences.Editor;import android.os.Bundle;import android.view.View;import android.widget.EditText;import android.widget.TextView;public class ReadWebpage extends Activity {	private static final String PREFERENCES = "PREFERENCES";	private static final String URL = "url";	private String lastUrl;	private EditText urlText;	private TextView textView;	/** Called when the activity is first created. */	@Override	public void onCreate(Bundle savedInstanceState) {		super.onCreate(savedInstanceState);		setContentView(R.layout.main);		urlText = (EditText) findViewById(R.id.address);		textView = (TextView) findViewById(R.id.pagetext);		loadPreferences();		urlText.setText(lastUrl);	}		/**	 * Demonstrates loading of preferences The last value in the URL string will	 * be loaded	 */	private void loadPreferences() {		SharedPreferences preferences = getSharedPreferences(PREFERENCES,				Activity.MODE_PRIVATE);		// Set this to the Google Homepage		lastUrl = preferences.getString(URL, "http://209.85.229.147");	}	@Override	protected void onPause() {		super.onPause();		SharedPreferences preferences = getSharedPreferences(PREFERENCES,				Activity.MODE_PRIVATE);		Editor preferenceEditor = preferences.edit();		preferenceEditor.putString(URL, urlText.getText().toString());		// You have to commit otherwise the changes will not be remembered		preferenceEditor.commit();	}		// Will be connected with the buttons via XML	public void myClickHandler(View view) {		switch (view.getId()) {		case R.id.ReadWebPage:			try {				textView.setText("");				// Perform action on click				URL url = new URL(urlText.getText().toString());				// Get the response				BufferedReader rd = new BufferedReader(						new InputStreamReader(url.openStream()));				String line = "";				while ((line = rd.readLine()) != null) {					textView.append(line);				}			}			catch (Exception e) {				System.out.println("Nay, did not work");				textView.setText(e.getMessage());			}			break;		}	}}			

Assign the handler "buttonHandler" to the button in the property "on Click". via your XML.

6.ContentProvider

6.1.Overview

ContentProvider are used to provide data from an application to another. ContentProvider do not store the data but provide the interface for other applications to access the data.

The following example will use an existing context provider from "Contacts".

6.2.Create Contacts

Start the contacts application and create a few contacts.

6.3.Example

Create a new Android project "de.vogella.android.contentprovider" with the activity "ContactsView".

Rename the id of the the existing TextView from the example wizard to "contactview". Delete the default text. Also change the layout_height to "fill_parent".

The resulting main.xml should look like the following.

				<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"	android:orientation="vertical" android:layout_width="fill_parent"	android:layout_height="fill_parent">	<TextView android:layout_width="fill_parent"		android:layout_height="fill_parent" android:id="@+id/contactview" /></LinearLayout>			

In Application.xml add the Permission that the application can use "android.permission.READ_CONTACTS".

Change now your coding of your activity.

				package de.vogella.android.contentprovider;import android.app.Activity;import android.database.Cursor;import android.os.Bundle;import android.provider.ContactsContract.Contacts;import android.widget.TextView;public class ContactsView extends Activity {	/** Called when the activity is first created. */	@Override	public void onCreate(Bundle savedInstanceState) {		super.onCreate(savedInstanceState);		setContentView(R.layout.main);		TextView contactView = (TextView) findViewById(R.id.contactview);		Cursor cursor = getContentResolver().query(Contacts.CONTENT_URI, null, null, null, null);		while(cursor.moveToNext()){			String displayName = cursor.getString(cursor.getColumnIndex(Contacts.DISPLAY_NAME));			contactView.append("Name: ");			contactView.append(displayName);			contactView.append("\n");		}	}}			

Tip

Currently the contentProvider does not return any data. Looks like the content provider has been changed but the content provider d0cumentation still refers to the People class. If you find a solution please email me.

7.Shell

7.1.Opening the Shell

You can access your Android emulator also via the console. Open a shell, switch to your "android-sdk" installation directory into the folder "tools".

Start the shell via the command "adb shell".

7.2.Emulator Console

The emulator console lets you dynamically access your simulated device. Use "telnet localhost 5554" to conntect to your simulated device. To exit the console session, use the command "quit" or "exit".

For example you can set your geolocation in the emulator via "geo fix -121.45356 46.51119 4392"

For more information on the emulator console please see Emulator Console manual

7.3.Uninstall an application

You can uninstall an android application via the shell. Switch the the data/app directory (cd /data/app) and simply delete your android application.

8.Location API

The location API allow you to determine your current location.

The following requires that you have installed the Googles API (see installation) and a valid Google map API key. Go to Obtaining a Maps API Key to get one.

8.1.Device with Google API

Create a new device which supports the Google API's.

8.2.Project and Permissions

Create a new project "de.vogella.android.locationapi". Make sure to select the Google API

Add the following permissions to your application in Android.xml.

  • INTERNET

  • ACCESS_FINE_LOCATION

  • ACCESS_COARSE_LOCATION

Tip

The maintenance of "Uses permissions" should be enhanced. Please stare at Bug: Permissions should support field assists to get this improved.

8.3.Google Map library

You need to add the Google maps library to your application. Open Android.xml, tab Application and add a "Uses library".

8.4.Layout

Define your view layout like the following.

				<?xml version="1.0" encoding="utf-8"?><RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"    android:id="@+id/mainlayout"    android:orientation="vertical"    android:layout_width="fill_parent"    android:layout_height="fill_parent" >    <com.google.android.maps.MapView        android:id="@+id/mapview"        android:layout_width="fill_parent"        android:layout_height="fill_parent"        android:clickable="true"        android:apiKey="Your Maps API Key"    /></RelativeLayout>			

Tip

Replace "Your Maps API Key" with your Google API key.

8.5.Activity

Create the following activity. This activity use an LocationListner to update the map with the current location.

				package de.vogella.android.locationapi;import android.content.Context;import android.location.Location;import android.location.LocationListener;import android.location.LocationManager;import android.os.Bundle;import android.widget.RelativeLayout;import android.widget.ZoomControls;import com.google.android.maps.GeoPoint;import com.google.android.maps.MapActivity;import com.google.android.maps.MapController;import com.google.android.maps.MapView;public class CurrentLocation extends MapActivity {	private MapController mapController;	private MapView mapView;	private LocationManager locationManager;	public void onCreate(Bundle bundle) {		super.onCreate(bundle);		setContentView(R.layout.main); // bind the layout to the activity		// create a map view		RelativeLayout linearLayout = (RelativeLayout) findViewById(R.id.mainlayout);		mapView = (MapView) findViewById(R.id.mapview);		ZoomControls mZoom = (ZoomControls) mapView.getZoomControls();		linearLayout.addView(mZoom);		mapController = mapView.getController();		// Zoon 1 is world view				mapController.setZoom(14);		locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE);		locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0,				0, new GeoUpdateHandler());	}	@Override	protected boolean isRouteDisplayed() {		return false;	}	public class GeoUpdateHandler implements LocationListener {		@Override		public void onLocationChanged(Location location) {			int lat = (int) (location.getLatitude() * 1E6);			int lng = (int) (location.getLongitude() * 1E6);			GeoPoint point = new GeoPoint(lat, lng);			mapController.setCenter(point);//			setContentView(mapView);		}		@Override		public void onProviderDisabled(String provider) {		}		@Override		public void onProviderEnabled(String provider) {		}		@Override		public void onStatusChanged(String provider, int status, Bundle extras) {		}	}}			

8.6.Run and Test

Run and test your application. You should be able to zoon in and out. Use Emulator console to send geo-coordinates to your device for example

				geo fix 13.24 52.31			

Tip

See also Hello, MapView for an example how to put graphics on the map.

9.Thank you

Thank you for practicing with this tutorial.

Please note that I maintain this website in my private time. If you like the information I'm providing please help me by donating.

10.Questions and Discussion

For questions and discussion around this article please use the www.vogella.de Google Group. Also if you note an error in this article please post the error and if possible the correction to the Group.

I believe the following is a very good guideline for asking questions in general and also for the Google group How To Ask Questions The Smart Way.

퀘스트를 하려니...

막막하기만 하다.....


'사이버탐험기' 카테고리의 다른 글

넥슨별 랩3 달성  (0) 2010.02.12
넥슨별! 이제 슬슬.....  (0) 2010.02.07
넥슨별의 여행자.....  (0) 2010.02.06
에버플레닛... 준비운동..  (0) 2010.01.30
넥슨별 여행.....  (0) 2010.01.30

+ Recent posts