Friday, July 6, 2012

XBMC + Wii Controller

While awaiting the arrival of my raspberry pi. I was excited to test out a simple set-up which could be recreated with the pi.

this setup includes:

  • XBMC media center
  • Wii-controller
  • Ubuntu with bluetooth functionallity 

Saturday, April 7, 2012

Start emulator from terminal

/SDK_Android/android-sdk-linux/tools$ ./emulator -avd nameAVD

Saturday, January 28, 2012

Ubuntu external monitor

use the following command in the terminal to clone your screen to external monitor:

  • disper -c

extra:
use the folllowing command in the terminal to resize your screen


  • disper -s -r 1024x768

Thursday, November 24, 2011

Android - Devoxx 2011 - Performance Usability keynote

A few things I learned on performance and usability for Android at the Devoxx Conference in 2011:

  1. Dont block the userthread - use Asynctask, Thread or Service instead
  2. Entertain the user while waiting. Show something spinning like a progressdialog, spinner, etc.
  3. Allow the user to cancel a heavy task
  4. Use a passive location provider instead or last known location vs. polling the location 
  5. Tool to measure performance - Traceview

Wednesday, November 23, 2011

Java Floating Point Problem

Problem:
Java Floating Point Problem,
there is a problem with the binary representation of certain floating point numbers which could mess up your calculations.

Occurence:
While making a Android application which could add and subtract numbers, where I was using float variables.


Solution:
Using BigDecimal with the String constructor solved my problem, other solutions provided by other sources on the internet didn't match my requirements.


Note:
  1. Pay attention that you use the String constructor 
  2. BigDecimal is slower in calculations that float types
Sources:
http://www.daniweb.com/software-development/java/threads/109784