Our open source FutuParty app

Daniel LandauSoftware Developer

...or why diversity of ideas matters in a company

It’s 2017, so when Futurice organises a party, of course that party has an app. It’s called Futufinlandia after the name of this years FutuParty and it’s available at the Play Store and at the App Store. It’s kinda cool. It’s also something that’s not immediately useful for me with those details because I don’t have a device running either of those stores.

Wait, what?

I’m not a luddite, I do have a smartphone. It does run a version of Android, but there’s a slight difference. Google publishes the Android Open Source Project (AOSP) and Android With the Google Experience (not an official name). The latter is the thing you get when you buy an “Android phone” from the store. It’s also a thing I haven’t used for many years now. I have my reasons, personal freedom (from outside control, from surveillance), privacy, even performance. I know this is a choice not shared by many, in fact I think in a company of 400 employees I’m probably the only one who made this choice. I think in last year’s party there was one other among the guests.

If I don’t get my apps from the Play Store, how do I get them then, you might ask. I mainly use free and open source apps, and get most of them from F-Droid. While the Futufinlandia app is not in F-Droid, it is open source. It is good to stop here for a moment to appreciate how cool this is. Some companies would not share the source code of an app like this even with the employees, Futurice shares it with the world! Getting the app on my phone should be a quick matter of cloning, compiling and installing.

It almost is, but not quite. When writing Android apps, you rely on three things outside the code you write yourself: third party libraries, things provided by the Android system, and things provided by Google Play Services. I don’t run Google Play Services on my phone, so the last part is problematic.

At Futurice we value diversity in many ways and one aspect of that is diversity of ideas. While people who run Android without Google Play Services for open source reasons is, and will probably remain for a good time a market that is too small to matter for our business, there is another market that doesn’t run Google Play Services that could well be relevant for us in the future: China. The Chinese government and Google have a difficult relationship and whether or not Google services are available in China shifts from year to year, but the Android Open Source Project is used a lot in China with Chinese additional services. Coping with that is definitely something that can be learned quickly by competent developers, but a little bit of diversity in habits might give us a small edge of already collectively being somewhat familiar with how to make Android apps that don’t rely on Google.

How did our app end up depending on Google Play Services, you might ask. Thankfully not in many ways in this instance. We recycle the same base app (originally created for Whappu for the technical university students in Tampere) for all our parties and trips. On our trip to Prague, there was a map view in the app, and even though our declared dependency was an open source react native component, it uses Google Maps from Play Services under the hood. In all apps we use an open source library to get device info, and out of there we use a unique ID for analytics purposes. That library in turn again punts to Google Play Services for the unique ID. Even though our open source app isn’t directly dependent on anything that isn’t open source as well, these things creep up easily by accident.

These same open source dependencies are used in the apps we create for our clients as well. Now that we work mainly in western Europe where every Android device is sold with Google Play Services, it’s not an issue. It is a problem in China though, and even in the west Amazon tried to bring to market the Fire Phone that didn’t have Google Play Services.

The rest of this post is about technical details related to React Native and code, and it is not required reading unless one is interested in those things.

I’m running Arch, so I use system packages to install Android tools, they reside in

/opt

not in

/home

Get an error

A problem occurred configuring project ':app'.
> A problem occurred configuring project ':react-native-device-info'.
> Could not resolve all dependencies for configuration ':react-native-device-info:_debugCompile'.
> Could not find any matches for com.google.android.gms:play-services-gcm:+ as no versions of com.google.android.gms:play-services-gcm are available.