二月 23, 2010
» Development on android

PB124730
Annecy.France

看了點文件,想說就來寫寫東西吧,從最簡單的開始。

之前在國外時,為了學法文,幫onlinedic寫了個Vocabulary Review的小程式在Windows Mobile上。讓自己可以用當時帶出去的dopod818加減看一下查過的單字。現在,當時的code已經都不見了,所以想說在android上也寫一個好了。反正onlinedic的export機制都還是okay的。

在寫程式時,也可以順便練習到android上的一些基本觀念,比方說:如何透過intent來叫起另一個activity;如果在叫起別的activity時,帶想要的參數給它;透過xml的UI建置方式,畫面橫轉正轉的處理;UI元件的動作指派;目錄結構的讀取,文字檔的讀取;簡單的webview應用;activity暫存狀態的記錄;功能權限的開啟;androidManifest.xml的基本設定;eclipse開發環境的熟悉等。

真的寫下去了,明明是個很簡單的程式,但也弄了一天多才寫好,花了許多時間在小細節上。如果不把除錯、追臭蟲方式弄熟,接下來的日子應該會很痛苦吧。

= = =
如果有空的話,乾脆一不做二不休,把onlinedict也搬到android,這樣子就不用每次都要裝一堆字典了。在網路上找到open source,可以讀取stardict字典檔的程式,有空再研究吧。先記下link:
http://code.google.com/p/toolkits/wiki/YAStarDict

另外,沒想到有人替eblib包了個python wrapper!!
當初在onlinedict裡亂寫的鄨腳command line程式,應該可以用這個wrapper把它換掉吧,省下暫存文字檔輸入輸出的廢工。
也是…改天有空再試吧。
Link: http://code.google.com/p/pyeb/

九月 30, 2009
» Android Development Notes

R8075885.JPG
Taipei.Taiwan

台北的稻田…

****

安裝eclipse ADT時遇上找不到plugin的問題。
最後改用手動下載ADT,自己安裝的方式。
http://developer.android.com/intl/ja/sdk/1.6_r1/installing.html#Troubleshooting

Vimplugin for Eclipse
http://vimplugin.org/

六月 10, 2009
» The long way to port my onlinedic on Android platform

P5045763 (by plateaukao)
Cannes.France

坎城除了大家比較熟悉的海邊的星光大道外,
其實在車站的另一個方向有個舊城區。

跟海邊的人潮比起來,
這兒顯得寧靜許多(不過沒有上空美女就是了。
看著清一色的橘紅色屋頂和遠方的山水,晒著不會太炙熱的陽光,
這兒真的很適合度假。
難怪在Bienvenue chez les Chi'tis裡的那個老婆,那麼想要搬到法國南部;
而在南法,特地搬來這兒住的英國人也是屬一屬二多的。

****

After glancing through the basic documents of Android SDK, I still have a lot of work to do before porting my onlinedic to this platform:

1. Find the UI components that I need:
1.1 EditControl
1.2 Button (for start searching)
1.3 HTML viewer
2. How to create and use its menu
3. Find the component to open http requests
4. Find the component to post-process the received html file


As for item 1, it's not so difficult because the UI components I need are few.
Except for the 1.3 HTML viewer, I spent some time to make it work.

First of all, the component to display html content on android is
android.webkit.WebView
You can create this component in the resource and find it by id in the java source code.

Secondly, you need to add a permission line in the Manifest xml file in order to have the access to load URLs.
<uses-permission android:name="android.permission.INTERNET" />

Since I will only use this component to display the processed results of the html, I don't have to study too much about what actions it supports.

As for 2, 3, and 4, I will update later once I know how to accomplish them.

voila, here's the result of today's work:

IMAG0427 (by plateaukao)

****

好久沒到韓風饌吃東西了。
久久吃一次也是不錯的。
新拿到的傢伙太大隻了。
拍起照來手會不穩。
不過,看電子書應該很過癮吧。

IMAG0319 (by plateaukao)

六月 7, 2009
» Android Study: System requirement and Installation

R8074901.JPG (by plateaukao)
Hong Kong

1. eclipse
2. JDK6
3. ant
4. android SDK: need to set up PATH in windows
5. ADT in eclipse: need to add site in eclipse to do the update.

» Android Study

R8074880.JPG (by plateaukao)
Hong Kong

I wanna try out how to write Android softwares on my borrowed Magic device. In order to take notes of my studies, I will write down something here for my later refernce.

1. System requirement and Installation

» Connect HTC Magic to PC

R8075187.JPG
ChangChou.Hong Kong

1. Go to following URL and download "HTCDriver_Update", "HTC Sync".
2. Install them on the desktop. Done!

If you've already installed Android SDK, you can use ADB in the tool folder to interact with Magic now.

» First Android program on real device

R8072380
Pipes.Paris

It's hard to put all the lines in order. So does the life.

****

Finally, I wrote my first android program and put it on the device. Although it's just a small hello world program, it took me some time install the necessary development tools and read some conceptual documents.

From now on, I can start to do some real programming. I plan to port my onlindic to android platform. It's a system to live with internet access; so is my onlinedic (although now it supports local dictionary files already). Hope this can be done in this summer.

The following reference is a tool that can help you to quickly create the UI layout for android applications.

REF:
http://code.google.com/p/droiddraw/

A Feedjack powered Planet
A Django site.