Android: Front Cameras are not Cameras

Let’s say you want to make an app that includes the occasional taking of a photo (i.e. for the profile pic) but you want to have it in-app and not launch the default intent.

Of course you follow the instructions for “Building a camera App” from the official website.

But there are a few points where the API is not obvious and can drive you mad. Specially if you are using a 2012 Nexus 7 as a test device (or any device that has front facing camera only).

Checking the hardware

Here is where the fun begins. Because this is not a killer feature, we won’t request the feature in the manifest, but check it in the code (as the documentation suggests)


Returns false. So it seems there is no camera. Let’s try something else.


This returns 1. It seems there is a camera. Hmmm.

The documentation takes us out of our error. FEATURE_CAMERA means:

The device has a camera facing away from the screen.

There is FEATURE_CAMERA_ANY, but that is API level 17, and we are “only” minSDK=14, so we can not use it. We also have FEATURE_CAMERA_FRONT, we are saved.

The way to check if a device has any camera is:

PackageManager pm = getPackageManager();
boolean backCamera = pm.hasSystemFeature(PackageManager.FEATURE_CAMERA);
boolean frontCamera = pm.hasSystemFeature(PackageManager.FEATURE_CAMERA_FRONT);
return backCamera || frontCamera;

Or just use Camera.getNumberOfCameras().

Be aware that if the camera feature is requested in you manifest, your app will not be available on devices with only a front facing camera. Maybe you want that, maybe not.

Opening the Camera

The fun continues when we try to open the camera. If we have more than 1 camera, we can select the one we want, but if there is only 1 camera we can go ahead and open it

if (Camera.getNumberOfCameras() == 1) {
else {
   // Select one camera
   return selectAndOpenCamera();

Except that -in our special case- this code returns null. Because, you know, when it says camera it means back facing camera. At least the documentation of is clear.

Creates a new Camera object to access the first back-facing camera on the device. If the device does not have a back-facing camera, this returns null.

You should, instead, try to open the first camera, That works.

In the case of selecting which camera to open (i.e. if you want a front facing camera by default) you have to iterate over the cameras, check the CameraInfo of each of them, and open the one you want using the id.

And remember: For Android, camera means back-facing camera. Front facing cameras are not real cameras.

Codemon 3.1: Dark Codeboxes and more

It has been a while since the Arcanes were released. Today we have an update that includes a brand new item: The Dark Codeboxes.

Dark Codeboxes

Many players were not motivated to open battles. You open them not knowing your opponent and once an player knows the strengths and weaknesses, they can always accept it with a Codemon that has a high chance of winning. And losing most of the battles is demotivating.

But opening battles is key to the game, se we wanted to motivate this players again. The Dark Codeboxes are the first step towards that.

A Dark Codebox hides the Codemon, that simple. This levels the field since you open it blindly, but they are also accepting it blindly. Dark Codeboxes can only be used with Codemons of level 6 or more, which is where efficiency starts to be very relevant.

A Dark Codebox is obtained by applying Dark tinture to a Codebox. You do not get an extra Codebox, but you “Darken” one.


Darken the first Dark Codebox is free for all the players once they raise a Codemon to level 6.

We will continue to encourage players to open battles in other ways in the future.

Second currency: Codebucks

Dark Codebokes are a premium item, and for that we included a second currency: Codebucks.

You can get Codebucks by linking Codemon on Facebook, as a daily reward and completing free offers. Achievements and (some) Quests will -in the future- give Codebucks.

Of course you can get them as an In-App purchase.

The slots on the market and the extra Codeboxes have changed the price and now cost Codebucks instead of Credits.

When summoning an Arcane you just spend Codebucks or Credits to get an A-Summon or a B-Summon performed on the spot. Prices are the same, just made it simpler.

Event ticker

We do run events every now and then, and when we do so, we send an in-game message to all the players that have been active, and we also publish it on Facebook.

Still, I know that many players miss them. So, from this version on, whenever an Event is running you’ll see a ticker under Quests, where you can see the details of the Event.


Improved Codemon filtering for battles

Until now, every time you went to open a battle, the search terms were cleared and all your Codemons were shown. That was a bit unconvenient when you were trying to open a few battles with the same type of Codemon, for example, Epics.

From now on, Codemon will remember your last search for as long as you are opening battles.

Transfer account

Because Codemon associates the account to the phone, we have many requests of people that want to migrate their account to their new phone.

We have added the option under settings, so you can transfer everything to another account.

Final words

This update has taken a lot longer than I expected to be ready, but I hope all of you enjoy it. There are still many ideas on how to extend Codemon, and I hope I’ll have the time to implement them.

Until then, happy scanning and battling!

Get Codemon on Google Play

The importance of a “Rate Us” dialog

Paid apps always had a better ratio of users leaving feedback than free ones, but in the case of MTG Tracker it was too much.

MTG Tracker used to have a very good ratio of users that leave comments. This was reduced when Google Play required G+ sign in to leave a comment, and that was specially bad for the free version, which was released after that change was made.

Things looked like this:

Screen Shot 2014-01-31 at 13.07.04

Both had good average rating, but while almost a 6% of the users leave a rating on the paid version, for the free one that number it is under 0.6%. Yes, 10 times less.

So, I decided to add a “Rate Us” dialog to improve that, knowing that the users of the app use it a lot and just may never thought of rating it.


I did not add it before because for a while I only had the paid app, which has a good amount of reviews. After one week, I went to check the results of the dialog. The stats looked like this:

Please note that the free version has much more installs per day.

Screen Shot 2014-02-06 at 12.09.30

So, almost 100 new ratings on the paid version and 35 more for the free. The conversion rate grow for both apps. Still the paid version got even more ratings.

I decided to let a few more days pass and checked again.

Screen Shot 2014-02-17 at 14.48.11

Another 80 ratings for the paid version and 40 for the free one. Also, average ratings for the paid app keep getting higher, but the ones for the free seem to oscillate.

As it turns out, the percentage of users leaving a rating on the paid app is almost the same as before the dialog was introduced, but the ratio of reviews for the free version has grown up to 0.7%, may not seem much, but the free app has 30% more ratings than before.


After this experiment, it is very clear to me that you must always add a “Rate Us” dialog, even if your current amount of ratings is good. Most users are lazy and will not rate your app unless you ask them to do it.

Some final notes:

  • Don’t be intrusive, if the user does not want to rate you, so be it. Always have a “No, thanks” option
  • Trigger the pop-up after a satisfying user experience, users will be more likely to give you positive reviews if they are in good mood.

MTG Tracker 5.4 Released

With the new set of Magic The Gathering ™ comes a new version of MTG Tracker. Let’s see what’s new:

Added Born of the Gods

Obviously, as with a new set, the cards need to be added to the app.

Foil prices from TCGPlayer

This has been requested many times. Although it was possible to get foil prices via CardShark, most people uses TCGPlayer as a price reference.

Because of the limited space we have on screen, I have removed the high and low prices, keeping only average and foil. The screen looks like this:


Fixed crashes on card lists on tablets

There were a few crashes and misbehaviour on the card list section when used on a tablet. I was aware of the bug thanks to a user that mailed me with very extensive steps to replicate both problems.

Is because of users like this that I love building the best product I can.

Improve rules search: Allow literals (with quotes) and negatives (with ~)

Another feature suggested by a user. Adding more power to the advanced search by allowing literals and negations. Some examples of why this is useful.

Because it is not the same to search for “target player discard” than for target player discard. The results are down from 232 to “just” 91.


But it gets better, when searching for creature damage, we get almost 2,000 results, but if we want to filter out the cards that do not require to target, we just add ~target to the search, and we are down to “only” 811 cards. Still plenty of creatures that do damage when summoned, but definitely a shorter list.


Library filtering in playtest

Also a very requested feature, when you use any kind or ramping effect (searching for basic lands) or any type of tutor, searching all the library was inconvenient.

Decks can be sorted by Converted Mana Cost

Cards inside decks have been always been sorted alphabetically, but this may not be the most convenient sorting for some power players. Now the contents of the deck can be sorted by CMC (ascending or descending)

Improved Card lists and Trade with card details

Since the last version, deck screens included the cards casting cost and type. This “extended information” view was very well received and it is now also included on card lists and trade.

Closing the conference season

It is time to close the conference season for this year. It has been a very interesting one, although I’ve spoken only at 4 places, they have been all very interesting.

GOTO Amsterdam: A very important software development conference in the Amsterdam edition, they had a mobile track, I guess I couldn’t miss it.

GDC China: My first time speaking at a GDC, where I presented my “Indie Game Developer Survival Guide”. Great experience, great city and great conference.

DroidCon Amsterdam: For the 3rd year in a row DroidCon celebrated its Dutch edition, and for the 3rd year on a row, I presented a talk there. I think I am holding a record on this one.

GDC Taipei: I was asked to repeat my talk from China at GDC Taipei. I am really humbled that they like it so much that they wanted it there. Also a great experience.

And for next year?

One of the great things of being an international speaker is that you get to travel a lot, given the sort of conferences I like and the expertise I have (Android & Game development) GDCs and DroidCons are where I find myself at home.

So, for 2014 I am sending talk proposals to:

GDC and GDC Europe: The bigger editions of GDC, held in San Francisco (largest) and Cologne, are my next targets to speak at. I want to be able to say that I’ve done the whole set and I’ve been told that the one in San Francisco is amazing.

DroidCon London and DroidCon Berlin: These editions are slightly larger and older than the Amsterdam one, and I’d like to see them first hand.

“Learn to Hoop” 1.0 Released

Platty Soft has a history of making apps for jugglers: First JuggleDroid, and more recently KendamApp – The Kendama App. Today, a new one is added to our family of juggling apps: “Learn to Hoop”.

The app is an a tutorial for learning to juggle with hula hoops. with both textual explanations and videos. It is an adaptation of the educational DVD “Hooping” from Peachysteve.


The app features almost 1h20m of high quality video among 7 chapters containing  51 lessons.


Subtitles show the instructions during the videos, and more detailed instructions are included separately for you to read at your leisure.

All videos are bundled into the app, so you can view them any time without the need for an internet connection.


Get it on Google Play

SpaceCat returns in HD

Today I announce a new version of the most popular title of The Pill Tree. We bring you SpaceCat HD.


Back in 2011, when we were developing SpaceCat, phones did not had enough memory and we had to reduce the size of the textures to make the game playable. Some tears were spilled when downsizing the textures, but it was necessary.

Today, that is no longer a limitation. Modern devices can use the original textures without any problem, so we have put them back. Check the scenarios and how they look a lot better.



SpaceCat HD


SpaceCat HD is a premium app, and it comes with a value pack:

  • Ad-free
  • Vents world is unlocked
  • 500 pills instead of 200 at the beginning of the game

But we didn’t just put better textures, we did some other upgrades to SpaceCat

  • Improved gamepad support (including Green Throttle)
  • Integration with Play Games
  • A revamped shop for spaceships and cats
  • Tips on the loading screen

Get SpaceCat HD from Google Play

The (Mobile) Indie Game Dev Survival Guide

The (Mobile) Indie Game Dev Survival Guide is the talk I presented at GDC China 2013.

Can an indie survive in the mobile world?

It may look like games for mobile is a paradise for indie developers, but truth is that it is quite hard to be noticed among the swarm of apps.

In this presentation, Raul shares the tips & tricks he has learned about how to survive as a mobile indie game developer for the past 3 years, including a post-mortem of all the games of The Pill Tree and also a post-mortem of The Pill Tree as a company.

MTG Tracker 5.3 Released

Another update for MTG Tracker, just in time for another pre-release.

First things first, the changelog:

  • Added Theros
  • Fixed crash filtering collection / wish list
  • Improved deck view with card details
  • Improved deck list with color and format
  • Improved flow for adding cards to deck
  • Price for a list now applies on the selection
  • Taping on a card on a list selects the proper set image

Now, apart from a few bugs on the collection / wish list section, all this one does is to improve the screens and the flow on the decks area. Because it is one of the most used features of the app, and I want to provide the best experience for the users.

To notice how much of an improvement on the UI this version is, I have to show two screenshots. This is how it was until this version:


This is quite a nice screen with good information. Being able to see the deck list together with the details is nice, and it has been good for a long time, but with today’s release it looks like this:
decks_deck_new_framed (1)Now, each card on a deck has type information and casting cost… I can’t believe I had not added that before, now I can’t imagine that screen without them.

But also, for each deck, you can now see the format of the deck and the colors it uses. Because it is always nice to know that stuff.


Speaking at GDC China

The talk “The Indie Game Developer Survival Guide” is part of the Mobile and Smartphone Games Summit of GDC China.

The talk is inspired by other guides like “The Hitchhikers’ Guide to the Galaxy” and “Zombie Survival Guide” and it is a compendium of the post-mortem of the games of The Pill Tree and a post-mortem of The Pill Tree as well.

The talk goes over the current mobile gaming landscape, the different business models, how they worked for us, lessons learned and tips so you can increase your chances of survival as an Indie Game Developer.

GDC is a great conference for game developers, be it USA, Europe or China, and I am really humbled that they invited me to speak there.

However, China is very far away, but for the ones in the Netherlands, I will be presenting a slightly different talk at DroidConNL this year: “The Mobile Indie Developer Survival Guide” which includes some more details about how apps do.

The slides will be available on Slideshare soon after the conference.