Tag: app development

9 Months of Silence

Not long after my last post, I got offered a job answering email! I never would have thought that would suit me, but it’s working out really well, and has done me a lot of good. Hooray for gainful employment! Money-per-hour on that is so much better than I’ve managed with software development, but of course it’s not nearly as fun. It does mean that just about all the goals I listed were immediately thrown out of the window, but it serves me right for trying to be organised.

App 2 continues to be worked on as I find time. Recently I finally started reading The Pragmatic Programmer and it’s given me a much-needed nudge to try some new techniques. Right now I’m in the middle of rewriting all database-access code to use generated code, which I’ve been chipping away at for a month now. Is it the most productive use of my time? Probably not. But it’s a useful thing to know how to do, and it is helping to make many parts of the codebase simpler and more consistent. Plus it’s fun! But then I’m weird and find refactoring code to be very enjoyable. If anyone’s interested, I’ve uploaded the input file and result here. I’m using JavaPoet which makes manipulating code much easier than messing with Strings. I haven’t included the code that actually does the generation but maybe I will when it’s done — I hope to use it again in future apps.

Also, a few weeks ago I entered Ludum Dare 36 with my brother. It was the first time I’ve actually worked on a game with someone else, so that was cool and frustrating in new and exciting ways! The game, Boulderama! is not something I ever would have made on my own, and it’s much more polished than anything I ever produce, so check it out if you like casual/puzzle type games. I would like to apologise in advance for the music though.

I’m also now a moderator for an online game, Growtopia. That’s been an interesting experience too! As a shy person, suddenly becoming some kind of minor celebrity is super weird. Lots of kids get super excited to meet me or talk to me, or sometimes try to confide in me about their problems. It feels like an honour to be involved in it, but it’s also completely exhausting so I tend to hide a lot.

Growtopia simultaneously fills me with ideas for multiplayer games, and how I would structure the code… and also makes me never want to make an online game. There are so many complicated issues that come up, and the pressure of having 500,000 people log in every day, who all want different things from the game, makes it really hard for the 2 developers to please them. I’m also not sure I could ever actually finish a project that big and complicated, but that’s a whole other issue!

Automating Inkscape to Export Android Drawables

Developing for Android, you need to provide a lot of copies of each image you use, for mdpi, hdpi, xhdpi, xxhdpi, and even xxxhdpi screens – possibly even more in the future! Even if you create your images as vectors rather than hand-pixelling them, it’s still time-consuming to get Inkscape, a free vector drawing application, to export the 5 or so different bitmap files. Fortunately, Inkscape has some automation features built-in – for example, you can tell it to generate a PNG from an SVG via the command line:

inkscape source.svg -w 32 -h 32 -e dest.png

I’ve created a little Windows batch file that will take all the SVG files in a directory, and then create all the various sizes of PNG from it and put them in the right places. It’s available here on GitHub. It’s Windows-only, and expects a certain directory structure, but it should work if you’re using the default project setup from IntelliJ or Android Studio. If not, you should be able to tweak it.

One thing to note is that Inkscape does take a second or so to do each export, and that time unfortunately adds-up when you’re doing 5 exports per file, on potentially dozens of files. If I get around to creating a Gradle script that only exports the SVGs that have changed, I’ll make sure to post that as well.

Dev Log 14th of February 2015

After spending January rewriting this website, going on holiday, and then working on Spacelunky, I came back to Quick Quote and realised that it’s not the most important thing I could be working on. It just plain doesn’t sell well enough. I’m not cancelling the 1.5 update for it, as I do think that resolving some of the issues it has will help sales, it probably won’t make enough of a difference to warrant more time spent on it.

So! What am I working on? It’s another Android app, specifically the one I alluded to back in August. Still keeping it under wraps for now, but development is going really well. Being able to start fresh after working on Quick Quote for so long is great, and I’ve been able to avoid a lot of the mistakes I made when developing that.

Feature creep has been a real problem for me in the past, so I’m focusing on the absolute minimum that the app needs to do, will get some people I know to test it, make any necessary changes, and then release. Only if it actually succeeds will I consider adding to it this time! Hopefully, as I have an actual target market, and I haven’t found any competitors, it has a good chance of succeeding.

Dev Log 5th of December 2014

