Friday, October 26, 2012

Creating Android Icon

 Finding a tools to create an icon for your Android apps? Check this out.

Greenfish Icon Editor Pro Portable

Friday, October 12, 2012

Android 4.1.2 factory image new available for download

Android 4.1.2 stock ROMs for various Nexus device are now available for download.

Supported device list is as below:

- Nexus 7
- Nexus Q
- Galaxy Nexus
- Nexus S

Thursday, August 16, 2012

Android version vs API Level

As new version of API released, you can bring more feature to your own apps.
However, those apps written by new API Level will not be assessable by old of Android version. Developer then get to make your own choice,

more new feature ? or more potential user?

Platform VersionAPI LevelVERSION_CODENotes
Android 4.1, 4.1.1 16 JELLY_BEAN Platform Highlights
Android 4.0.3, 4.0.4 15 ICE_CREAM_SANDWICH_MR1 Platform Highlights
Android 4.0, 4.0.1, 4.0.2 14 ICE_CREAM_SANDWICH
Android 3.2 13 HONEYCOMB_MR2
Android 3.1.x 12 HONEYCOMB_MR1 Platform Highlights
Android 3.0.x 11 HONEYCOMB Platform Highlights
Android 2.3.4
Android 2.3.3
10 GINGERBREAD_MR1 Platform Highlights
Android 2.3.2
Android 2.3.1
Android 2.3
Android 2.2.x 8 FROYO Platform Highlights
Android 2.1.x 7 ECLAIR_MR1 Platform Highlights
Android 2.0.1 6 ECLAIR_0_1
Android 2.0 5 ECLAIR
Android 1.6 4 DONUT Platform Highlights
Android 1.5 3 CUPCAKE Platform Highlights
Android 1.1 2 BASE_1_1
Android 1.0 1 BASE

As of  Aug 2012 with "Health and Fitness" apps, majority (58%) Android version is still in 2.3.3. Latest version 4.0.3 just get ~18. % share.

So, you get the answer

Monday, August 13, 2012

海豹雜記: StockWatcher -- Google Web Toolkit(GWT) 入門 (三)

海豹雜記: StockWatcher -- Google Web Toolkit(GWT) 入門 (三): 在 StockWatcher -- Google Web Toolkit(GWT) 入門 (二) 中已經將所有的使用者介面元件建立好了,接下來要建立元件的 event,讓這些原件可以有一些動作。 處理客戶端的 Event 加入 Event Handler 在 GWT...

Saturday, August 11, 2012

send SMS to Android Emulator

If you try to develop SMS related Android app, you may want to send testing SMS to your emulator through Emulator Console.

With Emulator Console, you can simulate voice call and SMS activity on your Android Virtual Device (AVD). To make it works, please following the following steps

1. Make sure your AVD was started.

