rui


Google DevFest 2011 BCN

This week I assisted to the Google DevFest 2011 Barcelona. This year it was celebrated on a great “garage” located on an industrial area of Barcelona. I will tell the more interesting things that I found on the different sessions:

NEW IN HTML

As usual, this session presented by Paul Kinlan showed us the future of HTML5. I love the x-webkit-speech Chrome feature to make voice inputs that we already could see on the Madrid DevFest 2010. Paul made also some demos of WebIntents  a great idea to make something similar to Android intents on the web. Finally we could see that HTML5 is advancing very fast trying to implement many APIS that will make Flash obsolete, like window.navigator.getUserMedia() ot the Web Audio API.

GLSL

This session was presented by Mr. doob aka. Ricardo Cabello, a guy from the demoscene. He made a introduction of how 3D works in the browser and showed us how to use the GLSL language to make great effects on web pages. He has those GLSL demos on his blog.

GOOGLE+ SESSIONS

There were two Google+ sessions driven by Ade Oshineye, one presenting the new social network (also announcing the Google+ Pages) and other with more technical details for developers. One thing that you can do easily is adding the +1 button to your site. Other very interesting tools that we could see were the Google APIs Console and the Google APIs Explorer.

ANDROID SESSIONS

Bruno Oliveira is replacing Reto Meier as our “Android Developer Relations”.  On the first session he made a great review of the Android platform evolution since 2.1 to 4.0. On the second session he gave us great tips to improve UX experience on Android. This guy is a showman!

MAKING A BUSSINESS OUT OF APPS

This session was presented by Paul Kinlan and Bruno Oliveira, showing us that monetization tips are valid for both web and Android apps: Lazy registration, try before you buy, easy payment, in-app payments… Bruno also presented the new multilingual “Guide to the App Galaxy” http://www.guidetotheappgalaxy.com/.

GOOGLE SHOPPING API

Daniel Hermes showed us the Google Shopping API and many integration samples.

CHROME DEV TOOLS

Finally Sam Dutton made a review of the Google Chrome development tools. This tools replaced my FireBug many years ago! He also made his slides available.

APP COMPETITION

This year Google also organized and Appcircus-style app competition. Those were the apps and sites presented:

I won the app competition, but all were great apps. Our presentation and some photos of the app competition are available at our Mobialia Blog.


Developing with Android-X86 2.3 and VirtualBox

One of the most tedious thing developing for Android is the lack of an efficient emulator. The bundled Android emulator with the SDK is very, very slow due to that it is emulating an ARM architecture over X86 processors.

So I will propose you a solution based on Android-X86. This is a project that ports Android to the X86 architecture and they recently released the 2.3 RC1 version. With VirtualBox you can create a X86 virtual machine and install Android-X86 on it.

First, install VirtualBox and create a virtual machine with the following specs:

  • Operating System: Other
  • 512 MB RAM and 5 GB HD (enough)
  • Bridged Network (easier for the adb connect step)
  • Emulating a Sound Blaster 16 sound card (trying it as recommendation from Android-X86, but at the moment it doesn’t work for me)
Then download the android-x86-2.3-RC1-eeepc.iso image (see links at the bottom).

When you start VirtualBox by first time it will ask you for a boot CD, select the downloaded image. On start it will let you choose between running Android from the CD or install it on hard disk. Select install to hard disk, create a partition on the virtual disk, and install Android on the partition selecting  the “System read write” option.  During the installation process, you can create a virtual SD card (of 2GB maximum), the SD card is necessary for many apps to word.

Then you can now start your Android-X86 system (don’t forget to remove the ISO image). By default it will have the ethernet networking configured, you can check it at Settings->Ethernet configuration.

To start developing with this virtual machine, you need to connect it to your computer via adb. Android-X86 includes by default an adb server listening on port 5555. On the virtual machine get your IP address pressing “ALT-<F1>” and typing netcfg (press “ALT-<F7>” to go back to the graphic screen). Then, on your computer type

adb connect <IP>:5555

