부팅시점에 안드로이드 서비스 시작

Posted by 빵빵빵
2010/01/29 17:56 전산(컴퓨터)/안드로이드




A service that has to be started manually is an oxymoron, so starting a service at boot time is for many applications a must.

My tracklogging service is such an example, which should run whenever the phone is turned on, so that one can refer to the route travelled later. A further example is the much touted CarbonFootprint, which again relies on accurate measurements all the time, and not just when the user has turned it on.

The last post detailed how the TrackloggingService worked, but started the service only when the main activity was launched. Now comes the time to hook it into the Android boot sequence. Here is how:

After boot completes the Android system broadcasts an intent with the action android.intent.action.BOOT_COMPLETED. And now all we need is an IntentReceiver, now called a BroadcastReceiver, to listen and act on it. This is how this class looks:


The key is of course the onReceive() method. I have decided to check that it is actually the Intent I am expecting, but otherwise it is straightforward starting the service and return.

The receiver needs to be declared in the manifest, e.g. with the following entry:


Furthermore this class listen to this specific event needs to be declared in the security settings:


That's it. Now the service will be started as soon a Android has finished booting.
Now we will need something to make this user-configurable...
2010/01/29 17:56 2010/01/29 17:56

암호화 기본 코드

Posted by 빵빵빵
2010/01/25 16:10 전산(컴퓨터)/안드로이드



출처 : http://www.androidsnippets.org/snippets/39/

2010/01/25 16:10 2010/01/25 16:10

안드로이드 개발자 사용자 커뮤니티

Posted by 빵빵빵
2010/01/18 16:39 전산(컴퓨터)/안드로이드



안드로이드를 개발하면서 참고할 수 있는 오픈 소스 프로젝트나 유용한 링크들을 모아놓습니다. 쓸만한 링크가 있으면 댓글로 알려주세요 추가시켜놓도록 하겠습니다.

- AndroidPub : 안드로이드펍 한국 안드로이드 사용자 및 개발자 커뮤니티.
  소개       : 한국 안드로이드 커뮤니티
  홈페이지 : http://www.androidpub.com

- 공식 안드로이드 공식 홈페이지들
  소개글        : 안드로이드의 전체 소스를 다운받을 수 있음
  홈페이지     : 소스 http://source.android.com
                     공식 http://www.android.com
                     마켓 http://market.android.com
                     개발자 http://developer.android.com

- Android Code Snippets
  소개       : 간단한 안드로이드 코드 모음
  홈페이지 : http://www.androidsnippets.org

- StackOverflow Android
  소개       : 안드로이드 질문과 답 (영문)
  홈페이지 : http://stackoverflow.com/questions/tagged/android

- 구글의 안드로이드 개발자들이 만든 애플리케이션 모음 (Apps for Android )
  소개        : 주로 구글의 실제 안드로이드 개발자들이 만든 샘플 애플리케이션들로 안드로이드의 구조를 잘 이해하고
                     작성한 애플리케이션들이라서 주옥같은 예제가 많이 들어있음. PhotoStream는 웹서버와의 통신에서
                     참고하기 좋은 애플리케이션.
  홈페이지 : http://code.google.com/p/apps-for-android/

- 안드로이드 플랫폼 스터디 모임
  소개       : 안드로이드 애플리케이션 프로그래밍을 공부하는 것이 아니라, 안드로이드 플랫폼의 자체 이해를 목적으로 합니다. 이를 통해 안드로이드 프레임워크의 설계 및 동작 원리를 이해하고, 나아가 안드로이드의 내부 구조를 파악함으로써 효율적인 안드로이드 프로그램의 설계 및 구현 할 수 있는 지식을 쌓는 것이 저희 스터디의 목표입니다. 

- Eyes Free TTS 텍스트 음성 변환 라이브러리
  소개       : 안드로이드 애플리케이션에서 공유해서 사용할 수 있는 TTS 라이브러리 (안드로이드 1.6에 기본 탑재될 것으로 알려짐)
  호페이지 : http://code.google.com/p/eyes-free/

-  SMALI Dex assembler/disassembler
  소개       : JF 가 작업중인 Dex 어셈블러/디스어셈블러
  홈페이지 : http://code.google.com/p/smali/

- The open mob for android
  소개       : 안드로이드 개발 관련 위키
  홈페이지 : http://wiki.andmob.org/

- 안드로이드 스크립트 환경 (ASE : Android Scripting Environment)
  소개       : http://www.androidpub.com/11518
  홈페이지 : http://code.google.com/p/android-scripting/

- Live CD for Android
  소개       : PC에서 안드로이드를 구동시키자? x86 으로 컴파일된 안드로이드 이미지를 CD에 구워서 PC에서 구동.
  홈페이지 : http://code.google.com/p/live-android/

- HTC 안드로이드 개발자 폰 지원 사이트.
  소개       : 최신 시스템 이미지등을 다운받을 수 있음
  홈페이지 : http://www.htc.com/www/support/android/adp.html

- MotoDev 모토로라 개발자 사이트
  소개       : 모토로라의 개발자 사이트 최근 안드로이드를 중심으로 구성되고 있음. PodCast등 쓸만한 정보가 제법 올라옴
  홈페이지 : http://developer.motorola.com/

- 차이나모바일 OMS 개발자 사이트
  홈페이지  : http://www.ophonesdn.com 

- 일본 안드로이드회 기술자료
  소개         : 일본의 안드로이드 개발자 협회의 기술자료 다양한 자료가 잘 정리되어있다.
  홈페이지 : http://www.android-group.jp/index.php?%B5%BB%BD%D1%BB%F1%CE%C1
  

본 글은 제일 위에 안드로이드펑 링크를 임의로 제거하지 않는 이상 퍼가셔도 좋습니다.
종종 업데이트 하도록 하겠습니다.
2010/01/18 16:39 2010/01/18 16:39