This week, it was back to work on Quick Quote. There are a bunch of improvements I want to make with how quotes are handled, such as adding customer details, and marking them as an invoice. On Monday, I added the ability to attach a note to a quote, which appears when the quote is sent to the customer. However, when starting on the other features, I ran into difficulties with the way quotes are stored internally. It’s caused me problems in the past, and I’ve finally decided to spend time reorganising things.

Technical Debt

“Technical Debt” is a measure of how awkward the code is to work with. When developing software, often you don’t fully understand a problem until you’ve already solved it once. At that point, the solution works so you move on, but it might be overly complicated, or slow, or less versatile than it should be. As this debt builds-up, development takes longer and certain tasks become impossible. Paying-off this debt takes time, but makes things easier in the long run.

In this case, when I began on Quick Quote, in my inexperience I decided to store quotes as XML files, rather than in a database, as it would be simpler. Up to a point, this has worked well – I’ve been able to gradually add new things to the quote files in a backwards-compatible way without having to do potentially messy database changes. The downside is that files have limited metadata – they have a name, and the last time they were edited, and not a lot else. For the saved-quote list to display or sort by anything else, such as whether the quote is an invoice, it would need to read in each file and process it, which could be very slow if there were a lot of quotes. This is the main reason I wanted to switch to a database, the other being that Android’s data-synchronisation system is poorly suited to working with files, so I’ll be in a better position to implement that in the future.

The biggest hurdle for this change is that everything needs to be converted the first time that Quick Quote launches, and that’s what I’ve spent the rest of this week on. It’s been slow work, as there are lots of things I’ve not done before, but it’ll all be useful for when I make future apps.

Ludum Dare

This weekend is Ludum Dare 31! LD is an online event where people create a game from scratch over a weekend. I’m hoping to participate, in which case I’ll have a new game for you by Monday. I’m hoping that the theme will be ‘Deep Space’, so I can make a rocketry game, but we’ll see.

Quick Quote 1.4 Released

Quick Quote version 1.4 has now been submitted to Google Play, and will become available some time over the next 24 hours. Version 1.4 brings a couple of new features, and some general improvements. So, what’s new?

Both Free and Professional now have an About screen, which links to this site and the various open-source libraries used by Quick Quote. This isn’t a big thing, but it’s good to have.

All the forms have been updated to use proper data validation and error messages. What this means is that if you’ve entered something invalid, it will tell you and won’t close until you fix it. Previously, forms would just close, pop an error message up, and just guess as to what the value should be, which was a pretty bad experience. I’m glad to have fixed it. If you’re a dev and curious, this article gives a decent overview of Android form validation, and this StackOverflow answer explains how to stop dialogs closing, because for some strange reason there’s no simple way to do so.

For Quick Quote Professional users, there are two new features about making things easier when there are a lot of quotable items. Firstly, you can now arrange items into categories. There’s a new category management screen, available from the quote item management screen. Items are grouped by category in the ‘add item’ dialog of the calculator, which can make finding things much faster. Search is still available there, and works for both category and item names. The second new feature is you can now import and export quote items and categories to a file, from the menu in the item management screen. Previously, users with more than one device, such as a business with multiple employees using Quick Quote, would have had to enter the quotable items once for each device. Now, they can enter them once, export the file, copy it to another device, and then import them again.

Next, I’m going to be jumping into development of version 1.5. This will be focused on improving the exported quotes, with customer details, quote numbers, notes, and being able to mark them as invoices or receipts or anything you like.

Quick Quote is a time-saving Android app for creating quotes and estimates while on the job. Feel free to try out the free version for as long as you want, with no limitations.

Dev Log 3rd of November 2014

It’s been a couple of weeks, so what have I been up to? In summary, “less than I had intended”. I was house-sitting for family for a couple of weeks in October, and their internet decided to be so unreliable as to be useless. As such, I couldn’t play around with snõwkit like I’d hoped – I’ll find the time to eventually though! I got back on the 24th, so what have I been doing in the week since then?

Back in September, I had an email exchange with a Quick Quote user who mentioned that being able to categorise items would be helpful, and that they were planning on using it on multiple devices. So as soon as I got back, I started work on a Quick Quote update. As of now, categories system is in place and working smoothly. The update should go out before the end of the month, assuming nothing catastrophic happens. As well as categories, there will also be a way to export your quote-items to a file, and then import them, to save having to enter them multiple times. Plus, there are some improvements to how forms handle mistakes or invalid input.

