2008年8月25日 星期一
Android 0.9 SDK beta
此版為較穩定的版本,已近於2008年第四季真正上市所使用的1.0版!
Download the Android SDK
若你使用Eclipse開發要安裝ADT
*注意Eclipse要3.3版以上
Installing the Eclipse Plugin (ADT)
2008年6月9日 星期一
2008年3月13日 星期四
Mobile SDK compare
| Apple iPhone SDK | Toolchain | Windows Mobile | S60 | Android | |
|---|---|---|---|---|---|
| Cost | Free | Free | Free; could be more depending on tools used | Free; could be more depending on tools used | Free |
| Wide-scale app availability | June | Now | Now | Now | Depends on device availability |
| Native development | Yes | Yes | Yes | Yes | Yes |
| Languages suppoted for native development | Objective-C | Objective-C | C++, C#, VB.NET | C++ | Java |
| Digital certificates | Required for distribution | No | Available, required for some phones | Available, required for some phones | No |
| Retail support | Full; 30 percent Apple revenue share; free apps allowable | No | Limited | Limited | No, but Android Developer Challenge offers money and publicity |
| Platform maturity | Immature | Immature | Mature | Mature | Immature |
| First-party support | Yes | No | Yes | Yes | Yes |
| Community support | Just getting started! | Excellent | Excellent | Excellent | Excellent |
| App installation method | Direct (App Store), iTunes | Installer.app, custom | Direct, ActiveSync | Direct, PC Suite | Unknown; installation on emulator is not reflective of production devices |
| Emulator available | Yes | No | Yes | Yes | Yes |
| Remote debugging | Yes | No | Yes | Yes | Yes |
| Target device variety | Poor | Poor | Excellent | Good | Poor (that will change, though) |
| Touchscreen support | Multi-touch | Multi-touch | Single touch | Umm... soon? | Single touch |
| App availability and variety | Poor (that will change, though) | Good | Excellent | Excellent | Poor (that will change, though) |
| Underlying architecture | Cocoa Touch / Mac OS X | Mac OS X | Windows | Symbian | Linux |
| Flash availability | No | No | Yes | Yes | No |
| Java availability | No | In development | Yes | Yes | Yes |
From engadgetmobile
2008年3月2日 星期日
2008年2月28日 星期四
Google releases new version of Android SDK m5-rc14
1. user interface - As I mentioned when we introduced the m3 version of the Android SDK, we're continuing to refine the UI that's available for Android. m5-rc14 replaces the previous placeholder with a new UI, but as before, work on it is still in-progress.
2. Layout animations - Developers can now create layout animations for their applications using the capabilities introduced in the android.view.animation package. Check out the LayoutAnimation*.java files in the APIDemos sample code for examples of how this works.
3. Geo-coding - android.location.Geocoder enables developers to forward and reverse geo-code (i.e. translate an address into a coordinate and vice-versa), and also search for businesses.
4. New media codecs - The MediaPlayer class has added support for the OGG Vorbis, MIDI, XMF, iMelody, RTTL/RTX, and OTA audio file formats.
5. Updated Eclipse plug-in - A new version of ADT is available and provides improvements to the Android developer experience. In particular, check out the new Android Manifest editor.
1. 新的使用者介面
2. 可建立Layout animations
3. 地址查詢經緯支援
4. 新的媒體編碼格式
5. 新的Eclipse plug-in
MapActivity in Android 4 - GPS
MapActivity亦可使用GPS定位Google map,不過目前透過內部模擬在Google附近開車的GPS資料進行模擬。
1. mapdemo.java:再將上一篇的程式碼主要加上籃色部份,透過LocationManager使用GPS定位,選單增加GPS項目,P為定位、G為到選單。
|
2. arrays.xml:加上GPS項目。
| <?xml version="1.0" encoding="utf-8"?> <resources> <array name="city"> <item>台北市</item> <item>基隆市</item> <item>台北縣</item> <item>宜蘭縣</item> <item>新竹市</item> <item>桃園市</item> <item>苗栗縣</item> <item>台中市</item> <item>彰化縣</item> <item>南投縣</item> <item>嘉義市</item> <item>雲林縣</item> <item>臺南市</item> <item>高雄市</item> <item>屏東縣</item> <item>臺東縣</item> <item>花蓮縣</item> <item>GPS</item> </array> </resources> |
2008年2月26日 星期二
MapActivity in Android 3 - city menu
加入各縣市表單,你可以更進一步地定位Google map。
1. mapdemo.java:再將上一篇的程式碼主要加上籃色部份,其他部份亦有加上小部份修改,P為定位、G為到城市選單。
|
2. arrays.xml:在目錄res下的values目錄下建立一arrays.xml,是要存放城市表單內容。
| <?xml version="1.0" encoding="utf-8"?> <resources> <array name="city"> <item>台北市</item> <item>基隆市</item> <item>台北縣</item> <item>宜蘭縣</item> <item>新竹市</item> <item>桃園市</item> <item>苗栗縣</item> <item>台中市</item> <item>彰化縣</item> <item>南投縣</item> <item>嘉義市</item> <item>雲林縣</item> <item>臺南市</item> <item>高雄市</item> <item>屏東縣</item> <item>臺東縣</item> <item>花蓮縣</item> </array> </resources> |
3. main.xml:加入選單
|
2008年2月25日 星期一
MapActivity in Android 2
1. mapdemo.java:再將上一篇的程式碼加上籃色部份,可用手機按鍵控制地圖,O為拉遠、I為拉近、S為衛星地圖、上下左右鍵為移動。
|
2008年2月21日 星期四
MapActivity in Android
1. mapdemo.java:將Acitivity改為MapAcitivity如籃色部份,MapAcitivity是Google map使用的class。
|
2. main.xml:將TextView的xml部份換成籃色部份,請注意MapView的部份都是如此定義標籤。
<?xml version="1.0" encoding="utf-8"?> |
2008年2月20日 星期三
Debug in Android
開發程式時,Debug的訊息是很有幫助的!
在Android中,你可以透過 android.util.Log 來Debug!
|
How to see log? LogCat
如何看Debug Message? 使用LogCat
Window >> Show View >> Others
選擇LogCat
訊息出現在LogCat視窗,i=0......
You can click the green icon + to filter log by tag you define in code.And then it's easier to see log.
這麼多Log要怎麼看?你可以點綠+的部分,將剛程式中你所定義的
private static final String TAG = "DEBUG"來加到Filter,如此一來便可方便地只看到自己定義的Log。
2008年2月13日 星期三
How to Android? Step3: Get contacts data from android.provider
如何透過Google的android.provider來取得手機通訊錄資料?
1. AndroidManifest.xml : 在此xml檔案加入下列籃色那個安全性設定,不然會一直發生安全性錯誤!
<?xml version="1.0" encoding="utf-8"?> |
2. hello.java : 在Activity java檔中加入下列籃色部份程式碼!
| package com.google.test; import android.app.Activity; import android.database.Cursor; import com.google.test.R; import android.os.Bundle; import android.widget.TextView; public class hello extends Activity { private TextView tv; @Override public void onCreate(Bundle icicle) { super.onCreate(icicle); setContentView(R.layout.main); tv =(TextView) findViewById(R.id.test); // An array specifying which columns to return. String[] projection = new String[] { android.provider.BaseColumns._ID, android.provider.Contacts.PeopleColumns.NAME, android.provider.Contacts.PhonesColumns.NUMBER }; // Best way to retrieve a query; returns a managed query. Cursor managedCursor = managedQuery( android.provider.Contacts.Phones.CONTENT_URI, projection, //Which columns to return. null, // WHERE clause--we won't specify. android.provider.Contacts.PeopleColumns.NAME + " ASC"); // Order-by clause. getColumnData(managedCursor); } private void getColumnData(Cursor cur){ String name; String phoneNumber; int nameColumn = cur.getColumnIndex(android.provider.Contacts.PeopleColumns.NAME); int phoneColumn = cur.getColumnIndex(android.provider.Contacts.PhonesColumns.NUMBER); String imagePath; tv.setText(""); while (cur.next()) { name = cur.getString(nameColumn); phoneNumber = cur.getString(phoneColumn); tv.append(name+" : "+phoneNumber+"\n"); } } } |
3. main.xml : 在layout資料夾下的main.xml檔案加入下列籃色部份,來顯示抓到的資料!
<?xml version="1.0" encoding="utf-8"?> |
2008年2月12日 星期二
How to Android?Step2:Set up Hello Android
- 經由File > New > Project 目錄建立一個"Android專案"
- 在新專案視窗填入相關明細
- 編輯自動產生的空殼程式,顯示輸出
就是這麼簡單,下面說明每一個步驟
選好Android Project後按Next按紐 再填入專案明細
3.編輯自動產生的空殼程式
外掛執行後,有支產生的程式叫hello.java看起來像這樣
public class HelloAndroid extends Activity |
執行程式碼: hello
Eclipse外掛很容易就可以執行你的程式,開始是從目錄選取Run>Open Run Dialog,會看到
下一步選取"Android Application",按左上角的圖示(一張紙上面有個+號的那個),或是直接在double click "Android Application" ,會載入一個名為"New_configuration" 的新設定
然後按Browse按紐選擇您的專案,外掛會掃瞄專案內的每一個Activity的子類別加到 Activity:標籤下的下拉方塊,因為"Android!您好"只有一個Activity,所以預設就是它了,再來按"Apply"套用,範例如下:
就是這樣 - 您完成了,按Run按紐,Android模擬器啟動後,您的程式就會出現,看起來就像這樣
2008年2月11日 星期一
How to Android? Step1:Tools and SDK
To download and install the ADT plugin, set up an Eclipse remote update site as described in the steps below.
- Start Eclipse, then select Help > Software Updates > Find and Install....
- In the dialog that appears, select Search for new features to install and press Next.
- Press New Remote Site.
- In the resulting dialog box, enter a name for the remote site (e.g. Android Plugin) and enter this as its URL:
https://dl-ssl.google.com/android/eclipse/
Press OK. - You should now see the new site added to the search list (and checked). Press Finish.
- In the subsequent Search Results dialog box, select the checkbox for Android Plugin > Eclipse Integration > Android Development Tools and press Next.
- Read the license agreement and then select Accept terms of the license agreement, if appropriate. Press Next.
- Press Finish.
- The ADT plugin is not signed; you can accept the installation anyway by pressing Install All.
- Restart Eclipse.
- After restart, update your Eclipse preferences to point to the SDK directory:
- Select Window > Preferences... to open the Preferences panel. (Mac OS X: Eclipse > Preferences)
- Select Android from the left panel.
- For the SDK Location in the main panel, press Browse... and locate the SDK directory.
- Press Apply, then OK.
所謂工欲善其事必先利其器,而Android主要是已Java-based進行開發,所以在此建議你使用Eclipse IDE來開發Android。你可以在下方連結進行下載:
Eclipse Downloads Home
當你安裝Eclipse後,然後再安裝Android Development Tools (ADT) 的外掛,ADT提供了Android專案與工具的整體支援。
- 啟動Eclipse,選擇Help > Software Updates > Find and Install....
- 對話視窗出現後,選擇Search for new features to install後按Next.
- 按New Remote Site .
- 在最後的對話視窗的remote site鍵入名稱(如Android 外掛)與以下URL
https://dl-ssl।google।com/android/eclipse/
後按OK - 然後您會看到新站台出現在搜尋清單上(且被選取),按Finish.
- 在接下來的搜尋結果對話視窗核取然Android Plugin > Eclipse Integration > Android Development Tools 後按Next.
- 閱讀許可條款, 如果同意的話選取Accept terms of the license agreement,按Next
- 按finish.
- ADT外掛未經簽署,您可以按Install All. 同意安裝
- 重新啟動Eclipse
- 重新啟動後,更新您的Eclipse的preferences 指定SDK的目錄路徑
A.選擇Window > Preferences... 開啟Preferences panel. (Mac OS X: Eclipse > Preferences)
B.選擇左邊版面的Android
C.在主版面上的SDK Location ,按Browse... ,指定SDK的目錄路徑
D.按apply後再按OK
最後再安裝Android SDK
2008年2月8日 星期五
2008年2月7日 星期四
Flash Lite
In 2006, Macromedia released Flash Lite2.0, great progress in new version. It's based on Flash6 and supported chinese.
In 2007, Adobe(Macromedia merged by Adobe) released Flash Lite3.0. It's based on Flash8 and supported FLV streaming video and dynamic loading XML. It's a powerful version.
Macromedia在2003年推出Flash Lite1.0,以Flash4指令碼引擎為基礎的全新Flash行動版本,也就是手機版的Flash,早期提供了基本動畫與網路連接功能。最先採用Flash Lite的行動電話服務業者是日本的NTT DoCoMo與NTT的i-mode服務。
在2006年Macromedia推出Flash Lite2.0,新版本的功能有大幅提升,以Flash6指令碼引擎為基礎,並支援中文字體。
在2007年Adobe(Macromedia被併購)推出Flash Lite3.0,以Flash8指令碼引擎為基礎,支援FLV視訊功能,支援動態載入XML資料,功能十分強大。
Flash Lite Application - Flash Lite的應用
We can use Flash Lite to develop mobile application, such as tube guide, traffic query, rss reader, game, UI etc.
Flash Lite可用來開發手機的應用程式,如導覽地鐵路線圖的查詢應用程式、即時路況查詢、Rss閱讀器等。當然一般經常使用的遊戲、桌面主題或甚至是手機使用介面UI。
Example 應用程式:flash2U
Game & Screens:Smashing Ideas
Future - Flash Lite的未來發展
It is getting mature for Flash Lite, but comparing with J2ME or BREW, It's not popular.
Its strength is based on popularity in the Internet and many developers for Flash. Besides, data compression and user-frieandly are another advantage.
Its weakness is many limitations of mobile, and too many version of Flash Lite.
It's not popular for Flash Lite now. I think its version might take a little long time to be in unanimity.
The key is ISP must support Flash Lite service, whatever softwave or hardware.
FlashLite已由早期發展的平台,漸漸到成熟的平台,不過跟J2ME或BREW等相對成熟的技術比,普及率恐怕還是相差許多。
它所具有的優勢是基於Flash在網際網路上的普及率與現有的開發人員,另外就是FlashLite透過良好的設計跟壓縮最佳化,可以有效降低資料傳輸量,也就代表可能可以節省不少費用,同時提供良好的使用者介面。
但是目前所具有的劣勢是,在手機或embedded system這兩塊市場先天或後天的限制太多,目前在市面上的版本就有1.0與2.0之系列,而這也讓開發人員難以適從。
目前FlashLite手機並不算普及,因此要所有手機都支援FlashLite且版本較為一致時,恐怕還需要一段不短的時間。
而關鍵也就是行動網路服務供應商必須支援,無論是在金錢和硬體上投資或在行銷上推動Flash內容。
目前Flash Lite手機
下載 Macromedia Flash Lite 1.1 CDK
下載 Macromedia Flash Lite 2 CDK
Adobe Flash Lite 3 Developer Edition
2008年2月4日 星期一
Where is Android ?
Android SDK http://code.google.com/android/download.html
Android blog http://android-developers.blogspot.com/
What is Android ?
Android是一個包含作業系統、中介程式與應用程式的行動裝置軟體平台,初期的Android SDK提供必要的API(應用程式開發介面)與工具以使用Java語言開發在Android平台上開發應用軟體。
The picture shows The Tools(Eclipse) to develop Android project. Because there is no Android mobile now,so developers must use simulator of Android.
Google的Android手機軟體開發工具,上圖顯示在Eclipse程式工具計畫中所看到的編程情況,目前由於無實體的Android手機,因此開發人員必須透過模擬器來模擬操作。
