rui


Running Android apps inside Chrome

I couldn’t believe it when somebody told me: Google is running Android apps in ChromeBooks and some selected apps can be installed from the Chrome Webstore. It works with a Chrome extension that implements an Android virtual machine running over the Native Client (NaCL is a sandbox for running compiled C and C++ code inside Chrome). Find the latest games and apps on this website.

Based on this Google work, Vlad Filippov released an unofficial Chrome extension called ARChon (https://github.com/vladikoff/chromeos-apk/blob/master/archon.md) to allow this for all the desktop Chromes (Linux, Mac & Windows). This ARChon extension is a 100MB zip that must be unzipped and loaded into Chrome as an unpacked extension.

Then each Android APK must be converted to an unpacked extension with a Node-JS based tool, chromeos-apk (https://github.com/vladikoff/chromeos-apk) and loaded into Chrome. The generated extension contains the APK and some support files. Once installed, it appears as a regular Chrome app.

I tested all my Android apps and I was very surprised with the results, they load fast and run smooth. Some of my apps did not work because:

  • It does not support Google Play Services
  • It does not support apps using the Android NDK
  • It does not support GL_TEXTURE_CUBE_MAP in OpenGL ES (and my app crashes)

But I consider it SPECTACULAR. This opens a lot of new possibilities for Android, now running inside browsers like Flash, … and confirms my “theory” that Android is only a virtual machine (IMHO, the underlying SO is Linux :P).

You can comment this post in Google+.

chromeos-apk


Facturar en España las ventas de apps en Amazon Appstore

amazon_appstoreEl caso de Amazon Appstore es algo diferente al de Google Play (que analizaba en este otro post) y bastante más sencillo, porque es Amazon quien vende las apps directamente al usuario y luego efectúa el pago de royalties al desarrollador.

Amazon separa las ventas realizadas en Amazon.com y las de cada uno de sus portales europeos (Amazon.co.uk, Amazon.de, Amazon.es, Amazon.fr y Amazon.it), enviando una transferencia mensual por cada uno de dichos portales. Se pueden ver fácilmente estos pagos desde la Developer Console en Reporting->Payments.

Los royalties de las ventas a través de Amazon.com se deben facturar a:

Amazon Digital Services Inc.
410 Terry Avenue North
Seattle, WA 98109
US

Es una exportación (IVA 0%) y por lo tanto irá en la casilla 60 del modelo 303 de IVA (exportaciones y operaciones asimiladas).

Los royalties del resto de portales europeos se facturan desde Luxemburgo:

Amazon EU Sarl
5 rue Plaetis
L-2338 Luxembourg
Luxembourg
VAT Registration Number: LU20260743

Yo las agrupo en una factura por mes con una línea por cada uno de los portales. En este caso es una venta intracomunitaria (también IVA 0%) que irá en la casilla 59 del modelo 303 (entregas intracomunitarias de bienes y servicios) y que se debe hacer constar en el modelo 349 con la clave “S” (prestaciones intracomunitarias de servicios).

Puedes comentar este post en Google+.

ACTUALIZACIÓN

Desde el 1 de noviembre de 2014 las ventas en Europa se pasan a facturar por Amazon Media EU:

Amazon Media EU S.à r.l.
5 Rue Plaetis
L-2338 Luxembourg
Luxembourg
VAT Registration Number: LU20944528


Chromecast vs a HDMI cable (with a MHL adapter)

chromecast_vs_hdmi_cableIt’s been some time since Chromecast was launched in Europe and, despite the hype, I cannot find too much advantages over using a simple HDMI cable with a MHL adapter that you plug in your phone’s MicroUSB (mirroring your phone/tablet screen to the TV screen). Here is my comparative, you will decide if is Chromecast worth it.

Chromecast HDMI cable with a MHL adapter
Price 35€ 12€
Wireless Yes No, it’s a wire 😉 you need to be near your TV (or a long cable)
Router needed Needs a router with Wifi No
Additional development Apps need to implement specific features to use Chromecast You can view in your TV all that you see in your phone screen
Multi-User Yes You need to unplug the cable and plug it to the another device
Phone charging while streaming Needs to plug a charger to the phone Needs to plug a charger to the MHL adapter
Stream your own content from your phone Yes, but normally with paid applications Yes
You can use your phone/tablet while viewing content Yes No, you see in the TV what you are doing in the phone
Play/pause From your phone From your phone
Screen mirroring With lag With almost no lag

Ok, I didn’t bought a Chromecast yet…


¿Cuánto queda de cada euro al vender una app en Europa?

Cuando me invitan a hablar sobre Android o sobre apps suelo siempre comentar algo de monetización y saco este gráfico:

vender_app_europa

Y como siempre genera bastante interés y es lo mas twitteado y a lo que mucha gente le saca fotos, voy a explicar de dónde salen estos datos.

Partiendo de que el usuario paga 1€ por la aplicación:

  • Primero se le quita el IVA, un 21% cuando se vende en Europa desde España. Si vendes fuera de Europa no se aplica IVA, por lo que el gráfico mejoraría un poco, pero sigamos con el caso de Europa.  Tenemos que 1€/1.21 = 0,8264€, por lo que 0,1735€ son de IVA. El IVA se quita antes que la comisión de la appstore.
  • Luego vienen Apple o Google y cogen su comisión, un 30% en ambos casos, por lo que el gráfico es válido para apps tanto Android como iOS. Entonces 0.8264€ x 0,3 = 0,2479€, y nos quedan 0,5785€
  • Y ahora están los pagos a la Seguridad Social y a la Agencia Tributaria. Variarán en función de la base de cotización y el volumen de facturación, pero estimando que anda sobre un 30%, es 0,5785€ x0,3 = 0,1735€
  • Entonces al desarrollador le queda 0,5785€ – 0,1735 = 0,4050€. Vamos, 40 céntimos, y aún habría que quitar inversión en equipos, alquiler de oficina, electricidad, etc.

Lo curioso es que pasa algo parecido si tienes un kiosco y vendes Chupa-Chups. Poca gente es consciente de los costes que conlleva vender o realizar cualquier actividad económica.

Para más temas fiscales sobre vender apps os recomiendo mi artículo Vender en Google Play desde España.

Puedes comentar este post en Google+.


¿Son las apps una chapuza temporal?

mobile_appsSé que esto es tirar piedras contra mi propio tejado ya que yo me gano la vida gracias sobre todo a aplicaciones Android, pero no puedo dejar de pensar que el fenómeno de las apps móviles me recuerda a lo que pasaba hace 10 años en los ordenadores de escritorio, cuando teníamos que descargar una aplicación para Windows, otra para Mac… substitúyase esto por Android, iOS y Windows Phone… sí señor, aplicaciones de escritorio, ¿a que suena rancio?

¿Y por qué Google, que se supone tiene a los mayores expertos en web del mundo apoyó Android cuando tenía un sistema operativo basado en web como ChromeOS? Para mi la respuesta es que la web móvil no estaba preparada y los navegadores móviles no conseguían la suficiente potencia para simular una experiencia nativa. Y es que a día de hoy Android, mejor dicho, la máquina virtual java (JVM) Dalvik, sigue consiguiendo mejor rendimiento que los motores HTML5 móviles (que yo considero también máquinas virtuales), y aunque éstos mejoran día a día, debido a las limitaciones de Javascript (JS) es muy difícil que se aproximen al rendimiento de una JVM.

También podría ser que la mejora de las CPUs móviles haga que no importe el menor rendimiento de las aplicaciones web.

Y está el moviento extraño de Google con Dart. JS es malo, pero… ¿crearte un lenguaje nuevo tú sólo? ¿sin contar con ninguno de los otros actores? Google ya parece Microsoft en sus mejores tiempos ¿recordáis del malogrado VBScript para HTML? Puede ser que la gente de Google sí crea que el futuro está en la web, pero no con JavaScript.

Por otra parte estoy viendo decepcionado como Google se resiste a integrar la Chrome Webstore en Google Play, privándonos de poder publicar aplicaciones HTML5 para Android directamente (sin recurrir a chapuzas como PhoneGAP), también veo cómo Google y Apple siguen proporcionando WebViews del paleolítico capando APIs tan esenciales como WebGL ¿Y por qué? ¿Acaso abrir las puertas a las aplicaciones HTML5 es matar la gallina de los huevos de oro de las apps? Alguien en Cuppertino y en Mountain View debe pensar que sí.

Y aquí entra el, de momento fracasado, FirefoxOS. La gente de Mozilla sí ve claro el futuro en la web. FirefoxOS no es más que un Android al que le cambian la JVM Dalvik por el motor HTML5 Gecko. Tampoco me parece que FirefoxOS tenga mucho sentido ya que es más fácil instalar Firefox en cualquier dispositivo Android y se tiene igual acceso a todas las aplicaciones del Firefox Marketplace. Sin embargo, Firefox con su Marketplace es, en mi opinión, la mejor forma de distribuir y ejecutar aplicaciones HTML5 en un móvil. Pero Firefox está disponible sólo en Android, las políticas de Apple impiden explícitamente usar motores web que no sean el suyo, de nuevo… ¿miedo a las aplicaciones HTML5?

En los últimos 10 años hemos visto como las aplicaciones web substituían a muchas de las aplicaciones que usábamos cada día en nuestros equipos de escritorio, ¿sucederá esto con las apps móviles? Pues no lo sé, dejemos esto de adivinar el futuro para los programas nocturnos de las televisiones.

Puedes comentar este post en Google+.


My Gradle Tips and Tricks

Are you a small business who has no online presence? You know that small business SEO promises great results, but even though you have an online presence, you haven’t paid much attention to it before. If you need to learn such tactics in order to improve your business, CEOs such as Andrew Defrancesco might be able to help. 

If you are overwhelmed by the task of ranking on Google and attracting new customers, search engine optimization (SEO) is an essential part of a small business’s crisis marketing strategy. Better yet, you don’t need a budget and you don’t need to pay for ads, designers or marketing consultants to help you.

These small business SEO tips are a cost-effective tactic with long-term benefits that can boost visibility, drive traffic, connect you with new audiences and ultimately, generate leads and sales.

Here’s everything you need to know about small business SEO. No jargon, no fancy software, no experience needed–just beginner-friendly tips you can implement right now to rank on Google and reach more people.

Small Business SEO Basics

“What is all this hype about SEO?” you might wonder.

Think about it: how often do you go to the second page of Google’s search results? Very rarely, I’m guessing. That’s because you get what you want on the first page.

Business SEO starts with this:

Start by making small changes to your site so your domain (or specific pages within the website, like a blog post or landing page) appears on the first page and as close to #1 as possible.

According to this digital marketing agency Boston, the higher your website ranks, the better your chances that people will click-through and engage with your site–whether that means signing up for your mailing list or buying your product or service. Ranking high on Google also helps with your small business branding.

There are two kinds of traffic that come from Google that are at the core of business SEO::

  1. Paid: Google Ads that appear on the search result pages
  2. Organic: people clicking through from a Google search page on non-ad results

We’ll focus on organic traffic in this post.

And no, you don’t need to pay anyone to “place” your website on Google. If you add the right keywords in your website’s content, it will appear automatically–and I’ll show you how.

Six key factors that impact your small business SEO rankings:

  1. Ranking for relevant keywords
  2. Ranking for trending keywords
  3. Creating engaging and relevant content that matches searchers’ needs
  4. Building high-quality backlinks to your website pages
  5. Fast loading speed
  6. Having a mobile-friendly site

Let’s get started.

1. How to Find and Rank for Relevant Keywords

Keyword research forms the foundation of an effective business SEO strategy.

Let’s say you’re a furniture retailer and are creating blog posts about home office furniture. In order to get the right people reading these posts, you need to ensure your website appears in the top search results whenever someone searches for “home office furniture.”

Now, how do you identify which other keywords to rank for?

The first step is to brainstorm broad topics related to your company, product, or service. Think like your customer: what would your target audience search for that relates to your business?

What To Do: Easy Version

Open a new tab in your browser and start typing in a potential keyword. You’ll get keyword suggestions of what people are searching for.

google search example for a keyphrase

In the example above, a florist could enter “flower delivery” and you’ll get both seasonal (mother’s day), location based (NYC etc.) and general (service) keywords that you can either add to your existing pages or plan new content around.

Or, let’s take the home office furniture example.

google search example

I typed in “home office furniture” and now I have even more relevant keywords related to the topic such as “home office furniture sets” or “home office furniture ideas.”

For location, try typing in “home office furniture Toronto” (or whatever you location is) and see if it comes up.

Write down all the keyword ideas that apply to you.

What To Do: More Advanced


Coding in the Dark Side (with Eclipse!)

screenshotGetting back to the old days where I used Emacs to code (ok, more than ten years ago), now I’m using a dark theme in Eclipse. Dark themes are less eye-stressing and now are becoming popular with editors like IntelliJ, Sublime Text and the last Visual Studio. And that’s why more people is learning to programming even to his difficulty, although there are strategies that people can use to improve their learning, so you can use all the power of your mind to learn, you could visit http://www.subconsciousmindpowertechniques.com/ to find out more about this.

The Eclipse Juno platform supports styling of the SWT widgets via CSS, but many other elements must be setup manually, so I published my CSS and setup instructions in a GitHub repository: https://github.com/albertoruibal/eclipse_dark_css

Welcome to the dark side!


Chromium Embedded Framework

chromiumHTML5 is a fantastic app framework, but there are many environments where you cannot rely on the features support of the browser (specially when dealing against Internet Explorer, old windows versions or environments where you cannot freely upgrade the browsers). Recently I found this problem trying to package Mobialia Chess 3D for Windows 8. Microsoft provides some tools to package HTML apps to native apps, but they will run with the Internet Explorer engine, lacking features like WebGL, WebRTC, etc.

Chromium Embedded Framework (CEF) is a library that allows to embed a Chromium webview in your native Windows or Mac desktop application. So you can convert any HTML5 to a traditional desktop app (and I bet some users to try guessing if Mobialia Chess 3D is an HTML5 app). You can also create a Windows/Mac installer to  distribute the app (I used InnoSetup, but this is another story…).

Using CEF requires a small knowledge about Windows/Mac desktop app development. I created a Windows app using Visual Studio Express, it was not very difficult, because CEF includes a “cefclient” sample project that you can use as a template to start your project development.

The main problem that I found was the size, embedding CEF will add 45Mb size to your installed application. I also found other minor problems like the lack of mp3 sound support (due to license problems) solved converting the sound files to ogg.

CEF is already used by great desktop applications like Steam, Evernote or Spotify, so it’s a great option to consider in your developments.


Setting up the GoogleTV Emulator

Many people has problems with the Google TV Emulator because it hangs up booting at the Google TV logo. The problem is that it only works with specific device configurations and resolutions.

First you need to install the “GoogleTV Emulation Addon” using the Android SDK Manager. Then, create a new “Device Definition” (notice the new “Device Definition” tab at the top of the Android Virtual Device Manager in the lasts Android SDKs).

When prompted for the device definition parameters you must enter:

googletv1

This setup is for a 720p resolution, for a 1080p you must change the resolution to 1920×1080 and the density from tvdpi to xhdpi. Once the device definition is created, the next step is to create a new Android Virtual Device using it:

googletv2

Et voilà, our Google Tv emulator is up and running:

googletv3


JavaScript as a Runtime

The future is here, and JavaScript (JS) is everywhere, but JS development is so hard that many people prefer to develop in other languages and then compile their code to JS, using JS as a universal runtime. Here are the most interesting options:

GWT

GWT stand for Google Web Toolkit, but now it’s in hands of the community and extensively used in many corporations. GWT compiles Java into JS and it’s strongly optimized. I use it a lot, and I feel very productive using an advanced IDE like Eclipse with tools like code assist, refactor, etc.

https://developers.google.com/web-toolkit/

CoffeeScript

A very compact language, inspired by Ruby and Python and that has become extremely popular in the last years. I’m not very familiar with the “Syntactic sugar” and I’m more productive with traditional languages (yes, I love curly backets! {}).

http://coffeescript.org/

Haxe

If you are an ActionScript developer (Adobe Flash), this is your language. It not only compiles to JS and ActionScript, also to PHP, C++, C#, etc. It’s becoming popular for the development of multi-platform mobile games with NME.

http://www.haxe.org/

Dart

This is a new language for the web pushed by Google. It tries to be a “modern and structured” language for the web that can be run directly into the browser, but to retain compatibility (and to run in other browsers that publicly rejected Dart), it can also be compiled to JS.

http://www.dartlang.org/

List of languages that compile to Js: http://altjs.org/