Software

Android API 18에서 startForeground()

Android API 17까지는 서비스가 시스템에 의해 강제종료 되는 것을 막기 위해서 서비스 시작 부분에 startForeground()를 호출했다. 이번 Android API 18에서도 여전히 사용할 수 있지만 notification bar에 안내가 강제로 뜬다. 시스템 앱(/system/app, /system/framework, /vender 폴더에 있는 앱)의 경우에는 기존과 같이 notification bar에 안내가 뜨지 않고 죽지않는 서비스를 만드는 방법이 있다. Androidmanifest.xml 파일의 <Application 선언 부분에 android:persistent=”true” 를 선언하는 것이다. […]

Android API 18에서 startForeground() Read More »

Android AVD의 proxy 설정 방법

방법은 2가지다. 하나는 에뮬레이터를 실행할 때, 다른 하나는 AVD가 실행된 후에다. 아래에 두가지 방법을 소개한다. 1. emulator -avd [avd name] -http-proxy http://[proxy-server-ip]:[port] 2. Menu Settings Wireless & Networks Mobile Networks Access Point Names “Telkila Internet” 클릭 “proxy”와 “port”를 입력 (필요하다면) “username”, “password”도 입력 이런 데이터는 모두 Android Developer 사이트에 있다는 사실도 있지말자. 여기를 참조하자. 그

Android AVD의 proxy 설정 방법 Read More »

android library안의 component 선언은 어디에

결론부터 이야기하면 android app 에서 사용되는 library(정확히는 android library)에 있는 모든 component는 이 library를 사용하는 app의 AndroidManifest.xml 파일에 모두 선언해야 한다. 이에 대해서는 developers.android.com의 AndroidManifest.xml 부분에 있으며 그 내용은 다음과 같다. In the manifest file of the application project, you must add declarations of all components that the application will use that are imported from

android library안의 component 선언은 어디에 Read More »

trouble writing output: Too many methods

안드로이드 프로젝트를 빌드할 때 메소드 갯수가 많은 경우 아래와 같은 에러를 내며 빌드가 되지 않는 경우가 있다. Android Dex: [IAP] trouble writing output: Too many methods: 77667; max is 65536. By package: Android Dex: [IAP] 26 android Android Dex: [IAP] 83 android.accessibilityservice Android Dex: [IAP] 661 android.accounts …. 일단 에러의 원인은 Dalvik에서 실행하기 위해서는 앱이

trouble writing output: Too many methods Read More »