Comfort Zone

In which I lament the fact that all of the things I appear to be doing these days make me supremely uncomfortable.

Chronicles running on an Android device. This makes some people happy.


Tunnel At The End Of The Tunnel


This last week has been... troublesome. Testing. Tiring. Torture, even.

Glyph Quest Chronicles is done. We're at the stage of the project where we're just putting the finishing touches to it. Not even the game itself - more the extraneous stuff around the outside of the game. The storefronts and the like. The last 10%* The list of Things We Need To Do to launch the game is tiny. Really small. It's like a list for ants.

The problem is that the things on the list were mostly Things I Didn't Know How To Do. The vast majority of them involve the Android version. Now, I've never done an Android version of anything before in my life so this was always going to be an eye opener. Leanne keeps reminding me that I didn't know how to do Apple things before Glyph Quest and I'm sure we all remember how well that worked out...

Building an Android version is pretty simple - Unity does it all for you. In many ways, it's actually simpler than iOS, seeing as how you don't need to mess around with the vagaries of XCode. The Google Play store is also pretty similar to iTunes Connect - it's all about setting up package names, store fronts and a bewildering array of art assets each to their own very specific and arbitrary specifications. At least, that's how it looks on the surface.

Of course, one of our biggest issues was the fact that we didn't have an Android device. That meant we had to take a short trip to the local CEX. Now the chap behind the counter was exceptionally helpful - he really seemed to know his Android-based onions. Because of an earlier build error thanks to the Facebook plugin we're using, I knew we were looking for a device that could run Ice Cream Sandwich as a minimum. (By default, Unity sets everything to Gingerbread which is just not high enough). Google's own stats would suggest that you really want to be aiming at either Lollipop or Marshmallow though.

Any of that make sense to you? Any of it at all? Well, the aforementioned CEX guy was well versed in Android OS speak and was able to point us in the direction of a little phone that should Ice Cream Sandwich up nicely.

After a ton of Googling how to actually get this neat little APK that I'd built onto the device in question, I finally managed to get it all installed. Which is also when things started to get a little... crazy.

See, part of the build process for Android involves a keystore file. As far as I understand it, this is like a digital signature file. The store needs this file so that it knows that you, the person who built the APK in the first place, is the same person that is now trying to edit or update the APK and not some random, unwashed hacker type up to no good.

What you absolutely don't want to do is overwrite, delete or otherwise lose said file. That's a Bad Thing. A Very Bad Thing.

The reason why I know that's a Bad Thing is because, well, that's exactly what I did. How Bad you ask? Without that file, we could not update the APK on the store. There's no way of extracting the keystore from the APK or recovering the file itself** This means that your app is, effectively, frozen in time which is of no use to man nor beast. Our only course of action was to completely rebuild the store with a new APK. That meant all kinds of crap - not just the faff of uploading all of the images and stuff but creating a whole new package name and new unique IAPs and, well, everything.

Returns Policy


With that going on, the last thing I needed was to find out that the game wouldn't actually run on the device we had bought. Even though it was running Kit Kat, which is better than Ice Cream Sandwich, it wasn't good enough. So we went back to CEX to return it and get something better - a tablet that could be upgraded to run Marshmallow.

That is, a tablet that could be upgraded to run Marshmallow if you had a PC and were prepared to flash its BIOS. If you only had Macs and didn't want to risk bricking your device, you were stuck with Kit Kat again. Back to the store once more...

Now we're the proud owners of a Samsung Galaxy Tab S2 - something that runs Marshmallow by default and costs 4 times more than we originally paid for that first phone. We've also learned that we cannot discuss Android operating systems within earshot of a toddler. #lifeLessons

To Do List


One area in which I feel that Google approach things differently to Apple is that of dialogue. Apple can tend to be a bit vague when it comes to the process of getting featured. They'll generally hint at stuff. Google are, thus far, much more straight forward. "Address these issues if you want to be considered for a feature."

That gave me a list of things to fix. Some were simple - a bug here, a misplaced piece of UI there, support for the Back Button*** - that sort of thing. Others... not so much.

This is where we started running into issues with the manifest. The manifest is an XML file that lists a whole bunch of stuff relating to what the app is allowed or not allowed to do. Unity creates this file automatically based on what your project does. The problem is that we were using a couple of plugins that had their own requirements for what went in to the manifest. That meant that every time you'd install the app, it would start asking scary questions like whether or not you wanted to allow it to make calls or access your photos and files.

Google said they would prefer it if it didn't do that.

Looking into it a bit more and it turns out that a lot of the permissions we were enabling were legacy workarounds for previous versions of certain plugins and really weren't needed at all. So the next problem became how to remove them and that's where things started getting interesting****.

As it turns out, we couldn't get Unity to stop adding those permissions when it was building the manifest. Nor could we edit the manifest after it was created as that was done as part of the build process so when that was finished, the manifest was all nicely wrapped up in the APK. That meant that the only way we could fix this was to write a whole separate program to take the APK, extract the manifest, strip out the offending permissions then re-integrate everything back into one, neat file.

That's really not something I have any idea of how to do. So that's when the call went out to The Network - my clever coder friends in the industry. Surely some of them have done this before?

Thankfully, yes they have. It turns out this is a pretty common - and frustrating - thing. Edwin stepped up and wrote me a python script that would happily do the deed. All I had to do was dip my toe into the arcane and baffling world of Terminal and run the script.

Ever used Terminal before? It's just like using MS-DOS back in the day. That is, unless you know exactly what to type, you're getting nothing. Even stuff like changing directory required a Google search on my part before I could do it. Suffice to say it was a painstakingly slow experience and I watch as my comfort zone drifted blissfully off into the distance.

But there you go. It's all done now. In theory, I'm wise in the ways of Android in so much as I can build an app, deploy the APK to the device, install it and get the thing to run. Beyond that, it's still very much guesswork and discomfort.

All that remains is to wait for the localisations of the screenshot text to come back and then... we're ready.

Except I still need to make a proper trailer and some videos for the Glyph Quest Academy...



* Which, as any developer will tell you, takes as much work as the first 90%. And then some.
** Unless you had it in source control, which we did not. Live and learn. Top Tip: Google now offer a cloud-based keystore thing. We're totally going to use that instead.
*** Rather handily mapped to the Escape key in Unity and far and away the simplest thing I had to do this week.
**** See also Really Uncomfortable.

Comments

  1. Amazing blog you have! Get best online soccer experience with Android Casino Malaysia. The most amazing things about this online casino site are it offers 100% sign up bonus to its player. With each gambling deposit, the player will get 5% to 10% bonus offers. Try Your luck today!

    ReplyDelete

Post a Comment

Popular Posts