CHunky Universe of Vigourous Astonishing SHarepoint :)

Tag Archives: Android

Install android sdk and eclipse in Ubuntu 12.04

Download and unpack the Android SDK, move it to your home folder. I prefer to set a point in front of the directory folder to make it be hidden so that my home directoy still looks tidy: .android-sdk-linux.

Then add this to your path:

export PATH=${PATH}:~/.android-sdk-linux/tools:~/.android-sdk-linux/platform-tools

.android-sdk-tools is for running android command, and .android-sdk-tools/platform-tools is for running adb command
And add it to your .bashrc-file so that this path is loaded automatically when you log on.

echo -e '\nexport PATH=${PATH}:~/.android-sdk-linux/tools:~/.android-sdk-linux/platform-tools' >> ~/.bashrc

After that you have to install eclipse (so you even get the latest java development kit jdk).

sudo apt-get install eclipse

Android people recommend to install in that order. If you install eclipse before adt, you maybe don’t find adt in eclipse, as I did. To solve this, uninstall eclipse and remove the folders ~/.eclipse and ~/workspace. Then install eclipse again and add adt to eclipse.

Then from command-line rund android and install all the need packages:

In Eclipse install adt.

Ubuntu 64 bit

Android SDK is only available in 32 bit. If your Ubuntu is 64 bit, you have to install an additional package:

sudo apt-get install ia32-libs

Wonder if you have 32 bit or 64 bit Ubuntu, just find out in command line:

dpkg --print-architecture
Debug on your device

Follow the steps for attaching to your android devic on android developers site. To enable debugging on LG, e.g. run this:

sudo echo 'SUBSYSTEM=="usb", ATTR{idVendor}=="1004", MODE="0666", GROUP="plugdev"' > /etc/udev/rules.d/51-android.rules
sudo chmod a+r /etc/udev/rules.d/51-android.rules
Version control

Just install git and add a new ssh key:

sudo apt-get install git

Want to have your web apps as native android apps, see the PhoneGap. A real world example could be wikipedia mobile.

Updating the SDK

Edit 2014-01-03: Now when KitKat is available, I have updated the SDK through the command line:

android update sdk --no-ui

Android: Asynchronously download images

In the Malmöfestivalen for Android where I participate we wanted to show thumbnails of events in lists. We have urls of thumbnails from Malmofestivalen API. This information is stored in a sqlite database and a SimpleCursorAdapter is used for getting the events from the database. It is possible to bind the urls to ImageView objects (by downloading the stream: 1, 2, 3). The problem is in a listactivity with many images it will freeze. So it must be an AsyncTask, and it should be some kind of local cache to avoid loading same images over and over again. Fortunately there is already ImageDownloader class provided in the android blog post: Multithreading For Performance .

The next step is to create custom adapter and extend from SimpleCursorAdapter: EventCursorAdapter, like described on Android-er and and SP-Technolab:

public class EventCursorAdapter extends SimpleCursorAdapter {
	private final ImageDownloader imageDownloader = new ImageDownloader();
	public EventCursorAdapter(Context context, int layout, Cursor c,
			String[] from, int[] to) {		
		super(context, layout, c, from, to);
	public View getView(int position, View convertView, ViewGroup parent) {
		View row = super.getView(position, convertView, parent);
		Cursor cursor = getCursor();

		ImageView iv = (ImageView) row.findViewById(;

		String url = cursor.getString(cursor.getColumnIndex(EventProvider.EVENT_KEY_URISMALLIIMAGE));
		if (url.length() > 0) {, iv);
		String start = cursor.getString(cursor.getColumnIndex(EventProvider.EVENT_KEY_STARTDATE));
		String end = cursor.getString(cursor.getColumnIndex(EventProvider.EVENT_KEY_ENDDATE));
		String dateString = DateHelper.createShortDateResume(start, end);
		TextView tv = (TextView) row.findViewById(;
		return row;

In this code the view is created by the super class and then it is modified, the alternative is to “inflate the view” completely self.

The result is an event list which opens directly and loads thumbnails asynchronously:

listactivity with images


Publish upgrade on Market – checklist

Here comes my checklist about what has to be done in order to publish an upgrade on Market.

  • get all code from github (git pull origin master)
  • Test the application
  • Change version number in AndroidManifest.xml
  • Commit “version x.x.” and push
  • (Change google map api key in res/layout/main.xml to the prod key)
  • In Eclipse: Project → Clean
  • Right-click on project → Android tools → Export signed… (~/Skrivbord/LUSites-unaligned.apk)
  • Zipalign (e.g.: zipalign -v 4 LUSites-unaligned.apk LUSites-v0.2.7.apk)
  • Publish upgrade on market
  • Save the apk to the archive


LUSites now available for lower API levels

If your smartphone runs Android 2.1 or lower, now you can find LUSites on Market, too.

When I created LUSites I developed for Froyo (Android 2.2). But LUSites does nothing that hasn’t existed in previous Android releases (API levels). So I set API level 3 as minimal SDK version. I hope it works on your android phones. If not, please leave a comment here.

Bläddra i Sharepoint från Android

Det finns en app som heter Quick Browser för Android från SPElements. Med den kan man bläddra i olika bibliotek och listor i en sharepoint direkt från mobilen. Mycket smidigt.

Den aktuella versionen är 0.2.8. Den uppdateras rätt så ofta och blir bättre och bättre. Den enda nackdelen jag tycker är att man får alla element i ett bibliotek bara som en lista. Om det är image library så måste man long-klicka på ett element för att “download and view”. Mycket smidigare hade det varit om bilder visades i en Gallery.

Quick Browser screenshot
Quick Browser screenshot

Discovering SharePoint

And having fun doing it

Bram de Jager talking Office 365, SharePoint and Azure

My view and thoughts on Productivity and more.

My programming life

and everything in between

SharePoint Development Lab by @avishnyakov

It is a good place to share some SharePoint stories and development practices.

SharePoint Dragons

Nikander & Margriet on SharePoint

RealActivity - Real-time and trustworthy

Blog site of founder, RealActivty - Paul J. Swider

Mai Omar Desouki - Avid SharePointer

Egyptian & Vodafoner - Senior SharePoint Consultant

Cameron Dwyer | Office 365, SharePoint, Outlook, OnePlace Solutions

Office 365, SharePoint, OnePlace Solutions & Life's Other Little Wonders


Me and My doings!

Share SharePoint Points!!

By Mohit Vashishtha

Jimmy Janlén "Den Scrummande Konsulten"

Erfarenheter, synpunkter och raljerande om Scrum från Jimmy Janlén


SharePoint for everyone


Ryan Dennis is a SharePoint Solution Architect with a passion for SharePoint and PowerShell

SharePoint 2020

The Vision for a Future of Clarity

Aharoni in Unicode, ya mama

Treacle tarts for great justice

... And All That JS

JavaScript, Web Apps and SharePoint


Mostly what I know about SharePoint - CommunicoCuspis