Android/App개발2010. 4. 22. 15:05
Android 2.0에서부터 SyncAdapter를 통해 Contact정보를 다른 소스로부터 동기화를 지원한다.
Example을 하나 제공하는데 이 샘플의 테스트 방법이 developer.android.com에 정확하게 설명이 되어 있지 않다.

아래는 구글담당자의 테스트방법에 대한 메일내용이다.

Hi, 

I have uploaded the zipped source files for this sample at: 
http://code.google.com/p/apps-for-android/downloads/list 

Sorry about the server related python source files not being visible 
on developer.android.com. We will fix it soon. 
This sample source will be available with the next sdk package, we are 
working on making zipped samples downloadable from 
developer.android.com itself in future. 

Regarding password issue, please use account user1/test on 
samplesyncadapter server. 

I would recommend that to add new accounts, download the server code, 
modify it as you want and host it on a separate app engine instance. 
If you look at dashboard.py and app.yaml in server code it should be 
pretty clear how to do this..giving a short overview below: 
1) Add a new Sample SyncAdapter account @: 
http://samplesyncadapter.appspot.com/add_user 
For example I have added user1: 
http://samplesyncadapter.appspot.com/edit_user?user=1 
2) Enter username/password @ 
http://samplesyncadapter.appspot.com/add_credentials 
The password for user1 is test. 
3) Modify the android code to use your server instance. 

Sorry for the confusion so far, please let me know if you have more 
questions. 

Thanks, 
Megha 

On Feb 18, 10:28 am, HCH <hayeshau...@gmail.com> wrote: 


위와 같이 수행하여 계정을 추가한 후 추가한 계정의 Friends를 등록하면 Sync시 추가한 Friends가 Contacts에 동기되어 표시되는것을 확인할 수 있다. 이 때 Friends를 추가할 때 다른 계정의 Handle명을 입력해야 함을 주의해야 한다.


Posted by 삼스
흥미있는 뉴스2010. 4. 22. 11:46
http://www.androidincanada.ca/news/google-begins-testing-android-os-2-2/

Google Begins Testing Android OS 2.2

by Billy on April 21st, 2010


Google has been spotted actively testing the next version of the Android OS, version 2.2. The upcoming OS, codenamed Froyo (frozen yogurt), has been showing up in web logs on various sites.

Google has not yet publicly announced a 2.2 release, nor has it detailed the future enhancements the update will deliver, however the release is anticipated to deliver major performance enhancements and at least some of the following:

  • JIT compiler
  • Free additional RAM
  • OpenGL ES 2.0 enhancements
  • Flash 10.1 support
  • Activation of Color Trackball
  • Enable FM radio

The Android OS 2.2 update is also expected to provide some of the support required for Flash 10.1. However, the full release of 10.1 on the 2.2 OS could also be a possibility.

Since Google has not supplied any information regarding the 2.2 update, rumors have pegged a tentative release date for May 19, 2010. That day is when Google begins its I/O conference, which in the past has announced major Android news.

소문만 무성하던 프로요가 테스트에 들어갔군요. 대채 언제 나올지는 모르지만 5월 19일에 있은 IO conference때 어떤식으로든 언급이 있지 않을까 싶습니다. FM radio가 프레임웤단에서 지원이 되고 Flash 10.1이 지원되는것이 인상적이네요. 성능이 최대 30퍼센트정도 개선되었다고 하더니 JIT compiler가 들어갔네요.

Posted by 삼스
Android/정리2010. 4. 21. 11:52

효율적인 모바일앱의 작성은 항상 쉽지 않다. 특히, 안드로이드처럼 Dalvik garbage collector 의해 자동으로 메모리가 관리되는 경우 충분히 주의하지 않으면 성능이슈가 발생할 수밖에 없다

성능에 민감한 코드들(layout생성, view시스템의 그리기, 게임의 로직부분)은 필연적으로 비용을 초래한다. 너무 많은 메모리 할당후에는 당신의 앱은 메모리를 해재하도록 잠시 멈출수 있다. 대부분의 경우 사용자가 느끼지 못할정도로 gc는 이루어지는 반면에 리스트를 scroll하거나 게임에서 적을 물리치거나 하는 경우 심각한 성능과 응답성의 저하를 느낄수 있다. 100~200ms정도 gc시간이 걸리는 것은 일반적인 상황은 아니다. 부드러운 애니매이션의 경우 각 프레임이 16~33ms정도의 속도가 필요하다. 초당 10프레임정도로만 떨어져도 사용자는 문제를 느끼게 된다.

대개의 경우 gc는 tons of small, short-lived object, 일부 garbage collector때문에 발생한다. 그리고 그런 object의 collection을 최적화할 수 있으며 그렇게 해서 애플리케이션의 좀더 덜 방해받게 할 수 있다. 안드로이드의 garbage collector는 불행히도 이러한 성능최적화등을 할 수 없다. 

잦은 gc를 피해가도록 해주기 위해, 안드로이드 SDK는 allocation tracker라는 툴을 포함시켰다. DDMS의 일부기능으로 되어 있으며 디버깅목적으로 이미 사용하고 있다. 이 툴을 사용하려면 SDK에 포함되어 있는 DDMS를 먼저 실행한다. 이클립스버전의 DDMS에는 아직 지원되지 않는다.

DDMS가 실행되면 해당 애플리케이션 프로세스를 선택하고 Allocation Tracker탭을 클릭하라. 새로운 뷰에서 Start Tracking을 클릭하면 분석하고자 하는 애플리케이션을 선택한다. 준비가 되었다면 Get Allocations를 선택하가. 할당된 object들이 첫번째 테이블에 리스트될것이다. 보여지는 한 line을 선택하면 두번째 테이블에 애플리케이션에 할당된 stack이 보여진다. 어떤 타입의 object들이 할당되었는지는 물론이고 포함된 스래드, 클래스, 파일의 라인까지 표시된다. 아래 스크린샷은 Shelves앱의 listView를 스크롤하는 동안의 할당상태를 보여준다.

성능에 영향을 주는 부분을 모두 제거할 필요가 없다고 하더라도 코드에서 중요한 이슈를 확인하는데 도움이 될것이다.  예를 들면 내가 보아온 많은 애플리케이션에서 draw시마다 매번 Paint 객체를 새로 생성한다. 이 Paint객체를 하나의 인스탄스로 관리하는 것 만으로 성능이슈를 간단히 개선할 수 있다. 나는 Android source code를 살펴볼것을 강력하게 권고한다. 이유는 성능을 끌어올리기 위해 어떤 기술을 사용하였는지 볼수 있기 때문이다. 그리고 객체의 재사용에 대한 안드로이드가 제공하는 API들을 발견하게 될것이다.


Posted by 삼스