Wednesday, June 29, 2011

android:launchMode

[Android] android:launchMode (standard、singleTop、singleTask、singleInstance)
http://jiunway.blogspot.com/2010/10/android-androidlaunchmode_26.html

standard, no reuse activity
singleTop, reuse activity if the same as the toppest activity
singleTask, reuse the same activity on the activity stack
singleInstance, reuse the same activity across multiple processes

Monday, April 11, 2011

[Android] ndk stl build

終於知道如何用ndk-build stl
doc中說可以在Android.mk[x]中設定變數, 不過不成功.

--> 原來是看錯檔名 應該是Application.mk才對
--> 加一個Application.mk就可以build

[x] 後來下在command中:
[x] ndk-build APP_STL=stlport_static

其中 APP_STL 可以有幾個選擇
system -> Use the default minimal C++ runtime library.
stlport_static -> Use STLport built as a static library.
stlport_shared -> Use STLport built as a shared library.
gnustl_static -> Use GNU libstdc++ as a static library.

gnu多了exception.

Tuesday, January 18, 2011

[Android] remote debug android process

發現一個不錯的功能可以remote debug android process
連 system_server 也可以debug.
在eclipse中切換到ddms的頁面

最右邊的欄位就是remote debug的 port number
切到 Debug 頁面, 選 "Debug Configuration..."
新增一個 "Remote Java Application" 選項
選擇你的project & 填上 port number 就可以用了

Wednesday, January 12, 2011

Android中的LIKELY和UNLIKELY

這篇解釋的不錯
http://blog.csdn.net/DroidPhone/archive/2010/11/03/5984255.aspx

if(LIKELY(exp)) 就是告訴compiler這個if branch較常執行, 可以針對他作優化
if(UNLIKELY(exp)) 相反則是以else branch為優化的對象.

Tuesday, January 4, 2011

[Android] Surface Flinger

article about SurfaceFlinger

Android Display System --- Surface Flinger
http://blog.csdn.net/yili_xie/archive/2009/11/12/4803527.aspx

Android GUI更新过程
http://www.limodev.cn/blog/archives/1582

Android中的FrameBuffer
http://www.limodev.cn/blog/archives/1586