Showing posts with label Android. Show all posts
Showing posts with label Android. Show all posts
Wednesday, December 18, 2013
[Android] Google 廣東話輸入法正式支援倉頡三代
用開 Windows 倉頡輸入法嘅朋友有福了,因為廣東話輸入已經正或支援倉頡三代,打咗咁多年三代無理由要改手勢嘛!其實呢個輸入法仲包括拼音、手寫、語音及筆畫輸入,仲有中英混合鍵盤,未下載既朋友要試下啦!
https://play.google.com/store/apps/details?id=com.google.android.apps.inputmethod.cantonese
Monday, December 2, 2013
Admob SDK 加入 Google Play Services 大家庭
剛發現 Google Mobile Ads SDK 文件更新,Admob SDK 已經加入 Google Play Services。以後開發者只要更新 Google Play Services 的 Library 就可以一同更新 Admob SDK,不用再額外更新 Admob SDK了。
似乎 Google Play Services 將會統一所有 Google library,下一步相信會是 DFP 吧。雖然方便了開發者,不過各位很可能會見到 Google Play Services 的用電量再創新高。
更新 Google Play Services 後(記得要將 google-play-services_lib re-build 一次,否則會找不到 Admob SDK),要在新專案加入 Admob 廣告的話可以根據以下方法:
https://developers.google.com/mobile-ads-sdk/docs/
如果是舊專案過度 Google Play Services 可以參考這裡:
https://developers.google.com/mobile-ads-sdk/docs/admob/play-migration
似乎 Google Play Services 將會統一所有 Google library,下一步相信會是 DFP 吧。雖然方便了開發者,不過各位很可能會見到 Google Play Services 的用電量再創新高。
更新 Google Play Services 後(記得要將 google-play-services_lib re-build 一次,否則會找不到 Admob SDK),要在新專案加入 Admob 廣告的話可以根據以下方法:
https://developers.google.com/mobile-ads-sdk/docs/
如果是舊專案過度 Google Play Services 可以參考這裡:
https://developers.google.com/mobile-ads-sdk/docs/admob/play-migration
Monday, April 15, 2013
Android App 香港快拍的演變
香港快拍首個版本 v1.0 於 2011 年初放到 Play Store, 到第二個版本 v1.1 上載當日,即 2011 年 2 月 6 日使用者大概還只有 150 多人。當初因為功能有限,介面設計比較簡陋,可以看看剛發表時的介面截圖:


可以看到整個 app 就是以單頁基本,外加兩個可彈出的圖片及新聞頁。其後加入了 30 個自訂位置,以每版 6 個,共 5 版的左右滑動模式,方便用家以最快的方法看到經常使用的快拍位置。另外還有以地圖大頭針方式顯示各個快拍位置等功能。因為功能增加所以加入了一個主目錄,以下為這些新功能的載圖:



基本上整個香港快拍到這裡己經成形,因為大量功能更新所以香港快拍亦到進化為香港快拍+,這個 "+" 絕對是因為剛推出 Google+ 而改 :P。新版本上載時間為 2011 年 11 月,原版本的下載數目已經突破六萬。在這個版本更新後亦都有持續穩定增長,更於數次媒體介紹後得到大量下載標升。其後因應 ics 及 jellybean 推出,除了功能更新外,部份介面亦都更新為 Holo Theme,可以看看新舊對比:

除了手機版本更新外,平版熱賣都增加筆者支援平版的決心,於 2012 年 1 月 12 日(當時下載次數為八萬),當日上載的香港快拍+ v4.1.0 版本全面支援平版電腦:


到這個更新上載後一年多,其間再更新了道路狀況,及加入 14 個新快拍位置,下載量已經由八萬增加了接近一倍,當然 Android 的佔有率還幫上了一個大忙。
接著就到近一個月加入的 13 個新功能:自動搜尋附近路況、雲端備份、3D地圖、入油計算器、地圖上的行車時間顯示、過海行車時間表、用家預設快拍頁面等,現在就來看看最新面 v6.0.0 的最新截圖:



