Edit the core Android source code in Eclipse (and the one of the integrated apps)

A while ago, I decided to download and explore the Android source code. My goal was to create my own personalized Android system, not to publish it, just to see how it works. I followed the instructions on the Android Open Source Project page to download and build the original code. This took some time, but was fairly easy.

Problem

Then I wanted to customize some of the code to give the OS a personal touch. It is no problem to just open one of the files in any text editor, edit it and rebuild the system. I am not a VIM or an Emacs guy though, I expect a bit more functionality when I develop. »Read More

Parallel Image loading performance in Android

I just ran into the problem that I have to load a whole bunch of images in an Android application, so I wondered about the performance of parallel image loading and how many images can be loaded simultaneously. Therefore I wrote a small benchmark app that loads about 100 images (each between 4 and 7 KB) from a webpage. I admit, the app could be written better, but for my purpose it should be fine.

I measured the time in seconds that it took to load all images without displaying them in a View. 0 Threads means that all images were loaded in a sequence. A Thread count above 0 means that I created a new AsyncTask for each image and ran n of them at the same time.

»Read More

Login to the Foursquare API v2 from Android with OAuth

Once you figured out how OAuth works, you might ask yourself how this principle works from within a native Android app. It’s actually easier then expected at first. There exist some libraries that can make our life somehow easier, but I decided not to use any of them and to do everything from scratch.

This is the OAuth workflow for Foursquare:

  • A call to the Foursquare server is made with the client id and a redirect URL (has to be in a browser)
  • The user accepts the access request of the application
  • Foursquare calls the redirect URL with special code as parameter
  • The Foursquare server has to be called again with the client id, client secret, the code and the redirect URL (not in the browser anymore)
  • Foursquare returns now the access token which has to be saved by the app
  • Further calls to the Foursquare API can be made with the token

»Read More

Geek and non-geek places to see in and around Silicon Valley

I’m already for a while in the Silicon Valley now, so I thought it would be time to publish a list of places in this area that I like. Some of them might be just interesting for Tech Geeks, others for everyone.  The list is of course not complete and I will amend it as I’ll explore new places.

A European view on Lake Tahoe

I’ve heard a lot about Lake Tahoe since I’m here in the US and because I’m snowboarding for many years already, I thought it was time to check it out myself. From San Jose, where I live, you can reach Lake Tahoe in under 4 hours. In the wintertime, you better go with a 4WD or at least with the snow chains because the US50 can be heavily snow covered. Also the streets in the Village, we stayed in South Lake Tahoe, can be snow and ice covered. »Read More

A European view on California

It’s now about 9 month ago that I moved from Switzerland to San Jose, CA and I thought it is now time to start a series about my thoughts and experiences that I make here. Don’t get me wrong, I love it here, but there are just some things here that I don’t understand or that seem stupid to me. »Read More

A European view on Californian Clubs and Bars

One thing that I just can not understand here in California is how people are treated in Bars and Clubs. It seems to me that the Club Bouncers are some kind of a private army that can do to you whatever they like.

Entering the Club

It all starts when you try to go into the Club. First of all you have to stand in the waiting line. Even if the Club is almost empty, you HAVE to wait outside. It almost looks like they want that there is a line in front of the Club so it seems like there’s a big crowd inside. If you’re a group of just girls, chances are good that you get picked by the Bouncer to skip the line and go straight in. That can also happen if you are in a mixed group. However, if you’re just guys, you’re doomed and have to wait. »Read More

Login to Foursquare with an Android App using OAuth

Note: This tutorial is for the Foursquare API V1. A version for v2 can be found here.

Although the Foursquare login process is pretty easy, it took me some time to figure out how this could be done from an Android application. The problem here is, that I don’t want a Popup window for the OAuth login. There’s a different requirement for the whole login process.

A standard OAuth login process consists of this flow:

  • Create consumer with application token and secret
  • Get login URL from service
  • Redirect the user to the login URL
  • User grant or deny access to service
  • Get the access token and secret

But in a mobile application, without a URL redirection, what we actually want is something like this:

  • Create consumer with application token and secret
  • Login to service
  • Get the access token and secret »Read More

Does Social Networking changes our view of privacy?

Social Networking:

How Social Networking changes our view of privacy

As Social Networking Sites (SNS) in the Internet are faced with an exponential growth, it gets more and more important what kind of personal data users are willing to disclose to get a fully satisfying user-experience in return. These days, many users expect a SNS to allow them to broadcast their thoughts and doings in realtime to all their friends. But that was not always the case; when Mark Zuckerberg, the founder of Facebook which has currently over 400 million active users (Facebook, 2010), in 2004 invented the status field that allowed the users to make their thoughts public, many people asked him “What is that good for?” and “Why would I like to post my thoughts to the Internet?”. Since then, posting status messages has become normal for Facebook users and most of them would certainly miss that feature. These status messages are in fact nothing else then highly personal data. It is possible to know a person quite well just by reading this persons Facebook wall. But what does it mean when millions of people feel the demand to disclose their personal data to their friends and often to the whole world? Does this mean that they are less concerned about their privacy than people were previously? My research actually shows exactly the opposite of that; Even if people are sharing quite a lot of their private data, it seems that they care rather more about their privacy then in the early days. »Read More

Define some items in a ListBox as unselectable

It seems to be a quite common problem that one does not know how to set one or more items in a ListBox to unselectable or disabled.

The same principle as described here can also be user for similar problems like setting a different background color for some items.

First we’re going to create a simple domain class with a property that describes if the item should be selectable or not.

public class MyDataObject {
    public string Name { get; set; }
    public bool IsSelectable { get; set; }
}

»Read More