Latest Publications

Android Activity Launch Modes

No matter how I read a bunch of words from the documentation about Activity Launch Modes, it just takes too damn long to understand. Here’s a table showing you what launch modes to use for activities you have.

Behavior \ Mode standard singleTop singleTask singleInstance
Can be launched by other activities? Y Y N N
Can have multiple instances? Y Y N N
Can launch other child activites? Y Y Y N
Reuse if activity is at the top of the stack? N Y N N

And here’s what kind of activity you should set for each mode:

Type of Activity Mode
Root Activity singleTask
One Activity Only singleInstance
Other Activity standard

Frankly, I don’t know when I will use singleTop mode. If anyone knows a type of activity that suits singleTop, please put a comment and tell me when you will use singleTop mode.

Here’s a common scenario though. What happens if you want to float an existing instance of Activity to the top of the stack? For example, your current stack is (bottom)A-B-C-D(top) and you want to float B to the top of the stack like this (bottom)A-C-D-B(top). You “start” the activity with an intent with the flag FLAG_ACTIVITY_REORDER_TO_FRONT like the following:

intent.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
startActivity(intent);

I think that covers most of the usages of Activity Launch Modes for Android. Hopefully more Android titbits to come in future.

Microsoft Silverlight coming to Symbian S60 5th Edition?

I just read my RSS feeds this morning and came across this. I guess this might be something that will be announced during MIX10. It has already been taking down from Microsoft Download Center.

Here’s a screenshot of it from my RSS reader.

Anyway, here are the descriptions of those 2 downloads:

Microsoft® Silverlight™ for Symbian – Beta

The installable executable enables user to run Silverlight applications on the Nokia S60 5th Edition platform.

Microsoft® Silverlight™ for Symbian – Beta Developer Tools

The installable executable file enables users to run Silverlight applications on the Nokia S60 5th Edition platform. The executable file includes the Silverlight runtime for Nokia S60 5th Edition devices, the Silverlight runtime for Nokia S60 5th Edition emulator, sample applications, and developer documentation.

And there we have it. Anyone excited? All the more reason to learn Silverlight now!

Martin Cooper: The Inventor of the Cellphone

Did you know Martin Cooper is the inventor of the most successful and widely used technology in the world, the cellphone? Well, neither did I, until he went on TV.

He recently gave up his iPhone for a Droid, and joined the whole twitter-sphere. You can follow him on twitter @martymobile: http://twitter.com/martymobile

Just listen to his intellectual and wise words regarding how to solve the increasing use of the limited resources of wireless spectrum on The Communicators. I think he handled the tough questions very objectively and held his position on improving the efficiency of usage.

Respect. Enjoy the video.

Convert a Unicode encoded HTML String to a Decoded String

This is my little research today for some work I’m helping out. So you have a Unicode encoded HTML string (or url), e.g. “津津有味”, that you want to convert to an actual unicode string, in this case “津津有味″, but you don’t have the trusty use of HtmlUtility.HtmlDecode or anything on hand (for example you’re using the compact framework like myself). Here’s how you convert those numbers into actual unicode characters.

// Convert the number into a short - you can make this a little more safe by using short.TryParse instead
ushort mycode = Convert.ToUInt16("27941");

// Now convert that integer into a byte array
byte[] mybytes = BitConverter.GetBytes(mycode);

// We have our byte array, convert to a string! Tada!
string mystring = Encoding.Unicode.GetString(mybytes);

And there we have it. In order to parse all the unicode encoded numbers out, you just need a simple regular expression which I’m sure you can figure out.

I hope that helps someone out there, because it took me some time inspecting variables in order to get it right.

HackerspaceSG: Events of Week 10 (Mar 8 – Mar 14)

This week we have some interesting meetings that isn’t so technical. Hey, whoever said HackerspaceSG were just for geeks?

Cambodian Comics & Web Comic
Mon, Mar 8 7:30 pm Mon, Mar 8 8:30 pm

John Weeks, comic researcher and an entrepreneur living in Cambodia is visiting us at hackerspace.sg this Monday. He will be talking about Cambodian comics. John is also keen on discussing the future comics. John is a member of ‘think tank’ Sang Salapak, co-founder of House 32 Web Design, and advisor to nonprofit publisher Our Books as well as numerous other organisations. He enjoys sharing his interests via blogging, drawing and varied writings. John’s opinions on art, culture, and technology have been cited in publications ranging from Time and USA Today to Punk Planet. Web: http://www.jweeks.net

ABAF Cocktails
Tue, Mar 9 7:00 pm Wed, Mar 10 1:00 am

We are hosting the Asian Business Angel Forum Cocktails and After Party for them. ABAF brings together for the first time early-stage venture players and participants: angel networks, investors, startup companies, policy makers, fund managers, and investment professionals from across Asia, Europe and the US.

Book Club Meetup
Wed, Mar 10 7:30 pm Wed, Mar 10 10:30 pm

We’ll be reading and discussing The Eyre Affair by Jasper Fforde – we’re a small but open group – all who’ve read the book or are interested literature are welcome.

LG W2486L Review

DSC07870

2 months ago, Mariko from LG approached me to do a review of their latest LCD monitor, the LG W2486L. I thought, “Hey, why not?” not quite knowing what I was getting myself into. Among all my other friends that got a unit to review, it seems like not everyone had an idea how to review this. It is a little tough to review a monitor, but hey, I’m going to try and I hope you find this useful.

Table of Contents

Specifications
Notables
My Take
Summary
Photos
(more…)

HackerspaceSG: Events of Week 9 (Mar 1 – Mar 7)

1st week into March and have a whole slew of events lined up. I hope everyone had a great Chinese New Year and are ready for more events at HackerspaceSG than ever!

Hackerspace Hack Time
Mon, Mar 1 6:00 pm Mon, Mar 1 11:59 pm

We currently have the following projects being worked on – Sucktionator, Water Rocket, Stop Motion Animation, and many other miscellaneous projects currently worked on by our members. So come join in and hack on any of your projects!

Singapore Ruby Brigade Meetup
Wed, Mar 3 7:00 pm Wed, Mar 3 10:00 pm

This month, the topic for our regular Ruby meetup will be on Rails 3. That’s right! Rails 3 Beta was released last month, and we’re meeting up to discuss about what’s new with Rails 3, and possibly how it impacts your current Rails code. I always love a good Ruby discussion.

Introduction to Programming for Beginners Workshop (1/2)
Thu, Mar 4 7:30 pm Thr, Mar 4 10:00 pm

Please note this event is by registration only.

If you have always wondered how computer programs are written and whether you can write a program yourself here is your chance to find out! Over a 2-session workshop you will learn some of the fundamentals of programming and start writing your first programs almost at once! The workshop is designed to be hands-on and fun for complete beginners. We will be using the Python programming language. If you have always wondered how computer programs are written andwhether you can write a program yourself here is your chance to findout! Over a 2-session workshop you will learn some of the fundamentals of programming and start writing your first programs almost at once! The workshop is designed to be hands-on and fun for complete beginners. We will be using the Python programming language.

Online and Tech culture in Cambodia
Fri, Mar 5 7.30 pm Fri, Mar 5 8.30 pm

We will have two popular Cambodian bloggers visiting us on Friday, 5th March. Nearirath is a lawyer and one of the  Barcamp Phnom Penh organizers. Kounila is a writer and is currently planning her first documentary film. They will be talking about the adoption of technology and online culture in Cambodia and tech events in Cambodia.

GenJuice Meetup
Sat, Mar 6 6:00 pm Sat, Mar 6 9:00 pm

It’s basically a meet-up for young people to “get together to discuss their goals and how they market themselves to reach those goals.” (from the site). A personal branding meetup for young people, if you will. RSVP here.

Fight Obesity – Jamie Oliver’s TED Prize Wish

I’m truly moved and convinced by Jamie Oliver that we need to do something to fight obesity. For me, that will be utilizing Social Media to educate the masses in a social way, a crowd sourcing way, a way that I know will make a difference in my own way.

Even though obesity is not as rampant in Singapore as the US or the UK, but we still need to be aware of what could happen. The Singapore Health Promotion Board is doing a great job right now curbing the increase number of obese children, but with the effluence of current society in Singapore, are we slowly moving towards becoming an obese society, especially when eating is a common past-time, more importantly eating out? I think we need to continue to be cautious and promote a healthy lifestyle.

Here is an article from 2008 on Obesity Prevention and Control Efforts in Singapore which I think touches on various issues and initiatives by the Singapore Health Promotion Board to control obesity.

How can you do your part in this fight? Teach your children, educate your parents. Always have a balanced meal – grains, meat, vegetables and dairy.

Are you making a difference to fight obesity today?

Windows Phone 7 Series Videos

Here you go! Promotional videos of Windows Phone 7 Series.

Demo: Phones for a “Life in Motion”

See how Windows® Phone 7 Series reorganizes the phone, Web and applications to deliver a mobile experience that will help make the most of customers’ busy lives.

Partner Support for Windows Phone 7 Series

See what Microsoft partners are saying about Windows Phone 7 Series

Behind the Design

Albert Shum, Director of Mobile Experience Design at Microsoft, discusses the design inspiration for Windows® Phone 7 Series.

Windows Phone 7 Series Demo

See what happens when you push the envelope. Check out this video to get a first-hand look at the latest Windows Phone that brings your people, photos, music, and video into an unrivaled mobile experience. With a holistic design that brings together web content, applications and services into a single view, phones worships you now, not the other way around.

Off Travelling Again

Yes that’s right. I’m travelling again, and this time it will be a longer trip. I’ll be back in 2 weeks! Don’t be alarmed if there are very few posts across the next 2 weeks. Cheers!

I’ll be primarily in these 3 major cities:

Vancouver, Canada

Vancouver, Canada

Seattle, US

Seattle, US

Seoul, South Korea

Seoul, South Korea