2. Start putty. (Get here if don't have.)

3. Connect your local host with TCP port 5554. Press "Save" and "Open" to start Emulator Console.

4. if all things go fine, Emulator Console will display as follow.

5.  Type in "sms send <phone number> <message text>".

6. SMS message will be delivered ti AVD.

Tuesday, August 07, 2012

Google Play : Android Developer Console beta problem

Google had released a new beta version of Google play Android Developer console..
However, I get a problem when in providing multiple language description on my apps.

I defined 4 language description (English-US, English-EN, Trad Chinese & Simp. Chinese). It looks fine in new beta.
But when I switch back to old version. the language tag just show Eng-en x 3 & 1 x Trad Chinese.

I have reported the issue to Google, and see if they have any reply.

Friday, August 03, 2012 registration started registration has been started. get your won name, before it was taken by the others!  UI is much more clean, with limited Ads, then Hotmail, cool.

If you have a Mobile Device including Windows /Mobile / iPhone / Android, you may also download it official apps too.

Microsoft has NOT announced if existing will get any changes, but the log-on it screen has gone into the Metro way, just like I just worried how long will Microsoft keep it operation

Thursday, August 02, 2012

making table on Blogger / BlogSpot

If  you have table prepared on Excel and wanted to paste it on Blogger, table layout will be destroyed.
Its because Excel table incuded large amount of specific layout including actual pixel size, position, etc.

To make the layout in order, switch to "HTML" immediately right after you you pasted the Excel table in "Compose", and clear up all unwanted tag

 Her it get a nice HTML basic example for you, from another Blogger.

Error when implementing AdMob into existing Android app

After a successful application of AdMob, next step to start your Ads business is integrate the AbMob into your apps. I am not going through the detail as, its really simple for person who can write your own apps.

I just want to share some experience during the implementation,  especially when your existing apps are developed based on Android 2.3 or prior version.

if you following the guideline from Google AdMob, you may get the following error

<activity android:name=""

error: Error: String types not allowed (at 'configChanges' with value 'keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize').

When your are using AdMob V6+, you apps SDK must be Android 3.2 (target SDK 13) or above. For new I recommend you to use Android SDK 4.0.3 (SDK 15), as Android 3.2 was for Tablet.

1. In AndroidManifest.xml, make the changed as below. remeber to setup your minSdkVersion, or your existing coding may not be run.


 2. Make the following changes in "" file
# Project target.

Please note after the implementation. you lay out will have become Android 4.0 stylus. UI appearance may be changed.

Ads on your apps, AdSense vs AdMob vs AdWord

Google has several brands of advertising product, with different type of target audience.


It's target for bsuiness who want to be place advertisement and be exposure on the Internet.
They pay for Gogole and let their Ads be show up on the relative site. As a developer, its not my job, but my "Boss" job.


 If you own a web site / forum / blog and want to get some money, AdSense would be your choice. With large advertiser based, it provided localized advertisement network, in which the Ad it show on your site will could match the taste of your daily visitors.

However, a unapproved AdSense, I can tell you that its not easy to get a register AdSense in these years. First your content provided should be "clear". Any immortal content on your site, or misbehavior that affected your Ads click rate will probably lead your account disabled. AdSense application is not easy to get approved.

With the content of this Blog provided today (~ 20 post), Google AdSense defined it as "insufficient content" and will simply reject my application. As a developer, its also not the things for me. It takes large amount of time and effort to maintenance a webpage / Blog / forum with quality content, but what I am focusing is my Mobile Apps.


If you have developed a android apps and published to Google Play, like me, and wanted share your products with Ads, it would be much easier to apply (vs AdSense). If you have a published apps on Google Play, can get your AdMob A/C on the fly once your  application submitted. Google also provided a tidy library JAR and allow you to implement your the Ads to your apps easily.


IF you have a apps on Google play and want to get some cash, Apply AdMob now, and start your Ads business.

Account who should apply? Cash flow What you need?
AdSense Web site owner / Blogger get paid An operational website / Blog
AdMob Mobile App Developer get paid An apps published on Google Play (or Apps Store)
AdWord Marketing people Pay Cash

Tuesday, July 31, 2012

"unable to resolve target" and "Unable to get system library for the project"

Have you even tried to import an Android Project into Eclipse, but get error like "unable to resolve target" and "Unable to get system library for the project" ? If so, this post may help.

 In sometimes, the error was caused by unavailable of certain Android SDK version. The project may be build based on a version of Android SDK, that your Eclipse had not installed.

To solve the issue, just following the steps below.

1. In Eclipse, right click your project > Properties.
2. Click Android, select a build target and "ok"
3, When you go back to Eclipse, clokc, Project > Clean > Clean all projects

Then back to your .java and all error should be removed.

p.s. The nice example was came from How to convert an Activity class to use with FragmentPagerAdapter

Report for Apple apps naming

Its always be a hard decision in naming my own apps. For me, I get to consider a few issues.

1. Descriptive - User get to know what you apps is through the name

2. Unique - Make your apps different from other

3. Simple - Easy to remember, so that it can be told to others!

For sure that I am not very well in apps naming.

How would you name your apps? See if you can be inspired by those Apple IOS developer.

Most commonly used wording in IOS apps name:
1. HD – 27777
2. Lite – 21690
3. Free – 18511
4. iPad – 11313
5. Pro – 9024
6. Guide – 8361
7. Mobile – 7695
8. App – 6142
9. iPhone – 5441
10. Game – 5377
11. Travel – 4851
12. Radio – 4633
13. World – 4504
14. Map – 4351
15. Dictionary – 4220
16. Edition – 4198
17. Calculator – 4164
18. Kids – 3852
19. English – 3680
20. News – 3611
21. Book – 3254
22. Magazine – 3009
23. Photo – 2957
24. Puzzle – 2835
25. Music – 2764

Which words do App developers most commonly use in their App titles?
Apps Score Report June 2012

Monday, July 30, 2012

"R cannot be resolved" error

For "R cannot be resolved" error, in most cases, the problem may relied on the Java itself, but /res/values/strings.xml. Make sure the syntax of XML is correct.

Sunday, July 29, 2012

Baby milkfeed counter

It help parent to record the volume of milk their baby taken. It also tell you your baby age and birthday! And the most amazing thing is ... its my first Android apps!

Localized  in English, Chinese, Simp. Chinese, Trad. Chinese

You may download the apps Baby milkfeed counter from Google Play .

Upgrade and Versioning of your apps

If you have developed feature or bug fix your Android apps, you have to change the version of your app, before you can upload it to Google Play.

versionCode - Integer only. That's the version of your application code. You must change (normally +1) its or Google Play will not allow you upload the APK.

versionName - String. Version name that all users can see. So that they can identify which version they are using. (normally in format like 1.0.2)

See more in Android Developer - Versioning Your Applications

Android 4.1 SDK (ADT 20.0.2) released

Google release its latest Android Development Tool 20 in July 2012. It includes tones of bug fix. What are you waiting for? Launch Eclipse and update your ADT ASAP?

Android Developer - ADT plug-in

Syntax Highlight for Blogger

Content of this blog contain source code of programming language, like XML & Java. For ease of reading, they are well formatted by SyntaxHighlighter .

The following described how to implement SyntaxHighlighter in

1. Login Blogger > Template > Edit HTML > Proceed

2. Copy & Paste the following code, just before </Head>. Then Save template. After that, Blogger template setup is completed

2. To add formatted code in to your Blogger, use wrap the content with the following tag.



You also get to edit the content by HTML as below.

The above example is for XML content. For other like Java, PHP, etc, see the table below

Here's a list of supported languages and their aliases:
Language Aliases
C++ cpp, c, c++
C# c#, c-sharp, csharp
CSS css
Delphi delphi, pascal
Java java
Java Script js, jscript, javascript
PHP php
Python py, python
Ruby rb, ruby, rails, ror
Sql sql
VB vb,
XML/HTML xml, html, xhtml, xslt

Please also check with SyntaxHighlighter website for other info.

SyntaxHighlighter in Google Code
SyntaxHighlighter web site

Saturday, July 28, 2012

Hiding Option Menu

In some situation, you developed an app with optional menu but wants temporary disable it for reason. You may use .setVisible(false).

Before move on to an example, I expect you are familiar with Android Option Menu, if not, please read this this first.

I have prepared an option menu defined below


          android:title="@string/importSD" />
            android:title="@string/exportSD" />
            android:title="@string/exportDropbox" />
            android:title="@string/unlinkDropbox" /> 
            android:title="@string/babyBirthday" /> 
            android:title="@string/info" />

Then, when the main java, add the following class and set your desired option menu to disable


	boolean isLiteVersion = true;
	public boolean onPrepareOptionsMenu (Menu menu) {
		if (isLiteVersion)	{
		return true;

Some of the option menu will then be be hidden.

Google Android Developer : Menu

Galaxy S3 LTE , an Android /w 2G RAM

The Samsung android smart phone Galaxy S3 was announced for sometimes. However, in some country, like Koren, the ram size is doubled and up to 2GB. The device was import to by a 3rd party phone store, and its maintenance was not covered by Samsung HK. It retail and price is nearly the same as its 1GB ram version in Hong Kong about HK$5,280.

During testing, the 2GB ram version S3 was found with 1.1GB free ram, interested?

You may read the review as below.

四核 2GB RAM:韓版 Galaxy S3 水貨實測

Developing multi-language Android app

Developing your apps with User Interface in Android is easy, but your get to follow the guidelines.
  • Don't hard code text. Use Resource (strings.xml).
  • Avoid integrate text into picture (icon, banner, etc)
  • Use short wording
Let see some an example.
The default language of the apps "Baby milkfeed counter" is English. That mean whatever you device language setting is, the apps will display UI in the English.

Let's focus on the field "Fed Today".


 The below is a extract of the /res/layout/main.xml. 

		        android:text="@string/fedToday" />

The above text "@string/fedToday" was a tag stored in /res/values/strings.xml. Text field stored in this file are default language in this app (i.e. English). Let see the extract content of this string.xml.


    Last feed time
    Last volume
    Since last feed
    Fed today
    Fed Yesterday

Rather than hard code the text "Fed Today" in /res/layout/main.xml , I store it as string in /res/values/strings.xml. In fact, you should store all the text that will display in UI in the strings.xml. To implement multilingual UI, I don't need to change other file, but just add another file, /res/value-<locale>/strings.xml.

For example, to implement the app's UI in Traditional Chinese, I just need to prepare another strings.xml, as in /res/values-zh-rTW/strings.xml.



The process is completed. As you can see, the UI development did not involved any Java code, or even any file, just string.xml. To switch between go to the Android setting change the Language. launcher icon and UI textwill changed based on the device setting.

For every setting language, you get to prepare a separate /res/value-<locale>/strings.xml. if the device can find the its own language's string.xml, it uses the default one. Language and the strings.xml path mapping is as below.

Default /res/value/strings.xml
CANADA  /res/value-en-rCA/strings.xml
CANADA-FRENCH  /res/value-fr-rCA/strings.xml
CHINA  /res/value-zh-rCN/strings.xml
CHINESE  /res/value-zh/strings.xml
ENGLISH  /res/value-en/strings.xml
FRANCE  /res/value-fr-rFR/strings.xml
FRENCH  /res/value-fr/strings.xml
GERMAN  /res/value-de/strings.xml
GERMANY  /res/value-de-rDE/strings.xml
ITALIAN  /res/value-it/strings.xml
ITALY  /res/value-it-rIT/strings.xml
JAPAN  /res/value-ja-rJP/strings.xml
JAPANESE  /res/value-ja/strings.xml
KOREA  /res/value-ko-rKR/strings.xml
KOREAN  /res/value-ko/strings.xml
PRC  /res/value-zh-rCN/strings.xml
SIMPLIFIED-CHINESE  /res/value-zh-rCN/strings.xml
TAIWAN  /res/value-zh-rTW/strings.xml
TRADITIONAL-CHINESE  /res/value-zh-rTW/strings.xml
UK  /res/value-en-rGB/strings.xml
US  /res/value-en-rUS/strings.xml

For more locale info  for Android Development  / SDK, check with the following

Supporting Different Languages



Stock Rom 4.1.1 for Nexus released

Google has just released it factory image for Nexus Device including Nexus S, Galaxy Nexus and Nexus 7. For those loving in flashing "Clean"  ROM, go ahead!

Please note flashing stock ROM will erase all existing data on your machine.

Factory Images for Nexus Devices

Android apps language translation

Google has provided an web-base translation tool which help developer to translate their apps content from one language to another. Google translate tool kit allow you to upload the strings.xml, and it will extract & translate only the tag content (but not full file). You can even review the translated tag one-by-one and make correction.

However, the result is not very fine for me. I guest Google get to work harder on its translation service.

Thursday, July 26, 2012

Smartone 4G launched in Hong Kong.

SmarTone will launch its 4G LTE network on 28 August 2012, with all current
SmarTone price plans applied. However, as a Android developer, I may not go for 4G now.

Lack of 4G developer machine
 Google recommended developer machines, Galaxy Nexus & Nexus S, do not have 4G support. I have no choice stay in 3G, in which what my Nexus can do

4G advantage 
4G takes the advantage of high speed transfer . However, my experience on 3G & Home broadband Wi-Fi makes no big different. Speed for 4G may not be a big deal for me, as 3G is god enough for me.

SmarTone Announces the Launch of its 4G Network

Netbean 7.2 released

Netbean 7.2 by Oracle was released and be available for download now.

However which Android will use NB in these day? Even Google tutorial are all in Eclipse, you do have to no choice but Eclipse.

NetBeans IDE 7.2 Release Information

Wednesday, July 25, 2012

Captuing Android emulator screen through Eclipse

After finished an Android apps, you may wish to a screen capture of your product.
There's various way to to cap those screen, but the easier way is to retrieve it from your Android Emulator. Lets see how to do these step-by-step.

1. In Eclipse, click Windows > Show View > Other

2. In show "Show View" window, select "Device" and click OK

3. You should then see a "Device" tag in lower right corner. Under "Name". Select your emulator and then click the Screen Capture button, as below.

4. The "Device Screen Capture" windows will prompt up then. Wait a few moment and you will see your apps screen. Click "Save" to store your screen, or copy, rotate, or what ever you want.


Monday, July 23, 2012

SDK for cloud storage

Dropbox vs Google Drive

There are 2 major cloud storage provider on Internet, Dropbox & Google Drive.

Both of them have free SDK for Android (IOS & more, too) for download. However, Dropbox has done a great job, much better Google. It takes the following advantages over Google.

Small - JAR is small in size , just ~50KB
Simple - With official 3 pages tutorial (Android), you will learn upload, download & search to/form Dropbox

For Google, I think what they have provided is a sophisticated framework for most language to get access to Google Drive. But the problem is, "it's not Android". I can't even find a "One Stop" official tutorial for Google Drive. So, let hope Google can release a full featured tutorial for Google Drive SDK 2.0, which announced on Google IO 2012.

For now, I choose Dropbox.

Dropbox SDK for Android
Google Drive SDK