Android Development for Signage

Android emulator running signage

I needed to write an app..

There’s not much to be gained from having to write the same application multiple times in languages that support Android, Windows and iOS when ideally you could write it once in a development environment that can produce packages for all the other platforms from the same source code.

The simple cover all bases is to create a web app that you then run in an embedded web browser in a platform specific app. Lots of apps in web stores follow this approach with some added functionality done by the app itself.

The embedded browser has no toolbars, so it looks like a native app.

In the past I’ve used B4A to produce small Android apps. B4A is a fairly good development tool for making Android apps and it has a very good support forum so you don’t have to trawl the Internet looking for help.

It’s not free but it’s not expensive either. With that you write your code in modern VB. Update – as of Feb 2020 B4A is now free.

This time I thought I would try Android Studio. It took so long to start up I got bored with waiting so looked to see what else was available.

I’d looked at Xamarin in the past but it wanted a huge subscription which for the little use I had for it it wasn’t worth it. It’s since been taken over by Microsoft and is now a free part of Visual Studio.

Android emulator running signage

It has the advantage that apps can be written in C#, and can be compiled to run on Android, iOS and Windows.

It took a bit of setting up, mostly because the Android emulator required hardware virtualisation to be configured on the PC before it would work at anything like a usable speed. You can of course just plug your device into the PC via USB and avoid the emulator all together.

The emulator isn’t without it’s quirks, I managed to get mine into a mess that ended up with this cryptic message saying Decryption unsuccessful and unfortunately your data is corrupt. Yikes!

android emulator weird error message

I had to do the equivalent of a hardware reset in the emulator to clear it.

That’s done from the main Visual Studio toolbar Tools > Android > Android Device Manager

Right click on the emulator you’re using (after stopping it) and select Factory Reset to reset the emulator.

If you’ve never done any Android development before you will need to get familiar with the different layout options especially if you want to add or remove controls programmatically but the basics are soon picked up.

Xamarin looks like a fairly good tool although a lot of the help on the Internet is fairly old so I don’t know how popular it is. Finding the right tool isn’t easy as everybody expects different things from them so find something that works for you and stick with it.