Recent hot posts

AI | Android | CAD | CAE | CAX | Linux | osg | Unity 3d | Dotnet/C# | MFC | Java | Python

Visual Studio 2013 Ultimate ISO download and offline installation: troubleshooting of “incorrect function” problem Android Image Button: transparent background and custom pressed icon
Visual Studio 2010, 2012 Very slow and the solution Android EditText control: using old rectangle style
Visual Studio 2013 Update 1: offline ISO download Android, you ask to “Run As”, but it still “Debug as”
Unity3D: inspector control value changed event handling Install OSG for Android On Ubuntu 13.04: Step-by-Step tutorials
Unity3D: rotate 3D models around the center with mouse Installation of AutoCAD in Windows 8 & 8.1: Failure and solution
Using OpenGL in C# (Tao.Framework) Installing Git-flow in Windows
Leave a comment

Posted by on April 10, 2014 in General


Tags: , , ,


An insightful ebook published by ThoughWorks. Deserves a perusal!

Download PDF here.


Leave a comment

Posted by on August 26, 2016 in Programming


Tags: , , , ,


Don’t pick a job, pick a boss.

Leave a comment

Posted by on August 24, 2016 in General


Step-by-Step guide for developing Android Plugin for Unity3D (II)

In previous blog, I have covered how to handshake Native Android code with Unity3D. The example shown therein is pretty simple: how to call a java function in C#!

In this blog, I am trying to step one more stride further: to create and use an Android View in Unity3D. The example shown here is an Android ImageView, however, this approach is generally applicable to all kinds of Android Views, ViewGroups and custom views.

imageAn Android ImageView

imageUse Android ImageView in Unity3D

Read the rest of this entry »

Leave a comment

Posted by on August 10, 2016 in Android, Programming, Unity 3d


Tags: , , , , , , ,

Android: get active, current or foreground Activity

In our recent Android App development, we developed many static utility functions, which needs a Context as the argument:

public static void func1(Context context, …)
public static void func2(Context context, …)
public static void func3(Context context, …)

public static void funcN(Context context, …)

This is very cumbersome. We would like to refactor these utility functions into functions without the context argument/ A natural idea to pass in the application context at the very beginning, e.g. Application.onCreate() function, but not in all cases, can we use the application context. For instance, when you create a dialog or toast window, we need to use Activity as the context. So here comes the function that works:


Visit this gist to get the source code.

Leave a comment

Posted by on July 13, 2016 in Android, Programming


Tags: , , , , , , ,

Visual Studio 2015 Update 3 offline installation ISO download link

Visual Studio Community 2015 with Update 3 ISO
Visual Studio Enterprise 2015 with Update 3 ISO
Visual Studio Professional 2015 with Update 3 ISO
Visual Studio 2015 Update 3  (updates only) ISO
Visual Studio Team Foundation Server 2015 with Update 3 ISO

All from Microsoft official links, enjoy!

Leave a comment

Posted by on June 29, 2016 in visual studio 2015


Tags: , , , , , ,

Kotlin for Android (I) Why I love Kotlin

If there is only one sentence to describe Kotlin, it would be: “Kotlin is great”!

You will not appreciate the beauty of it if you do not suffer from the repetitive, boilerplate coding in java. Let’s see an example first.

Consider you have two classes, as shown below, they do the same thing, interchangeable, exactly the same in terms of functionality, which one do you choose? Left or right one?

  image  image

The left one is java implementation, and the right, Kotlin.

This is a real example that I encountered in developing an Android App. The App tries to get the new questions on StackOverflow site: Open the link below in your browser to see how you can get the json from StackExchange API:

You will be presented a similar json as below:


In order to display a list of such questions in Android views, I need to deserialize this json string to a POJO (Plain Old Java Object) representation. To avoid hands dirty,  we can go to and paste the json string to get the POJO class:

Read the rest of this entry »

Leave a comment

Posted by on June 27, 2016 in General


Tags: , , , , , ,

Android: automatic set or update versionName from versionCode

In Android, version name and version code serve for different purposes, as is found in Android documentation here:


An internal version number. This number is used only to determine whether one version is more recent than another, with higher numbers indicating more recent versions. This is not the version number shown to users; that number is set by the versionName attribute. The value must be set as an integer, such as “100”. You can define it however you want, as long as each successive version has a higher number. […]


The version name shown to users. This attribute can be set as a raw string or as a reference to a string resource. The string has no other purpose than to be displayed to users. The versionCode attribute holds the significant version number used internally.

In practice, it is often the case that the version name simply maps version code in specific ways, e.g.

2016 (version code)  –>  v2.0.1.6 (version name)

Read the rest of this entry »

Leave a comment

Posted by on June 13, 2016 in Android, Programming


Tags: , , , , , , , ,


Get every new post delivered to your Inbox.

Join 69 other followers