2009
07.30

Two days after I got my invitation to the Ubuntu One beta and wrote a review about my first impressions I also received an invitation to join the Google Wave developer sandbox. As my Ubuntu One review was pretty popular (had about 1k pageviews the first day – thank you dzone.com users), I decided to write something down about my first Google Wave experiences.

I will divide the review into a few separate pieces. This post will handle the general Google Wave Sandbox stuff, things I noticed when I first used the service. A second post will handle some advanced wave concepts like search, attachments, gadgets and robots. The last two posts will be about writing a gadget and a robot on the platform. I still have no idea about what kind of gadget and robot to write so if you have any suggestions/ideas, please leave a comment at the bottom of this page.

What is Google Wave

For those of you who are not familiar with Google Wave I suggest you check out wave.google.com and watch the awesome introduction as it was presented at Google I/O 2009. Basically Google Wave is a commuication and collaboration tool for the web that tries to combine emailing, instant messaging and online collaboration into waves. A wave is a kind of thread t that is shared among users. Participants in a wave can leave messages for eachother, chat IM style, share photos, play games and add gadgets (like google maps for example) or robots (automated participants with a certain functionality).

Registration

After receiving my invitation to join the Google Wave developer sandbox I had to fill out a registration form with some personal data as well as three possible nicknames. Minutes after submitting I received another email stating that my account was created with my desired username (stevenvb) along with a second account for testing purposes (stevenvb-test). The addition of a second account for testing was a nice surprise as I didn’t have any friends with accounts on the sandbox.

First login

Full of excitement I clicked the link that would take me to the sandbox. Instead of the login screen I was greeted with a simple html document that stated that Google Wave did not support my current browser (I was using Firefox 3.5.1 on a 64bit ubuntu 9.04 box). At the moment Google suggests you use either Chrome/Chromium, FF 3.0+ or safari 3.0 so I launched my Chrome development build for linux and logged in succesfully.

wave-overview

After the first login on both accounts I was forced to change my password to something else than the auto-generated one from the invitation and finally I got to see some Google Wave action. The first thing I did was add my test account to my contacts and ofcourse opened a wave and added my test account. I opened a second browser window to login with my test account and started sending some basic messages back and forth in the wave.

Basic usage

Simple wave editing is pretty intuitive. When you start a new wave or click the edit or reply button on an existing message the editor pops up and you are presented with a few buttons to format your text. Because I had two browser windows open side by side I could see the “update-as-you-type” feature in action. When I was typing something on one account, the other account could follow what was being typed almost character by character. In my case the message was updated about once every 2 letters. The following two screenshots demo this behaviour.

Wave Text Editor

Update-as-you-type

As you can see there is a Draft button available in the editor to disable this behaviour so the other participants can’t see your progress unless you click done. Unfortunately this feature is not implemented yet so the draft button is disabled.

The next morning when I logged in again I was surprised to find my inbox to be full of messages. I found this odd because except for my test account I had noone else in my contact list. After checking out some of the messages it became clear that there was an email adress (wave-discuss@wavesandbox.com) which you could add to any wave you made to make that wave publicly available to all sandbox users.

It bothered me at first to have so many unread waves all jumping up to the top of my inbox every time someone else added a new reply so I quickly discovered a solution. I added a new search with the following query “-with:wave-discuss@wavesandbox.com”. This query would give me all waves in my inbox except those with the previously mentioned public email address. By doing this I also discovered that besides the wave-discuss adress there also were some other public addresses. There also were some public waves – created by the Google devs themselves – which had info about the latest changes and bugs in them.

When checking out these “patch notes” I tried out the playback function which works really nice. This feature helped me a lot in understanding the discussions that went on. The playback function takes a wave and presents you every change step by step in chronological order. This makes browsing a wave with over 100 participants and as much replies as easy as following a thread on a discussion board.

When something goes wrong…

When something goes wrong, and it will because the software is still in its alpha stages, a textbox pops up on top of the screen in which you can type what you were doing to notify the Google devs that something has failed and they can try to fix it.

whensomethinggoeswrong

When a wave itself has some issues it will notify you with a popup on top of the wave that mentions the wave in particular has some turbulence and it advises you to reopen that wave.

