Posts

Android Testing in Headless Emulator

When testing Android applications you have to rely on running the tests in the emulator or a device attached to your computer. However, if you want to follow a continuous integration workflow for Android development, you might need a headless emulator that runs in a non-graphical environment. For instance, I have been using Travis CI and Gradle for automating Android builds.
To completely avoid showing the emulator interface (headless emulator) you need to start the emulator with some options in your terminal.

First, you can create an specific Android AVD as follows:
1androidcreateavd--force-ntest-tandroid-17--abiarmeabi-v7a
Then, to run the headless emulator:

1emulator-avdtest-no-skin-no-audio-no-window
The '-no-skin' option removes the emulator buttons such as the home and other hardware keyboard buttons.

The '-no-audio' option disables the audio support.

Finally, the '-no-window' option disables the emulator's graphical window display.

Now yo can use this…

Automating Android builds with Gradle

Gradle is a new build automation tool intended to replace older technologies such as Maven and Ant. With that purpose, Gradle can automate the building, testing and deployment process of your Java based applications. The Android project has already upgraded its building tools to use Gradle. Thus, you should really try this if you are developing Android applications. Moreover, if you are following the Test Driven Development (TDD) methodology, Gradle is a must.
Installing Gradle
First, make sure you have installed a Java JDK (Gradle requires JDK 1.5 or higher). Then, you need to download a distribution from the Gradle website (the current supported version is Gradle 1.6) and uncompress the file into your desired directory.
Afterwards, you have to configure the GRADLE_HOME environment variable on your path:
export GRADLE_HOME=/your_gradle_directory export PATH=$PATH:$GRADLE_HOME/bin source ~/.bashrc
Finally, you can check your working installation by running:
gradle -v
The output shows your …

Heroic Web Applications with AngularJS

Image
Have you been coding dynamic web applications and you still feel like struggling when need complex behaviour? Have you used BackboneJS, EmberJS or another MVC-like framework and still wonder what could be better? If your answer is: Yes!, then cry no more and meet your new friend: AngularJS. AngularJS is an Open Source and Client-side Javascript framework maintained by Google. Some of its main features are: MVCThe possibility to extend HTML with your own vocabulary for your application.Two-way data bindingServicesDirectives and reusable componentsTestable Now, I will explain how to code a sample application with Angular.
Requirements
You need an HTTP server on your machine. You can use your favourite thing here (e.g. Apache Server, Ruby's WEBrick server or anything else).

For simplicity, I will just use Python because it is already included on Ubuntu. So, just do on your terminal:

1$python3-mhttp.server
This will start an HTTP server on your current directory. You should configure yo…

Aplicaciones Android con Ruby y Ruboto

Ruboto es un framework para desarrollar aplicaciones Android nativas, utilizando el lenguaje de programación Ruby.
Aquí dejo el video de una platica-tutorial que di en el BIT Center de Tijuana a los miembros del Google Developers Group Tijuana.


Start Coding with Ruby

Ruby is an object-oriented, dynamic and general purpose programming language, created by Yukihiro Matsumoto.
One of the greatest features of Ruby is its elegant syntax. It is simpler and more natural than other programming languages. This makes easier to understand the purpose of each line of code on a program, even if you have zero experience on the language.

Ruby's web site has plenty of documentation and some tutorials. Here I point to some useful additional resources to start learning Ruby.
Try RubyRuby MonkRuby in 100 min After you have mastered Ruby's syntax or if you feel ready to defy yourself and test your learning, I suggest you to try the Ruby Warrior Game.