希望這個更新後會有再多一倍的增長 :P,如果各位用家有甚麼建議,不妨留言談談吧!
香港快拍+:
Saturday, December 15, 2012
Android app locale settings suggestions
To all Android developers:
I am writing this message due to the fact that it is incorrect for a lot of Android app's locale settings to display Simplified Chinese instead of Traditional Chinese if the system setting is "Hong Kong". This makes a lot of noise in Hong Kong recently.
Except for China, all Chinese based region including Hong Kong, Taiwan and Macao are using Traditional Chinese but not Simplified Chinese. It is inconvenient for Traditional Chinese users to read Simplified Chinese. Hence, if your apps would like to provide both Traditional Chinese and Simplified Chinese, please use below settings:
res/value-zh <- Traditional Chinese
res/value-zh-rCN <- Simplified Chinese
Or if you would like to keep the standard TW locale:
res/value-zh <- Traditional Chinese
res/value-zh-rTW <- Traditional Chinese
res/value-zh-rCN <- Simplified Chinese
Or if you would like to specify for all region:
res/value-zh <- Traditional Chinese
res/value-zh-rHK <- Traditional Chinese
res/value-zh-rTW <-Traditional Chinese
res/value-zh-rCN <- Simplified Chinese
Never use Simplified Chinese string in value-zh as you can use value-zh-rCN to get the right result. If devices do not support rHK, all these devices could still get the correct locale if value-zh string is Traditional Chinese.
As English is also an official language in Hong Kong, if your apps support Simplified Chinese only, please put the English string to res/value-zh-rHK (At least the rHK supported device can get the right locale). Or you can send me an email with the Simplified Chinese string.xml attach, I'll try my best to help you to organize and translate the Simplified Chinese to Traditional one.
Best Regards,
Allen Chan
(An Android developer in Hong Kong)
email: allen517@gmail.com
I am writing this message due to the fact that it is incorrect for a lot of Android app's locale settings to display Simplified Chinese instead of Traditional Chinese if the system setting is "Hong Kong". This makes a lot of noise in Hong Kong recently.
Except for China, all Chinese based region including Hong Kong, Taiwan and Macao are using Traditional Chinese but not Simplified Chinese. It is inconvenient for Traditional Chinese users to read Simplified Chinese. Hence, if your apps would like to provide both Traditional Chinese and Simplified Chinese, please use below settings:
res/value-zh <- Traditional Chinese
res/value-zh-rCN <- Simplified Chinese
Or if you would like to keep the standard TW locale:
res/value-zh <- Traditional Chinese
res/value-zh-rTW <- Traditional Chinese
res/value-zh-rCN <- Simplified Chinese
Or if you would like to specify for all region:
res/value-zh <- Traditional Chinese
res/value-zh-rHK <- Traditional Chinese
res/value-zh-rTW <-Traditional Chinese
res/value-zh-rCN <- Simplified Chinese
Never use Simplified Chinese string in value-zh as you can use value-zh-rCN to get the right result. If devices do not support rHK, all these devices could still get the correct locale if value-zh string is Traditional Chinese.
As English is also an official language in Hong Kong, if your apps support Simplified Chinese only, please put the English string to res/value-zh-rHK (At least the rHK supported device can get the right locale). Or you can send me an email with the Simplified Chinese string.xml attach, I'll try my best to help you to organize and translate the Simplified Chinese to Traditional one.
Best Regards,
Allen Chan
(An Android developer in Hong Kong)
email: allen517@gmail.com
Tuesday, November 27, 2012
Friday, September 28, 2012
香港快拍+ v5.1.0 更新
- 增加穩定性
- 轉用另一個天氣資訊供應商,因早前 google weather api 正式關閉引致本 app 經常 force close 之問題亦隨之解決。
- 新增以下位置:
粉嶺公路近港鐵粉嶺站
獅子山隧道公路近紅梅谷路
港深西部公路近廈村
元朗公路近丹桂村
大欖隧道元朗入口
大欖隧道汀九入口
南灣隧道昂船洲大橋入口
沙田嶺隧道沙田入口
象鼻山路近美環街
西區海底隧道香港入口
西區海底隧道九龍入口
大老山隧道九龍入口
東區海底隧道九龍入口
大老山隧道沙田入口
Download From Google Play
Monday, September 24, 2012
增加按鈕可按面積
在設計 ui 時侯因為要遷就版面, 有時按鈕被迫佔用較少位置, 手指頭大的用家當然會按得較吃力, 解決方法好簡單, 使用 TouchDelegates 增大可按面積就可以了:
以下 example 來自: http://www.thomas-manthey.net/2012/03/04/android-basics-using-touchdelegates/
使用方法:
將 getTouchDelegateAction 放入自己常用 library, 以後按需要直接使用, 紅黑紅紅黑, 就係咁簡單.
以下 example 來自: http://www.thomas-manthey.net/2012/03/04/android-basics-using-touchdelegates/
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | /** * Adds a touchable padding around a View by constructing a TouchDelegate * and adding it to parent View. * @param parent The "outer" parent View * @param delegate The delegate that handles the TouchEvents * @param topPadding Additional touch area in pixels above View * @param bootomPadding Additional touch area in pixels below View * @param topPadding Additional touch area in pixels left to View * @param topPadding Additional touch area in pixels right to View * @return A runnable that you can post as action to a Views event queue */ private static Runnable getTouchDelegateAction(final View parent, final View delegate, final int topPadding, final int bottomPadding, final int leftPadding, final int rightPadding) { return new Runnable() { @Override public void run() { //Construct a new Rectangle and let the Delegate set its values Rect touchRect = new Rect(); delegate.getHitRect(touchRect); //Modify the dimensions of the Rectangle //Padding values below zero are replaced by zeros touchRect.top-=Math.max(0, topPadding); touchRect.bottom+=Math.max(0, bottomPadding); touchRect.left-=Math.max(0, leftPadding); touchRect.right+=Math.max(0, rightPadding); //Now we are going to construct the TouchDelegate TouchDelegate touchDelegate = new TouchDelegate(touchRect, delegate); //And set it on the parent parent.setTouchDelegate(touchDelegate); } |
使用方法:
1 2 3 4 5 6 | //Get references to the View in the layout parent = (View) findViewById(R.id.parent); delegateButton = (View) findViewById(R.id.cmdClickMe); //The TouchDelegate has to be set after everything has been calculated and drawn parent.post(getTouchDelegateAction(parent, delegateButton, 50,50,50,50)); |
將 getTouchDelegateAction 放入自己常用 library, 以後按需要直接使用, 紅黑紅紅黑, 就係咁簡單.
Tuesday, September 18, 2012
Android 華麗介面匯聚
Android 工程師 Romain Guy 剛分享了一個連結, 內含大量華麗軟件截圖, 要設計一個吸引人的軟件絶不容易, 現在不妨參考一下高手的作品吧.
http://androidniceties.tumblr.com/
http://androidniceties.tumblr.com/
Tuesday, September 4, 2012
Wednesday, August 15, 2012
Monday, August 13, 2012
Google Now 小小心得 (2)
各大球賽聯賽即將開鑼, 今次教大家如何在 Google Now 中顯示各位關心的球隊卡片.
有使用 Google Now 的朋友都應該會留意到 Sports 卡片中的設定是灰掉了的, 即大家不能在設定中增加球隊, 其實這個設定只是用來刪除球隊之用. 要增加球隊, 你需要跟以下的步驟設定:
首先登入自己的 Google Dashboard: https://www.google.com/dashboard/ , 於 Account 中點選 Manage account > Go to web history > 啓動 Web History.
完成後便可以在 Google Now 中搜尋你喜愛的球隊名稱, 如該球隊在最近有比賽的話, 你就可以看見比賽結果的卡片了.
有使用 Google Now 的朋友都應該會留意到 Sports 卡片中的設定是灰掉了的, 即大家不能在設定中增加球隊, 其實這個設定只是用來刪除球隊之用. 要增加球隊, 你需要跟以下的步驟設定:
首先登入自己的 Google Dashboard: https://www.google.com/dashboard/ , 於 Account 中點選 Manage account > Go to web history > 啓動 Web History.
完成後便可以在 Google Now 中搜尋你喜愛的球隊名稱, 如該球隊在最近有比賽的話, 你就可以看見比賽結果的卡片了.
Thursday, August 9, 2012
語音搜尋戰: Google Voice VS Siri
網上有朋友 Jean-Louis Nguyen 製作了以下的影片, 他對 Google Voice 發問了 40 多個問題, 讓大家可以了解 Google Voice 強大的搜尋能力, 請特別注意最後一個問題!
其後 CaptainPrad 對 iPhone iOS6 的 Siri 作了相同問題的測試:
最後還有 TechnoBuffalo 的 side-bye-side 測試, 搜尋能力, 速度一目了言:
在簡單的問題上兩者不會有太大分別, 但比較複雜的問題上, Siri 所提供的搜尋結果很多都到喉唔到肺, 搜尋能力及速度上始終及不上靠搜尋器起家的 Google Voice.
Friday, August 3, 2012
Google Now 小小心得
可能有很多香港朋友都見過, 經 Google Now 搜尋的結果跟外國朋友不大相同. 就如跟人物相關的資料時, 外國朋友的搜尋結果一般都會有人物相片顯示. 但為可香港朋友(或非美國本土)就沒有顯示呢?
以往近似問題最常見的解決方法是設定系統語言為 English (U.S.), 但在 Google Now 卻不能用這個方法解決. 原來只要在 settings>accounts >Google>Search, 把 Seach on google.com 勾選了就可以. (否則在香港而言則以 google.com.hk 搜尋)
設定前:
設定後:
Credit to Lewis McGeary
Wednesday, July 11, 2012
Jelly News v0.4.2 released! (Was named GReadNotifier)
"GReadNotifier" has been renamed to "Jelly News"!!! Now fully support Jelly Bean's Expandable Notification. (See the screenshots below!)
Jelly News links your Google Reader and show your favorite news in notification bar. Read your feed anytime even running other apps on top!
Before using the app:
1. You need a Google account
2. Subscript your favorite news channel in Google Reader
App Instructions:
1. Add your google account in preferences page
2. Press "On" to start the background service
3. Wait for the news update
4. Expend the notification to read the news if you are using Jelly Bean
5. Or click the notification to read the full article
6. Swipe the screen to turn to last or next news
5. Or click the notification to read the full article
6. Swipe the screen to turn to last or next news
Wednesday, July 4, 2012
Android 新 UI 功能向後支援總匯
由 3.0 開始,Google 發表了不少新的 UI 功能以加強用戶體驗,計有 3.0 發表的 Action Bar、Fragment 、 Property Animation。3.0 發表並於 4.0 大幅進化的 Holo Theme,4.0 發表的 Grid Layout,4.1發表的 Notification, 豐富 Activity 轉換動畫的 ActivityOptions 等。大量新功能要向下支援舊版本確實是開發者一大煩惱。幸好很多有心人為了減少其他開發者的時間,發表了不少支援 Library,令開發者可以把時間專注於本身軟件的功能上。下面是一個支援庫總匯,希望開發者可以更新自家軟件並用盡 4.0 UI 功能,使用家不用再忍受新舊 UI 軟件同時使用的煩惱:
Action Bar:
ActionBarSherlock
http://actionbarsherlock.com/
Fragment:
Google 自家出品的 Support library
http://developer.android.com/tools/extras/support-library.html
Animation:
NineOldAndroid
http://nineoldandroids.com/
Holo Theme:
Holo Everywhere
https://github.com/ChristopheVersieux/HoloEverywhere
Grid Layout:
android-gridlayout
https://github.com/dlew/android-gridlayout
Notification:
NotificationCompat2 (UI 上舊版本不會有變化, 但新 api 不會令版本舊 force close )
https://github.com/JakeWharton/NotificationCompat2
ActivityOptions:
ActivityCompat2
https://github.com/JakeWharton/ActivityCompat2
[更新 NotificationCompat2, ActivityCompat2]
Action Bar:
ActionBarSherlock
http://actionbarsherlock.com/
Fragment:
Google 自家出品的 Support library
http://developer.android.com/tools/extras/support-library.html
Animation:
NineOldAndroid
http://nineoldandroids.com/
Holo Theme:
Holo Everywhere
https://github.com/ChristopheVersieux/HoloEverywhere
Grid Layout:
android-gridlayout
https://github.com/dlew/android-gridlayout
Notification:
NotificationCompat2 (UI 上舊版本不會有變化, 但新 api 不會令版本舊 force close )
https://github.com/JakeWharton/NotificationCompat2
ActivityOptions:
ActivityCompat2
https://github.com/JakeWharton/ActivityCompat2
[更新 NotificationCompat2, ActivityCompat2]
Tuesday, June 26, 2012
Android device 多逹 4000 種, 不同螢幕大少/解像度會否成為開發者的致命傷?
早前有報導指 Android device 多逹 4000 種, 亦因此為開發者帶來不少難度. 其中, 各種不同螢幕大少/解像度會否成為開發者的致命傷?
要設計一個能支援所有 Screen Size 的 UI 主要考慮到三點, 一是螢幕大小 , 二是螢幕密度 , 三是顯示方向.
一, 螢幕大小歸納了四種: small, normal, large, and xlarge. 由 1.6 版本開始, Google 已經向開發者說明 UI 設計應該使用 Density-independent pixel (dp / dip) 作為計算單位. 所以, 首先注意的是每一件元件都要以 dp 來作單位, 而不是 px. 再配合不同 Qualifier 就可以為不同大小的螢幕設定不同的排版 (如: layout-small/, layout-xlarge/). 排版時要善用 weight 及 9.patch 圖片, 這樣系統顯示版面時會自動為不同螢幕大小修正長度,
二, 螢幕密度大概分為 ldpi, mdpi, hdpi, xhdpi 及 tvdpi(Google TV用及新的 Nexus 7), 根據(一)的排版, 就可以製作不同大小的圖像應用到不同密度的螢幕. 圖像大小可以以 mdpi 作為參巧值, 如一個 50x50px 的圖片, 在 hdpi 可以製作成 75x75px. 除質素提高外, 較大的圖像所製作的按鈕在高密度的螢幕會較為好按. 如果用家的設備沒有相應的圖像資源, 系統則會自動縮放現有的資源顯示. 如要偷懶的話, 可以只為 hdpi 製作圖像, 但細小的螢幕可能會出現圖像過大的情況, 而自動縮放亦都會使圖像質素下降.
三, 基本上只要為(一)所排的版面再以不同方向排版一次, 如有需要的話可以配合 Fragment 為不同的方向製作不同版面, 這個有機會再講.
如一切順利的話, 你的應用相信已經可以支援市場上九成九的螢幕了。相信第一次製作全螢幕支援的軟件會感到困擾, 但一掌握了技術的話, 以後只要作幾個重點測試已經足夠了. 況且就算做得不太好, 亦只會"比較難睇", 軟件還是可用的. 相信不會成為開發者的致命傷.
返回 Launcher, 按 Back / Home 鍵究竟有何分別?
Android 的優勢是多工作業, 很多用家會在使用一個軟件的途中返回 Launcher(即主桌面) 看看 Widget 中的資訊或啟動其他軟件, 完成後再返回原來的軟件. 那麼在軟件的主介面中, 按 Back / Home 鍵究竟有何分別呢? 甚麼時候應該按 Back, 又甚麼時候應該按 Home 呢?
其實主要分別在於 Back 鍵是直接關閉當前軟件, 再返回 Launcher(或返回啟動該軟件的軟件). 而 Home 鍵則是直接呼叫 Launcher 到當前畫面, 沒有經過關閉原來軟件的程序. 本來的軟件會隱藏到背景當中繼續運作, 如有資料傳輸的話會繼續其工作, 直至資源不足 - 系統必需回收資源以供其他軟件使用時才會關閉軟件. 即 Back 鍵適合使用完該軟件, 並短時間內不會啟動. Home 鍵則適合短時間內會再使用軟件或要把軟件放到背景中繼續運作時用.
簡單總結:
Back:
- 在主介面中會關閉當前軟件
- 在軟件 副頁面 時, 會返回上一頁/返回主介面
- 當軟件關閉後, 下次啟動時需要重新載入
- 適合使用完該軟件, 並短時間內不會再啟動
- 收藏鍵盤
Home:
- 在軟件使用中, 不論在主介面或副頁面, 都會即時帶出 Launcher
- 軟件只是隱藏到背景當中繼續運作
- 軟件隱藏中並再次啟動時,系統只會把軟件放回前景, 不會重新載入
- 軟件隱藏太久或資源不足時, 系統會自動關閉並回收所用資源, 那重新啟動時便要重新載入
- 適合會於短時間內返回軟件, 節省重新載入時間
- 適合該軟件仍然在運作中, 並會於短時間內返回軟件, 完美運用 Android 多工優勢
那有沒有例外的情況呢? 有!
有些軟件不支援返回前景 / 隱藏到背景的動作, 其實是開發者強行每次啟動時都要重新載入, 那麼不論按 Back / Home 也不會有分別.
P.S. 如何啟動正在隱藏的軟件? 其實不論已關閉或正隱藏的軟件啟動方法都是一樣, 在 Launcher 中啟動或按最近使用紀錄按鈕叫出最近使用例表中啟動 ( 3.0 前的 Device 長按 Home)
Wednesday, May 23, 2012
Android 版本 Theme Hospital (杏林也瘋狂)
安裝方法:
1. 請先安裝 CorsixTH apk: 到這裡下載最新版本
2. 下載原版遊戲: Download (From: http://digiex.net)
3. 把 rar 解壓, 再放入 sdcard/th (可以在 CorsixTH 更改路徑)
4. 可以開始遊戲了
小心得:
1. 移動地圖及旋轉傢私向方可以用 double tap 達成
2. 如 save 新檔不能叫出 keyboard, 可以存進 autosave 複蓋
3. setting 要 exit 再進入才會再出現
p.s. 已測試 Galaxy Nexus 及 Galaxy Tab 10.1 可成功運行. 設定 Default 解像度為 640x480, 字體大少會比較好看一點.
Tuesday, May 15, 2012
移除 Apps 後, 可否完美地刪除在 SD Card 上遺留的資料?
答案是"沒有".
因為當你安裝每一個 App, 佢就可以在 sdcard 製造無限檔案跟資料夾. 大概係因為當年 Google 未提議開發商將資料放入 /sd_path/Android/data/package_name/ 的後遺症.
在當時, 因為存取 SD card 資料並無一個清楚指引, 每一個開發商都會隨意在 SD card 建立不同資料夾存放資料, 當用家使用了手機一段時間後, SD card 便會變得混亂非常. 其後 Google 係發布 Android 2.2 時連同新增的 API 加入了這個指引, 這個路徑內的資料會於 Apps 移除時一併刪除.
當然很多開發商仍然不跟隨指引, 例如因為軟件升級會刪除此路徑上的資料, 為保留資料確有需要另建資料夾.... 所以就只有靠用家自己刪除了.
Wednesday, March 21, 2012
“香港快拍+” 整合 google 香港交通路況
前天 google 發表了 google map 的香港交通路況,這個偉大的功能相信各位都等了很久,既然都是交通類功能,就用了點時間把它加入了香港快拍+之中, 自此塞車情況以及實時影像可以一目了然,無須再在 google map 及香港快拍+之間互相切換。
請到各位到 market...... Play 下載 v4.2 更新吧。
請到各位到 market...... Play 下載 v4.2 更新吧。
Subscribe to:
Posts (Atom)