In the few days that I have used Google Wave it has never made my browser crash, which is a very good thing. I had a few “Dr. wave” popups notifying me there was something wrong internally but everytime one popped up I gladly filled out the form to notify the devs about what I was doing.

Wrapping up

All in all I had a very good first experience in the Google Wave developer sandbox. There are still some features to be implemented, bugs to fix and performance tweaks to be done but it definitely looks promising. I can’t wait to start developing some gadgets and robots for this platform, which I will blog about soon so be sure to check this site for updates every now and then. My next post will be about some more advanced features of the Google Wave developer sandbox like the usage of attachments, gadgets, robots and the debug menu.

I hope some of you found this post helpful or informative. If you have any comments about this post or have suggestions about the upcoming ones please leave a comment.

2009
07.28

Yesterday I received my invitation to the Ubuntu One beta. I played around with it for a few hours and these are my opinions.

What is Ubuntu One

For those who haven’t heard of it, Ubuntu One is a service that provides remote storage that integrates well with the Ubuntu Desktop. It allows you to share files between multiple machines, access these files from anywhere in the world via a webbased client and share your files with other Ubuntu One users.

Installation

After receiving my beta invitation I was asked to choose a subscription plan. Ubuntu one provides a free subscription plan with 2gb of storage and a paid plan with 10gb of storage for $10.00/month. I chose the free plan for now. After finishing my subscription I was presented some very clear installation instructions. Installation of Ubuntu One is as simple as installing 2 software packages. First the PPA which enables the Ubuntu One repository, then the actual software from the new repository.

When I first ran the software I was redirected to the website of Ubuntu One where I could login and add my computer to my Ubuntu One account.

Usage

Using Ubuntu One is as simple as just copying or creating files in the newly created folder on your harddrive.

Screenshot-Ubuntu One - File Browser

When you add or change files to the local Ubuntu One folder an icon in the notification area starts rotating to let you know the software is synchronizing the local and remote filesystems.

Screenshot_notification_area

After synchronization your files are available from the webclient. In this webclient you can view and download your current directories and files as well as upload new files or create subdirectories. You can share files with other Ubuntu One users by selecting a file, clicking on the “sharing” button and entering the email address of the person you want to share the file with.

The “Shared with me” folder contains the files or folders from other Ubuntu One users that have shared something with you.

Screenshot-Ubuntu One : File Sharing - Shiretoko

When you have another computer linked to your Ubuntu One account the new or updated files will be visible after you trigger a sync from thet computer.

Issues

When I added some files via the web client and wanted to sync the remote and local folders I couldn’t find a synchronize button. I had to manually click the disconnect and reconnect buttons on the notification icon for the synchronization to kick in. Another way to start the synchronization from remote to local was by adding or changing a file in the local folder. This would trigger a synchronization and the new remote files became visible locally.

When adding new folders in the webclient it looks like the folder is added twice. This looks like a minor UI problem because after a refresh or a sync the folder is displayed only once as it is supposed to be.

The web client doesn’t have a refresh button, after a sync you have to manually refresh the page to view the new state of the remote folders

My thoughts

Although Ubuntu One is still in its beta stage and still has some issues I am certain this will become a very userfriendly way of sharing documents between multiple machines or among friends. Because of it’s tight integration with the Ubuntu desktop and thus synchronizing files is as easy as copying or saving them to a folder, even the most non-technical users are able to share data without the use of USB-sticks or email attachments.

I encourage everyone interested in the service to apply for the beta and to start reporting issues so this project can get out of beta soon and become another valuable addition to the Ubuntu desktop.

2009
07.24

When writing the Call history part of my Android app for Mobile Vikings I wanted to display the calls and messages in a listview with their number, date/time and cost. Displaying some text values in a ListView isn’t that hard. I could use an ArrayAdapter object that takes an ArrayList of Calls and it would display the toString() method of each call in the ListView. What I wanted to do was display various attributes of each Call object (number, date, cost) in the ListView. Like this.

Calllog example

After some research I found out that the SimpleAdapter class was the way to go. The documentation on the SimpleAdapter class wasn’t very clear to me at first and there wasn’t a working codesample to demo the class so I decided to share my own code.