Quick Quote is an Android app, available for free, for creating quotations and estimates from your phone or tablet while out and about. Save quotes for later, and email them to your customers without needing a computer. Upgrade to Quick Quote Professional for more features, including the new categories system and import/export functions mentioned above.

Dev Log 23rd of August 2014

So, it’s been a couple of weeks since the last dev log. Firstly, I spent the week after F!shing was released attempting marketing things, and relaxing a bit. I’ve also been playing around with Unity, preparing to work on Mycronation. However! There are two projects that you’ll see before I continue with that.

Firstly, it’s Ludum Dare #30 right now! LD is a regular game jam that takes place over a weekend, where the goal is to make a game from scratch that fits a given theme. The theme this time is “Connected Worlds”, and I decided to make a game about managing a haulage company IN SPAAAAAAAAACE! So far, I have some randomly-generated planets with goods they want to buy or sell. It’s giving me a proper Unity workout too!

Balloon animals are a highly-valued commodity

Then after this weekend, I’ll be working on a business-focussed Android app. Someone suggested it to me a year or two ago, and twice I’ve attempted to develop it and ended-up sidetracked, but this time I will complete it! 😉

I’m thinking of weekly development livestreams for F!shing, as I’ve got a big list of things to add to the game still, and it might help get the game more publicity. They won’t begin until September, but I’m hoping to do them every Friday. If you want to get an email when I start streaming, you can follow me on Twitch.tv.

Quick Quote 1.3 Released!

Both Quick Quote Free and Quick Quote Professional have just been updated to version 1.3! There are several improvements that I’ve been putting in over the last couple of weeks.

Both versions:

  • Specify business details, a logo, and legal text to appear on your exported HTML quotes (in the Settings menu).
  • Item quantities can now be any positive number, including fractional parts – eg, 1.5
  • Improved the appearance on phones and Android versions older than 3.0 (Honeycomb).

Quick Quote Professional:

  • Added a search box to the ‘add item’ window, to make finding items easier.
  • Quote items can now be charged per minute or hour, or for an area or volume.
  • Minute and hour types have a new window for easily entering the number of hours and minutes.
  • Area and volume types allow you to enter the dimensions, and have the total calculated automatically.
  • Customise the units that are displayed for each quote item.
  • Saved quotes are organised by date, and have a search box to help you find them easily.

Quick Quote is a time-saving Android app for creating quotes and estimates while on the job. Feel free to try out the free version for as long as you want, with no limitations.

Quick Quote Professional 1.2: The Tax Update

Currently rolling-out across Google Play is version 1.2 of Quick Quote Professional, which allows you to add tax amounts to your quotations and estimates. You can specify any number of percentage tax rates, and the total is calculated automatically.

Quick Quote is an easy-to-use quotation and estimate calculator for Android phones and tablets. Enjoy the free version for as long as you want, with no limits on how many quotes you can store. This new tax feature is only available in the paid-for version.

Multiple App Versions on Android

It’s fairly common for Android apps to be released with both a free version, and a paid one with extra features. Quick Quote is one example, and now that it’s been out a little while, I thought I would share some of the tricks and traps that I’ve come across in its development.

Android has a fairly strict security system, that stops apps accessing each other’s data. That’s great when you are storing private information, but not so great when you want to share that data between your free app and your paid one. Fortunately, there is a way to tell Android that it’s safe for your apps to access each other’s data. This is by specifying the same sharedUserID in the manifest files. You also need to ensure that the APKs are signed with the same key. This causes Android to see them as related, and allows you to bridge the gap between them.

You can then call the createPackageContext() method with the package name of the relevant app, in order to obtain a Context for it, and then access its files and resources as normal. A word of warning, however: If the app in question is not installed, createPackageContext() will throw a NameNotFoundException and not return the Context you are after. There are of course, multiple ways to solve this issue. In the case of Quick Quote, I decided to have the paid version look for the free version when it launches, and copy the data over if it has not already been copied.

Now, probably the majority of the code and resources in the different app versions will be the same. Duplication is often a signal that things need a rethink. The Android development tools support the creation of Library Projects as a solution: put the majority of the code in the library project, then include it in the release projects and extend it with any differences.

In the case of inserting advertisements, it’s helpful to know about the <include/> layout element. This lets you directly include another layout file within a layout. This makes it easy to include an activity layout, and add an advertisement without duplicating the whole layout file. It’s also generally useful if you want to use a segment of layout in several places.