Tuesday 2 June 2015

Time Slip

Programming, for non professionals really can be a challenge at times. But the satisfaction that comes after solving a 2-day old problem really can be a cheap thrill.
At the beginning of last night, I decided to add Facebook sharing to Float. 

All was going reasonably well. The Facebook instructions were specific to Android Studio, while I use Eclipse, but this post helped me enormously in that respect. He explains how the Facebook project will have missing dependency errors when first added to eclipse, but it's easy enough to identify them and add them. 

His example was the android-support-v4.jar but I also found the android-support-annotations.jar was needed. Working through these steps and then the Facebook guide for a sharing intent I made my first Facebook post from Float.

Then I unintentionally initiated a 2-day programming time slip. I don't remember what prompted me, but I started updating a lot of things using the Android package manager. All hell broke loose and nothing would build!

Two long, late nights were spent trying to get my updated Eclipse and ADT environment, and my Float project to play nicely, when finally I stumbled on this remarkably simple solution...
Turns out, in my updated packages, android-support-annotations.jar is included in android-support-v4.jar. removing android-support-annotations.jar from my Facebook project solved all my problems.

Luckily I didn't try anything to drastic without being able to undo my changes before finding this out. Interestingly, this wasn't even the accepted answer to the Stackoverflow question (though it has the most votes). Sometimes you just stumble on the right answer.

So, two nights lost, maybe I'll finish adding Facebook to Float tomorrow.

(photo of cat is for no reason other than it ids a funny cat).


Friday 29 May 2015

SiteSnaps


ANNOUNCEMENT: Pre-release of my new app, "SiteSnaps" 

So what is SiteSnaps?

SiteSnaps helps you organise your Site Photographs. Images are given meaningful names and are sorted into folders according to your chosen project name.

Imagine you're working on site, and you need to take photographs to document your work. You wan tto do this as quickly as possible, without draingin your battery and without having to write down detailed notes about each photograph.
- You could be in real estate, needing to photograph the many rooms of a mansion. 
- You could be in the automotive industry, needing to photograph all the new cars on your lot. 
- You could be in insurance, needing to photograph damage to property.
- You could be a surveyor, needing to photograph manholes and drains on a busy intersection.

With SiteSnaps:
- you set you project name and all of your photographs are stored in a folder and appear in an album on your device.
- you set your image type and all photographs are named with the image type
- you set the object number and all photographs are named to include the object number.
- you take the photo and it is saved with the date and time of the photo forming the rest of the image name.

No more spending an hour after your site visit organising your photos. Just copy the folder to your computer and you can go to get your dinner.

SiteSnaps has been released for beta testing and is available now in the Google Play app store if you sign up to be a tester. Just join the Google+ community and then follow this link to sign up to beta testing. 

Some more of SiteSnaps' key features include:

- Autoincrement the photo number: If you only take a single photo of each object, let SiteSnaps increment the number for you. If you take many photos of each object, use the onscreen buttons to increment the number only when you are ready.

- Default Email Recipient: Tell SiteSnaps your regular email recipient for photos. Then instantly compose an email with the most recent photo with a single button press.

- Geotag photos: use GPS to geotag your photos. You can also set the accuracy limit. geotags will only be written if the accuracy is better than your specified threshold. Or to save on battery, let SiteSnaps use a common geotag for a complete project. The location will be copied from the first photo with a geotag, instead of activating your location services.

- Camera Turn off: SiteSnaps is designed to save battery. Therefore, when you put the app to the background, the camera preview is turned off (unlike some default android camera apps).

SiteSnaps is supported by ads, but these will load under wifi connection only, thus preserving battery usage while on site.

*Battery performance has not yet been profiled.

Please share this post if you think you know someone who could find this app useful.


Saturday 31 January 2015

#GIMP Template for #MaterialDesign

Following my previous popular post about #MaterialDesign I decided that there was a need for a Launcher Icon template for #GIMP. This post describes two new tools I've created:
  1. A GIMP template for Material Design
  2. An updated Android Icon Image Export Script for GIMP

A GIMP template for Material Design


In many cases it may be safest to create your icon as vector art. But it will also frequently be more convenient to use GIMP.