The SimpleAdapter class uses an ArrayList of Maps to hold the data. Each Map in the list represents the data for one row in the ListView. The mapping between the values in the Map and the TextViews in the layout file is done with two arrays. An array of Strings for the keys that need to be mapped and an array of ints with the id’s of the TextViews the data belongs to.

We’ll start of with the code for the layout file. This file describes how one row in our listview should look. I used a TableLayout because I wanted two columns. In the first column I have a LinearLayout with two TextViews. One for the number display and one for the time. The other column holds one TextView for the cost of the call.

<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
	android:layout_width="fill_parent" android:layout_height="wrap_content"
	android:stretchColumns="0" android:padding="5dp">
 
	<TableRow android:padding="5dp">
		<LinearLayout android:orientation="vertical">
			<TextView android:textSize="16sp" android:textStyle="bold"
				android:id="@+id/callog_detail_sms_number" android:layout_width="fill_parent"
				android:layout_height="wrap_content">
			</TextView>
 
			<TextView android:textSize="16sp" android:id="@+id/callog_detail_sms_date"
				android:layout_width="fill_parent" android:layout_height="wrap_content">
			</TextView>
		</LinearLayout>
 
		<TextView android:textSize="16sp" android:id="@+id/callog_detail_sms_price"
			android:layout_width="wrap_content" android:layout_height="fill_parent"></TextView>
	</TableRow>
</TableLayout>

Next up is the java code I used to convert my List of Calls to the List of Maps and to map the correct values to the corresponding TextViews.

// get messages from service
ArrayList<Call> smsMessages = service.getSmsCalls();
 
// initialize the List of Maps
List<Map<String, String>> list = new ArrayList<Map<String, String>>();
 
// iterate over all messages 
// create a map for each message
// fill the map with data
for (Call c: smsMessages) {
	Map<String, String> map = new HashMap<String, String>();
	map.put("number", c.getTo());
	map.put("date", DateParser.getTimeString(c.getBegin()));
	map.put("price", "€ " + c.getPrice());
	list.add(map);
}
 
// the from array specifies which keys from the map 
// we want to view in our ListView
String[] from = {"number", "date", "price"};
 
// the to array specifies the TextViews from the xml layout
// on which we want to display the values defined in the from array
int[] to = {R.id.callog_detail_sms_number, R.id.callog_detail_sms_date, R.id.callog_detail_sms_price};
 
// get a reference to the ListView
ListView lv = (ListView)findViewById(R.id.callog_detail_listview);
 
// create the adapter and assign it to the listview
SimpleAdapter adapter = new SimpleAdapter(this.getApplicationContext(), list, R.layout.callog_detail_sms, from, to);
lv.setAdapter(adapter);

That’s it. I hope this was helpfull to some of you. Improvements and comments are always welcome.

2009
07.22

Recently I bought myself a HTC Magic phone running the Android OS. After losing about € 10-15 on mobile internet connections in the first two days I decided to switch to the new mobile service provider Mobile Vikings. They offer 1000 sms messages and 1gb data transfer for € 15/month. The first thing I noticed after the switch was the fact that there was no easy way to know how much credits/messages/data I had left on my account. I either had to call a free number or log in to the Mobile Vikings website to check my balance.

They had a public API available but nobody had written an android implementation so I decided to write one myself. After all it’s a nice way to introduce myself to the Android API. I started up eclipse, downloaded the SDK, read a little about the API and started coding. In about 40minutes I had a very basic app that downloaded the JSON data from the Mobile Vikings API, parsed it and put the remaining balance on the screen.

The days after that I implemented a settings menu where users could enter their credentials and enable/disable the auto-update feature of the app. As an introduction to Android appwidgets I tried to get a little widget working that showed the remaining credits/messages/data on the screen and I succeeded.

A few days ago I cleaned the code a little and put an early version of the app available for the users to test at http://code.google.com/p/mobilevikingsandroid/ . Please use the Issue tracker  when you encounter any issues or have feedback.

I am currently working on the next feature (the call history) so be sure to check back every once in a while for updates.