Replacing <IP> with your virtual machine IP. Now the emulator is connected with adb to your machine and you can run apps on the emulator pressing play on Eclipse or start a shell in the emulator with adb shell…

The Android X86 virtual machine is much faster than the emulator. Take into account that native apps will not work on Android-X86, but Google-TV is also X86 based, so it seems that the X86 platform will be longer supported on the future.

UPDATE: There is also a HoneyComb image at Android-X86 Google Code page that works on VirtualBox but without network (at the moment it does not support Ethernet) so it is not very usable for development.

Chess for Blusens WebTV

I released a chess app for the Blusens Web:TV device. This chess app is based on my chess engine Carballo and on the GWT interface by Lukas Laag (http://www.vectomatic.org). I changed some parts of the Lukas interface to make it work on this device:

  • Control by keyboard
  • Adapted for remote keys
  • Many speed optimizations on the chess engine loading
  • Removed FEN and movable panels (no mouse on the app)

The app is controlled with the remote keys (UP, DOWN, LEFT, RIGHT and OK). With the MODE key you can change the mode (white vs computer, black vs computer…) and with the BLUE circle the thinking time. FORWARD and BACKWARD keys undo/redo moves and with STOP you can start a new game.

You can also test this interface on the web browser:

All the modified code is on the Carballo Sourceforge SVN, under the folder webtv.

To install the app uncompress the webtvchess.tgz file on the applications/ folder of an USB stick and plug the stick to the WebTV.

Blusens apps developers forum link: http://developers.blusens.com/forum/viewtopic.php?f=15&t=338


MythTV vs XBMC vs Blusens WebTV

I used for many years MythTV and XBMC, and as now I own a Blusens WebTV, I will do a feature comparation between this three media centers. I will rate some features from one star (*) to five stars (*****) based on my personal opinion.

MythTV XMBC Blusens WebTV
Movie library w/covers and info no yes no (but there is an app to build an HTML interface to your movie library)
Music library w/ covers, artists, genres… no yes no
TV tuner yes no yes (there is a cheaper LITE version without tuner)
PVR & time-shift yes no yes (no on LITE version)
TV and radio streaming  to other computers yes no yes (but TS streams, needs a low of BW, probably will not work over your WiFi)
Transcoding (converting between audio/video formats) yes (on records and streams!) no no
Web interface **** **** ****
Interface design **** (skinnable) ***** (skinnable and has great themes like Aeon, MediaStream…) *** (not skinnable)
Installable apps QT plugins (no app store, needs manual install) Python HTML & Javascript, Webkit powered
Killer apps Emulators (MythGame) Netflix (not on Spain), Emulators (with some work on the Launcher plugin), IMDB queries… Online Films and Serials from cinetube.es, peliculasyonkis.com…
Web browsing ** no **** (Webkit , no Adobe Flash, identified like an iPad)
Ease of setup * *** (if installing on a PC, if you buy a Boxee will be *****) *****
Ease of use **** **** ****
Android remote app *** ***** (shows movie & music library on the mobile) ***
Price of packaged solution No packaged solution 200€ (Boxee) 150€
Web http://mythtv.org http://xbmc.org, http://boxee.tv http://blusens.com

Now I’m using the Blusens WebTV because it’s a silent and small device (much more than my old PC running MythTV/XBMC). I solved the emulators part (that I had working on XBMC) with some Wii homebrew…


Mobile 2.0 Open Ideas

This year I was invited to organize a workshop at the Mobile 2.0 Open Ideas event at Barcelona, on 16-17 June. With my experience developing Android apps at Mobialia and the social media integration on Martin Varsavsky’s RadioMe, I proposed the workshop:

Bulding Social Media Enabled Android Apps

This will be a 1-hour workshop In which I’ll provide some examples on how to integrate social media on Android apps, from the simple “Share” button to more complex integrations like using Twitter, LinkedIn or Facebook APIs, including logging-in with social media, the “Like” button, etc.

I will try to do it interesting for developers and also for app designers who want to add cool social features to their apps. Slides and code samples will be available from the day of the event.


Mobialia en Canal TEA

Esta semana invitáronme a participar nun programa da televisión local de Ponteareas (Canal TEA). Falamos un pouco dos fundamentos de Android, das aplicacións de Mobialia, tablets, MiFis etc. Foi unha experiencia moi interesante e a primeira vez que vou a unha canle de Televisión.


My London travel tips

This easter we were on London, it was a great experience and I want to share with you some travel tips:

AIRPORT

I arrived to Stansted Airport. Try to get a fligth to Heatrow or Gatwick. Stansted is 1 hour away by bus from London city center.

There are many bus companies from Stansted to London, the cheapest and fastest is Terravision (15£ with return, 14£ if you book online) but National Express (9£ single) has free WiFi.

CURRENCY

There are many currency exchange offices, but the best is to get cash on an ATM with you credit card. If your bank charges a small comission (ING Direct charges only 2.5%), is cheaper than the exchange offices.

BUS & UNDERGROUND

The city is divided into zones, all the city center is zone 1-2. You can get a “Day Travelcard” for zones 1-2 by 6.60£ (cheap compared to the 4£ of a single travel). You can buy it on the automatic machines at the entries of the tube (allows payment with credit card).

This travelcard also allows you to use the city bus on this zones (only showing the card to the driver). A great tip is to get the bus line 11, you will get a sightseeing arround the touristic zones by the price of a Day Travelcard.

CYCLE HIRE

One funny thing that you can do is to hire a bicycle on one of the many points along the city. You can do it with your credit card. First you must pay 1£ for the access to the cycle hire for 24 hours. Then, you get a cycle by obtaining a printed release code from the machine. This code is composed of “1”, “2” and “3” digits that you must type on the cycle dock to release it.

When you dock the cycle again the system charges you card with an amount depending of the time that you used the cycle. One hour costs 1£ and the prices lower as you use it more hours. By only 2£ you can get a cycle by one hour.

MUSEUMS

The British Museum and other public museums are free so don’t miss them. Quite curious that you can’t take photos with flash on the underground but the British Museum is full of unconscious tourists taking photos with flash and touching pieces from the ancient Egypt.

WIFI

It’s quite hard to find free WiFis on London, but there are lot of BT-FON spots, my advice is to became a FON member before traveling to London, buy “La Fonera” by only 39€ at http://www.fon.com and share your home ADSL. As a FON member you can use this WiFis for free.

HOTELS

We were on a Easyhotel room but I can only say that it was cheap. Easyhotel thinks that a “room with window” is an underground room with a window to a corridor without natural light. It’s also quite surprising to make fit a bed and a bathroom on 6m2.


SobrosoParty 2011

Hoxe sábado ás 18 horas repetimos o laboratorio de Android “A Miña Primera Aplicación Android” na SobrosoParty no Pavillón Municipal de Ponteareas. Neste taller usaremos como exemplo a aplicación WikiPlaces para explicar cales son os pasos da creación dunha aplicación Android, dende a instalación do SDK e a configuración do Eclipse ata a súa publicación no Android Market.

Esta aplicación ten moitos exemplos de cousas típicas na programación de Android:

  • Deseño de layouts
  • Obte-la ubicación
  • Amosar un mapa e usar overlays para representar información sobre él
  • Amosar unha lista utilizando adapters
  • Obter datos de servidores externos
  • Usar intents para lanzar outras aplicacións dende a nosa
  • Introducción de Anuncios de AdMob

Tentaremos condensa-lo taller en dúas horas que é pouco tempo, xa que no último LabAndroid en Málaga seis horas non chegaron para moito, pero como creo que non vai haber nen enchufes nen ordenadores para todos tentaremos facelo un pouco máis xeral.

Para asistir a este taller non fai falta estar incribito na SobrosoParty (que ten só 300 plazas), con dicirlle a persoa de seguridade que se vai asistir ó taller de Android non debería haber problema en pasar.

Notas de prensa:


Using styles on Android layouts

A very cool feature of Android that many developers do not know (at least me 6 months ago) is the possibility of using “styles” on Android XML layouts. This thing is similar to CCS on HTML and provides a method to simplify the XML design.

First, let’s see an example of a XML layout without styles, you can notice the need to repeat attributes and the difficulty of reading the XML:

<LinearLayout
 android:layout_width="wrap_content"
 android:layout_height="wrap_content"
 android:orientation="vertical">
 <TextView
  android:text="@string/text1"
  android:layout_width="wrap_content"
  android:layout_height="wrap_content"
  android:textStyle="bold"
  android:textColor="@color/white"
 />
 <TextView
  android:text="@string/text2"
  android:layout_width="wrap_content"
  android:layout_height="wrap_content"
  android:textStyle="bold"
  android:textColor="@color/red"
 />
</LinearLayout>

But we can define styles grouping this attributes on the file res/values/styles.xml

<?xml version="1.0" encoding="utf-8"?>
<resources>
 <style name="VerticalLinearLayout">
  <item name="android:layout_width">wrap_content</item>
  <item name="android:layout_height">wrap_content</item>
  <item name="android:orientation">vertical</item>
 </style>
 <style name="WhiteText">
  <item name="android:layout_width">wrap_content</item>
  <item name="android:layout_height">wrap_content</item>
  <item name="android:orientation">vertical</item>
  <item name="android:textStyle">bold</item>
  <item name="android:textColor">@color/white</item>
 </style>
 <style name="RedText" parent="@style/WhiteText">
  <item name="android:textColor">@color/red</item>
 </style>
</resources>

Note te possibility of  inheriting styles, in this example “RedText” is inherited from the “WhiteText” style changing only the text color.

Our XML layout, with styles, gets reduced to:

<LinearLayout style="@style/VerticalLinearLayout"/>
 <TextView style="@style/WhiteText"
  android:text="@string/text1"
 />
 <TextView style="@style/RedText"
  android:text="@string/text2"
 />
</LinearLayout>

Finally,  you can see that I’m using colors (@color/white and @color/red) which must be defined on the file res/values/colors.xml (in a similar way to strings):

<?xml version="1.0" encoding="utf-8"?>
<resources>
 <color name="white">#ffffffff</color>
 <color name="red">#ffff0000</color>
</resources>

My Firefox 4 setup

After two weeks since the  Firefox 4 (FF4)  release, I decided to switch back again to Firefox from Google’s Chrome. But I miss Chrome a lot, so I configured FF4 almost like a Chrome… ¿how? using those themes and plugins:

  • FXChrome Theme: this theme claims to work only on Windows, but I’m using it on Linux without any problem
  • Movable Firefox Button: Converts the FF4 menu to a button that you can place on your navigation tab (to the right, like on Chrome)
  • Omnibar: Joins the address box and the search box in only one box
  • Titlebar Tweaker Plus: Hides title bar on Linux, on Windows you can use better options like “Hide Caption Titlebar Plus”, but on FF4 this last doesn’t work on Linux
  • Close Button: Without the title bar, I need a button to close FF4, I put it to the right of the tabs, (If using the  “Hide Caption Titlebar Plus” you don’t need this)
  • Barlesque: the new FF4 addon bar occupies all the window bottom, this extension collapses this bar on the bottom right (configurable), having much more space for browsing

And I also recommend this plugins:

  • AdBlock Plus: Removes ads from web pages
  • Speed Dial: Shows your favourite site on dials like Opera
  • FaviconizeTab: Adds a contextual menu on tabs to show only the favicon instead of the title on the tabs
  • Download Statusbar: Shows the downloads on the status bar
  • Echofon: a small twitter client, I miss the TweetDeck Chome app, but it seems that soon will be avaiable for FF4
  • Cutyfox URL Shortener: I use it to fast-shorten URLs with bit.ly
  • DownloadHelper: to download videos from Youtube and a lot of video sites
  • User Agent Switcher: some apps (Ok, JDEdwards) need to change the User-Agent header to work properly, also a good tool to test mobile web browsing

That’s the result: