Android/App개발2009. 4. 22. 11:57
Posted by 삼스
Android/App개발2009. 4. 22. 10:18

http://link.allblog.net/18042236/http://androidhuman.tistory.com/entry/안드로이드-에뮬레이터에-가상의-SD카드-마운트시키기


안드로이드 에뮬레이터에서 사용자가 임의로 파일을 저장하려면 안드로이드 에뮬레이터에 가상의 SD카드가 마운트 되어 있어야 합니다. 오늘은 mksdcard를 이용한 가상의 SD카드 생성부터 시작해서 이클립스 내의 설정 변경, DDMS를 이용하여 가상의 SD카드에 파일 넣기까지 알아보겠습니다.

일단, 에뮬레이터에 마운트시킬 가상의 SD카드를 생성해야합니다. 가상 SD카드를 생성하려면 안드로이드 SDK폴더\tools 폴더의 mksdcard.exe 을 이용하면 됩니다.


실행-cmd를 입력하여 명령 프롬프트 창을 열고, 안드로이드 sdk가 설치된 폴더\tools폴더에 간 후, mksdcard [용량] [파일명] 을 입력하여 가상의 SD카드를 만듭니다. 저는 128MB의 크기로 만들었습니다.

생성된 가상 SD카드 파일


가상 SD카드 파일도 만들었으니, 이제 에뮬레이터에 마운트를 시켜야겠지요?
에뮬레이터를 실행시킬 때 sd카드를 마운트시키는 옵션을 활성화시켜주어야 하는데요, 그 설정은 Run-Run Configurations-Target 탭의 Additional Enulator Command Line Options에 넣어주면 됩니다.


저같은 경우는 생성한 가상SD카드를 c:\ 드라이브에 넣어주어서 경로를 저렇게 설정하였습니다. 각자 경로에 맞게끔 넣어주시면 됩니다.

이렇게 설정을 끝낸 후, 에뮬레이터를 실행시키면 가상SD카드가 마운트 된 채로 에뮬레이터가 실행됩니다.
그럼, 이 SD카드에 파일을 넣어볼까요?

이클립스에서 DDMS를 실행시킨 후, File Explorer탭을 클릭해보면 아래와 같은 아이콘이 보이실겁니다. 에뮬레이터에 파일을 넣어야하니 Push a file onto the device를 눌러줍니다.



요로코롬 파일을 선택할 수 있습니다. 개발하는데 깝깝한데~~ 음악이나 듣게 음악을 넣어봅시다. 이 때, 파일명은 영어로 되어 있어야 합니다. 안그러면 에러납니다. -_-


자, 저렇게 해주면 이렇게! 뿅! 들어가있는 것을 볼 수 있습니다.
자, 그럼 이제 이 파일을 안드로이드 에뮬레이터에서 들어볼까요?
파일을 추가했으니, 바로 음악을 듣기 전에 Dev Tools의 Media Scanner를 실행해서 파일을 인식시켜주어야 합니다.

Media Scanner가 새로 추가된 파일을 검색중인 화면.


검색이 끝났다면, 음악을 들어볼까요?
Music을 눌러보시면, 다음과 같이 음악이 추가되어있는 것을 보실 수 있을 겁니다!


음악 파일 뿐만 아니라 다른 파일을 넣을 떄에도 지금과 동일한 과정으로 수행하시면 됩니다. :)

Posted by 삼스
Android/App개발2009. 4. 21. 17:21
Professional Android Application Development
지은이  Reto Meier  출판사 WROX PRESS  |   발행일 2008년 11월 10일
 
클릭하시면 큰 도서이미지를 보실 수 있습니다.
판매가 64,500원 → 55,700원 14%
마일리지 3% 1,670원
발행일 2008-11-10
ISBN 0470344717 | 9780470344712
기타정보 원서 | 400쪽 | $ 44.99 | Paperback
예상출고일 예상입고기간: 7~9일 소요예정
배송비 무료 배송
    정가, 판매가는 항공 운임료 포함 
Java
종합지수 2p 350 위
월간지수 8p 26 위
주간지수 12p 15 위
   
주의사항  ㆍ 현지사정에 의해 지연, 품절 될 수 있습니다.
 ㆍ 해외주문원서는 취소 및 반품이 불가능합니다.
     (단, 파본이나 오발송은 제외 입니다.)
 ㆍ 수입절차/입고소요기간 자세히
 
 Java 분야 베스트
1. Game Programming Gems 6
2. 열혈강의 VISUAL C++ 2008 MFC 윈도우프로그래밍
3. 제프리 리처의 Windows via C/C++
 
 
 Java 분야 베스트
1. 헬로, 안드로이드
2. 차세대 MVC 스트럿츠 2 프로그래밍
3. 알기 쉽게 풀어 쓴 웹로직과 EJB
 
 
 Java 분야 신간
1. Javafx: Developing Rich Internet Applications
2. Android Application Development: Create Modify Reuse
3. Spring in Practice
 
 
A hands-on guide to building mobile applications, Professional Android Application Development features concise and compelling examples that show you how to quickly construct real-world mobile applications for Android phones. Fully up-to-date for version 1.0 of the Android software development kit, it covers all the essential features, and explores the advanced capabilities of Android (including GPS, accelerometers, and background Services) to help you construct increasingly complex, useful, and innovative mobile applications for Android phones. 
What this book includes 

  • An introduction to mobile development, Android, and how to get started. 
  • An in-depth look at Android applications and their life cycle, the application manifest, Intents, and using external resources. 
  • Details for creating complex and compelling user interfaces by using, extending, and creating your own layouts and Views and using Menus. 
  • A detailed look at data storage, retrieval, and sharing using preferences, files, databases, and Content Providers. 
  • Instructions for making the most of mobile portability by creating rich map-based applications as well as using location-based services and the geocoder. 
  • A look at the power of background Services, using threads, and a detailed look at Notifications. 
  • Coverage of Android's communication abilities including SMS, the telephony APIs, network management, and a guide to using Internet resources 
  • Details for using Android hardware, including media recording and playback, using the camera, accelerometers, and compass sensors. 
  • Advanced development topics including security, IPC, advanced 2D / 3D graphics techniques, and user–hardware interaction. 

    Who this book is for
    This book is for anyone interested in creating applications for the Android mobile phone platform. It includes information that will be valuable whether you're an experienced mobile developer or making your first foray, via Android, into writing mobile applications. It will give the grounding and knowledge you need to write applications using the current SDK, along with the flexibility to quickly adapt to future enhancements.
  • Posted by 삼스