Launcher icons are 48dp x 48dp in size, which means they are 48 x 48 pixels for mdpi screens. However you will want to create icons for different screen pixel densities, and hence different pixel sizes. Typically you will need sizes up to xxx-hdpi, with a pixel size of 192 x 192. You will find other templates are created at this size so they can be down-scaled to smaller screen sizes.

However, If you want to reuse your launcher icon for the Google Play Store, you will also need a high resolution graphic at 512 x 512 pixels. You could use a different graphic entirely, one with more detailed lines and features, or you may want to create a single original with high enough resolution to be used for the Play store and downscale it for your launcher icons.

The GIMP template I have created is 576 x 576 pixels (an even 12 times 48). This means you will need to downscale for the Play store icon, but down-scaling a bitmap is better than up-scaling right? The following describes it's key features:

  • The template file has a pre-defined grid interval of 12 pixels (1dp), corresponding to one pixel in the down-scaled 48x48 pixel icon. You may need to turn on the grid from the View menu.
  • It also has vertical and horizontal guidelines pre-configured for the same positions as the Google example here.
  • The template includes the diagonal guidelines, the small circle guideline and the four basic template shapes (square, landscape rectangle, portrait rectangle and circle) as paths. You can use the paths to create objects. To do this, open the paths dialog window (from the Windows - Dockable Dialogs menu), right click on your chosen path and select "Stroke Path." You can then fill the outline that this creates.


Download the template here:

Material Design Template for GIMP

Android Icon Image Export Script for GIMP

If you are making Launcher icons with the template above, you'll be needing to resize and export for a number of graphic sizes, and you'll need to move those graphics to various folders for your Android project. 

To simplify this, you can use the Android Icon Maker GIMP Script that I posted previously

I have updated the Script making the following changes:

  • I've now added a "custom" option for the graphic size in dp units (previously it was pre-configured for three image types). 
  • I've added a 512x512 pixel image option. This option is independent of the graphic size and is designed for Play Store launcher icon graphics. It will be copied directly into the assets\_Pre_Production folder in your project (so it is not included in your APK). 
  • I've changed the folder location that the script needs to be pointed to. Previously you pointed it to your res folder. Now you point it to your project folder, and output is placed in the res folder or the assets folder (depending on your chosen options). 
  • Finally, I removed some of the options I felt were too complex for this tool. 




Both the new and old versions are available:

New Android Icon Maker GIMP Script

Old Android Icon Maker GIMP Script

Instructions for installing a script-fu plugin can be found here

Wednesday 28 January 2015

Tools for #MaterialDesign

Last night I promised a follow-up post about some of the resources I found to assist in designing for Android's Material Design. I'm focusing on #Inkscape because it's free and I've chosen to learn with this, though some things here relate also to #GIMP, another free program I make use of. So here it is:

Design template

If you are going to follow the Material Design guide lines for launcher icons, you'll want this template file



It's certainly helpful, though there are perhaps a few improvements that could be worth making. It lacks the main keylines on Google's reference image (below). It's easy enough to add this but they could be there in the template to start with.

Also, it is pre-configured for the pixel size of the largest icon you will need for your app, but neglects to cater for the 512px by 512px icon size needed for the Play Store (see Android documentation). The first thing you'll want to do is make this larger.

Colour Palettes

If you are going fall inline with the colour palettes of Material Design, you're sure to want to have these easily accessible. Google provides files for Adobe illustrator and Photoshop, but if you are on my budget try the .gpl file of the same palettes available here for GIMP and Inkscape. This page from +dominoc925 gives you instructions to add the palette to GIMP if you need it.

Drop Shadows

Material Design talks a lot about lighting, shadows, tinted edges, and shaded edges. Do you know how to implement all of these in your graphic editor? What? You're an experienced graphic designer aren't you? Aren't we all? Well no, of course we are not. I hardly knew where to start. That's why this resource from +Shining Wing was very helpful to me. It provides objects with pre-defined drop shadows for various depth levels. These filters can be instantly applied to your own objects. 


My only issue with this (and it may be an Inkscape issue rather than an issue with the filters) is that I found the lower edge of my shadows were truncated. 

Summary

These were all the resources for Material Design in GIMP or Inkscape that I located in one evening of searching. I'd be really keen to know of others. If you have your own or know where I can find more please comment on this post or private massage me and if I have enough I'll do another post.