Game development for Android (attempt #3)

A while back (9 years it seems, see here) I had the urge to try and create a game in Java after having spent many years of Java development for business, but I’d never developed a game. It turned out OK (final version here), and along the way I abstracted a simple 2d game engine (here).

Inspired by one of the game development panels at Silicon Valley Comic Con last weekend, I’ve picked up a copy of  Android Game Development by Example by John Horton, and now off I go 😉 I’ll report back in a couple of weeks…

Flashing CyanogenMod 12.1 ROM to a Galaxy S3

My T-Mobile Galaxy S3 hasn’t had any over-the-air updates for a while (it was still back on Android 4.3) so I decided it was time to manually flash a CyanogenMod ROM (I ran CyanogenMod on my previous Android phone so I’ve been through these steps before, but every phone is slightly different).

Following the instructions here, the first issue was when flashing the Recovery ROM. Per the instructions when the S3 is put into download mode, after sending the Recovery ROM using ‘heimdall flash –RECOVERY recovery.img –no-reboot’ I didn’t see the blue progress bar on the phone, even though heimdall had completed successfully each time I ran it.

The Home+Up vol+Power combination to boot Recovery on my S3 would only boot into Recovery if I released the buttons immediately after the first display on the screen – holding any longer would just bypass Recovery and start a normal boot.

Next issue – when transferring the new ROM images with adb to /sdcard,  in the ‘Apply Update’ menu item, under sdcard1 I couldn’t find my zips. Using ‘adb shell’ to dig around on the file system it seemed this had literally created a sdcard dir on the root of the filesystem, not copying to the sdcard itself. Maybe I followed the instructions too literally. Anyway, copying to /data/media/0 was a location that I could browse to in the menu, so this worked for the initial install.

After booting first time, I had to re-enable developer options so adb could connect (tapping ‘build version’ 7 times in the system settings menu). On CyanogenMod 12.1 I now had a /mnt/extSdCard, so I uploaded a zip with the Openapps Google apps (from here), booted back into Recovery (Home+Up Volume+Power) and installed the Google apps.

Next issue – none of the Google Apps would start up as a I got the ‘Google Play Services have stopped’ error – this sounds common if you have a mismatched Google Apps version compared to your base Android API level, although that didn’t seem like my issue.

(If anyone’s interested, the error in the logs was NoSuchMethodException callDrawGLFunction … snip … Api21CompatibilityDelegate )

Api level 21 caught my eye as that’s Android 5.0 – 5.0.2, not 5.1. So next I tried downloading the Google apps for 5.0 instead, but the Recovery ROM won’t actually allow you to install a GApps package that is for a different Android API level, so that didn’t work.

Following instructions for wiping Dalvik Cache, /System, /Data, Cache, and even internal storage didn’t make any difference either (Team Win Recovery ROM gives options to delete all of the above, whereas the CyanogenMod Recovery only has an option for a Wipe/Factory Reset – I’m not sure if this wipes all the partitions or not)

Next step, I tried a number of the different OpenApps packages, and none of these worked, they all gave the same error:

open_gapps-arm-5.1-mini-20151206.zip

open_gapps-arm-5.1-nano-20151206.zip

open_gapps-arm-5.1-pico-20151206.zip

Ok, next, digging back through some older releases from the GitHub releases page – the first older release, 20150716, wouldn’t install. The next one 201510715, did install, and yes, finally got there, the Play Store opens without an error and can finally get stuff installed and setup.

That took much longer than I was planning, but the CM 12.1 build with Android 5.1 looks a massive improvement from what I had, plus it’s pretty snappy and seems more responsive. That could be to do with my 2 year old phone never having a factory reset, but it’s looking pretty good right now, so I’m happy.

 

Forbes predicts Microsoft will pull out of mobile phone business

Things are still not looking good for Microsoft’s attempt to get a foot in the smartphone market. While their FY16Q1 financial results stated their mobile phone revenue fell by 56%, which was ahead of the new Lumia launch, IDC’s latest sales figures have shown Windows Mobile sales dropped 10% for the year. Given the launch of the flagship Lumia 950 models this year that has to hurt.

Worst still, Forbes are predicting a gloomy future for Microsoft’s mobile business for the coming year, predicting that they will cut their losses and pull out of the mobile phone market altogether.

Given the dominance in the market of Android and iOS devices (IDC shows Android has 80% global market share at this point, and even iOS is relatively far behind with 14%), one has to wonder what Microsoft were thinking when they bought Nokia and announced their Windows 10 Mobile plans. If they can come out with a truly revolutionary new product to catch everyone’s attention then maybe they have a chance, but an evolutionary step forward (and a small one at that) like the Lumia 950 models is definitely not the one that people are going to be dropping their Androids for and moving to. It’s just not good enough.

Oracle: Google has ‘destroyed’ the future of Java on mobile devices

As a long time Java developer (since 1996) and advocate of the language and platform, the legal action from Oracle against Google and Android deeply saddens me. If anything, what Google has achieved is nothing but incredible and outstanding, as they have turned an arguably Java based/influenced platform into the most successful mobile device platform by far, something which Sun and now Oracle were never able to achieve.

Instead of crying over their lost opportunity, Oracle should be doing everything possible to partner with Google and license Android and/or adopt it as the mobile device platform for Java.

The joke that is Java ME needs to be ditched. It’s had it’s time. It was on almost all (what are now called) feature phones sold years back, but no-one apart from (some) Java developers knew this, so now even that potential success is nothing but a lost opportunity.

Please Oracle, do yourself a favor, preserve what little respect you have left from your loyal Java developers: if there’s anything being destroyed here it is our faith in you as a Company and as the guardian of Java.

Ditch Java ME, and license Android from Google as the new Java ME.

Android is what Java ME should have been from day one.