How to Output Debug.Print() to Console

In console apps I write, I often use Debug.Print() to troubleshoot.  It is useful to output it to console, in additional to the Visual Studio output window.

TextWriterTraceListener consoleWriter = new 


Push Notification

Amazon Web Services has Amazon Simple Notification Service (SNS), being to send push notification via

  • Google Cloud Mobile (GCM)
  • Apple Push Notification Service (APNS)
  • Windows Push Notification Service (WNS)
  • Microsoft Push Notification Services for Windows Phone (MPNS)

Here is a post on how to do it in large scale; I find it a good read.

Note that there is a case study of how Parse is using AWS.  I wonder if Parse leverages Amazon SNS or the other way.

While it is hard to compare, the following is some pricing information.

As of 11/24/2014, Parse is free if you can live with 30 requests/sec.  If you need to push faster, it costs $100 per month for 40 requests/sec.

Amazon SNS is free for the 1st million request per month and $0.50 per additional million requests. 

Cordova Build Android Error


An update of Android Studio requires me to move Android SDKs out of the Application folder.


After I moved it, I got the following error when I do “cordova build android”

/Users/Henry/android-sdks/tools/ant/build.xml:483: The SDK Build Tools revision (18.0.1) is too low for project 'CordovaApp'. Minimum required is 19.1.0


I launch Android SDK Manager from Android Studio and it turns out that SDK Manager is still look at the old SDK Path, the one in the Application folder.


  1. Launch Android Studio
  2. On the right panel, select Configure –> Project Defaults –> Project Structure
  3. Specify the correct Android SDK location and click OK.
  4. Go back and select Configure –> SDK Manager.
  5. Verify that SDK Manager has the correct SDK Path. 
  6. Install the latest (i.e. highest Rev.) Android SDK Build-tools


Visual Studio Online TFS Git and XCode

  1. I assume you have created a Git repository in TFS.  Logon to TFS.
  2. Write down the Git repository Url.SNAGHTML157147cc
  3. Open your TFS profile, and enable alternate credentials.  See instructions here.
  4. Create a secondary user name.  Make sure it does not contain “@”.
  5. Don’t set up Git in XCode yet.  For some strange reason, you get an authentication error about incorrect password.
  6. Launch Terminal, change directory to your repository folder and do
  7. > git clone https://[account][team 

  8. Now you can go to Xcode –> Preference –> Accounts
  9. At the bottom of the left panel, choose Add a repository.
  10. Set up a Git repository with the Git Url and the secondary user name and password.
  11. You should be able to do Pull and Commit via XCode’s Source Control.