We will continue from where we left off in the last instalment and extend our basic application into a more useful application. If you are keeping track, we’re an hour and fifteen minutes into our development and we have our application environment setup and ready to program in Android.
Over the next hour we will create an application that will show the wiki entries near our location, display that information on a map and embed the wiki page into the application. This application highlights three key features of the Android platform;
- Focus on LBS that makes locative media easier to produce.
- Deep web integration from consuming web services to embedding web page.
- Â Simple map integration via Google Maps.
What is WikiWhere
WikiWhere is a buzzword-compliant mobile application that gives you access to local wiki knowledge where ever you are. Using your Android phone, WikiWhere searches wiki for entries near your location and passes that information to you. Discover your neighbourhood or visit others.Â
1:20 Back from Break. You aren’t paid to sit there you know.
We are now going to get started with the WikiWhere application. Let’s go through the first step and create an application shell using the Eclipse project builder. Just as in the previous part, select File >> New Project >> Android Project to launch a new project. Add the details for WikiWhere. I’ve attached a screenshot of the details below.

Step 1. Create the MapView
The main user interface will be a MapView so we want to change the interface of our WikiWhere class from Activity to MapActivity and implement the onRouteDisplayed method.
-
package demo.WikiWhere;
-
-
import com.google.android.maps.MapActivity;
-
import android.app.Activity;
-
import android.os.Bundle;
-
-
public class WikiWhere extends MapActivity {
-
public void onCreate(Bundle savedInstanceState) {
-
-
super.onCreate(savedInstanceState);
-
setContentView(R.layout.main);
-
-
}
-
-
protected boolean isRouteDisplayed() {
-
return false;
-
}
-
}
Next we have to implement the map in the view. Android separates the device layout / views from the source code to simplify development. A graphic designer can modify the XML layout without impacting the underlying source code. I’m a strong believer in letting programmers do the programming and not the UI or graphic design. Windows 3.1 was designed by programmers. Case closed.
Read the rest of this entry »