Creating a button is similar to text except that it also uses a Listener callback function that is called as soon as the button is pressed. menuButton = (Button) findViewById(R.id.menubutton);menuButton.setOnClickListener(new OnClickListener() {    //@Override    public void onClick(View v) {  // onClick Method                //Do something when clicked     }});   

Buttons Läs mer »

Exploring Interaction

We now have a continuous readout from the magnetometer sensor. Next step is to play with magnets nearby the sensor to see how the values are changing. One thing we could do is to create a sort of distance measure. myAzimuth = Math.round(event.values[0]); myPitch = Math.round(event.values[1]); myRoll = Math.round(event.values[2]); abssum = Math.abs(myAzimuth) + Math.abs(myPitch) +

Exploring Interaction Läs mer »

Sensor Hacking

So let us dig into the juicy bits! A google search on “android sensor orientation” turned up a promising result from ibm. At a glance it has some code that looks simple enough to explore. We wanna keep our package declaration and MainActivity class so we copy-paste from implements SensorListener { and onwards. With a

Sensor Hacking Läs mer »

Creating a New Android Project

Create a new Android Project (File->New->Android Project). Give it a project name e.g. “helloandroid”, select a build target (I would recommend API level 4 and Android 1.6), name the application e.g. “Hello Android”, type in a package name e.g. “my.android.packages”, type in the Main Activity name e.g. “MainActivity” (The default entry point in our program

Creating a New Android Project Läs mer »


In interaction design we often use various physical and digital materials that we recombine in novel and interesting ways. Today we also carry around mobile devices that have many of the sensors, actuators and networking capabilities that are commonly used in interaction design, e.g. touch, vibration, accelerometer, gyroscope, thermometers, NFC, GPS, etc. The goal for

Introduction Läs mer »

Environment Setup

First of all we need to make sure that we have Java installed. If we want to develop with java we need the Java Development Kit (JDK) version. It can be downloaded from HERE. Next we need to get our Integrated Developing Environment (IDE) – Eclipse, where we do all the coding. Eclipse Classic can

Environment Setup Läs mer »

Work Log

After some fiddling with tumblr I believe this might actually work as intended. That is – this is now the main blog and the other(s) are addons. This is also the evolved version of my old HTML-blog that resides HERE.

Work Log Läs mer »