달력

3

« 2013/3 »

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
반응형
728x90
반응형

 

안드로이드 - 이클립스에서 DDMS(Dalvik Debug Monitor Service) 사용하기

 

원본출처:http://androidhuman.tistory.com/81

  안드로이드 어플리케이션을 개발할 때, 보통 안드로이드 에뮬레이터를 사용하게 됩니다. 안드로이드 어플리케이션 개발에서는 에뮬레이터 뿐만 아니라 DDMS(Dalvik Debug Monitor Service)를 사용하여 가상으로 전화나 SMS를 보내줄 수도 있고, 위치 정보를 수정해 주는 것도 가능합니다. 즉, 실제 단말기를 가지고 있는 것처럼 시뮬레이션 해 주는 것이 가능한 것이죠.

이러한 DDMS는 이클립스 플러그인인 ADT를 설치하셨다면, 이클립스 상에서 바로 실행이 가능합니다. (저는 이걸 몰라서 맨날 tools 폴더에 들어가서 수동으로 ddms를 실행했었습니다 -_-;;) 실행 방법은 의외로 상당히 간단합니다. 

이클립스 메뉴의 Window -> Open Perspective -> Other... 를 클릭하시면 다음과 같은 화면이 나오게 됩니다.


여기에서 DDMS를 선택하시고, OK버튼을 누르시면 다음과 같은 화면이 나오게 됩니다.


여기에서 왼쪽의 "Devices" 항목의 툴바 중 가장 오른쪽에 있는 "Screen Capture"를 이용하여 화면 캡쳐를 할 수 있고, "Emulator Control" 항목을 통해서 가상으로 전화, SMS를 발송하거나 위치 정보를 수정할 수 있습니다.

728x90
반응형
:
Posted by mapagilove
728x90
반응형

안드로이드 - sqlite export import

 

http://hxcaine.com/blog/2010/09/14/backing-up-importing-and-restoring-databases-on-android/

 

If your Android application has a database and you want your users to be able to backup the database and restore it as they see fit, you’ll need to mess about with database files.

Below is a class called DbExportImport. Once you’ve set it up with the correct values, all you need to do is call exportDb(), importDb() or restoreDb() from your application to perform the necessary operations.

This is also useful as a temporary measure when changing your package name or key for application signing, as your application will be newly installed and you will lose your database.

I have only left in a few comments, so for any clarification, leave a comment and I’ll make it a little clearer.

728x90
반응형
:
Posted by mapagilove
반응형