How to make professional looking screenshots for your apps — 09/2013 Edition

Cyril Mottier published more than a year ago 2 articles (Creating Professional Looking Screenshots and Doing the Photoshopping) about how to make professional looking screenshots so that your apps are even better when you published them on the Play Store.

These articles are really well written and I recommend that you read them.

They have however one issue — The PSD files given in the articles are a bit outdated now:

  • They are using a Galaxy Nexus as a base which is not the same ratio as a Nexus 4
    • (1280 * 720 for the GN versus 1280 * 768 for the N4)
  • The clock is set to 4:10 (for Jelly Bean 4.1) which was really good a year ago. Now it should be 4:30 (for Jelly Bean MR2 4.3).

So as I was making some nice screenshots tonight for an upcoming app, I’ve updated the PSD so that you can make some up-to-date professional screenshots !

Android Screenshots Assets

Enjoy ;)

PS: Hmm in fact I also needed the Nexus 7 version. So here are the 7 inches version (based on Nexus 7 2013 device)

Android Screenshots Assets for N7


Normally I’d release them under the Beerware licence like all my other projects.
But it’s based on Cyril’s work which is available under the Creative Commons BY 3.0 license. So for once it will be available under the Creative Commons BY 3.0 (which is still fairly liberal).

Some Gradle Tips for your Android development

As most of you know, Android released the beta of their new IDE called Android Studio (Check the Google I/O session to see why it is so much better that what you are currently using). With it comes the new Android SDK Build System (Same deal, here is the corresponding Google I/O session).
It was released a few weeks ago at Google I/O and it’s just awesome. A little more work that the current build system but so much more possibilities offered to us developers :)

The new build system is based on gradle. You can use it partly from Android Studio but as it’s often the case you may have to use it from the command line to do more complex tasks. Here are some tips if you use it from the command line.

For example to compile your project, you have to use gradle assemble. But you can also just write gradle a.
As long as there is no other task sharing the part you write after gradle, it will autocomplete it for you.

gradle check can therefore be reduced to gradle ch. You can’t reduce it to gradle c however as there is also gradle clean which also starts with a c

Ok. That’s a good start. But let’s make it even better.

Open a terminal and try the following command
$ g (Just a ‘g’, nothing else)
You should get the following output:
-bash: g: command not found
If you already have a command called g, you can use gr or gra instead

If that’s the case, go to your .bashrc file and add the following line:
alias g='gradle'

Open a new terminal so that the .bashrc is read again with the new line.
Now you just have to write g a

In 5 minutes we jumped from gradle assemble to g a

You still want more tips ?!
The gradle completion is camelCase based. Which means gradle deviceCheck can be reduced to g dC !

(Thanks +Xavier Ducrohet for showing me the completion part of these tips ^^)

ParcelableCodeGenerator

If you are used to coding Android applications, there is a good chance that you had to write some Parcelable classes.

A quick reminder about Parcelable : It’s an interface you can implement on your classes. If you do so, you can then store the whole class in a Bundle or as an Intent extra.
My webservice library, DataDroid, use Parcelable objects to retrieve the result from the webservices if you don’t use a Database to store your data.

There is one downside with Parcelable … You need to write a LOT of boilerplate to implement the Parcelable interface in your class. And as every good software engineer, I’m lazy :D
Which brings us to ParcelableCodeGenerator !!

You can find all the information on its GitHub page, but here is a short explanation :

  • You clone the repository and import the Java project in Eclipse (or your favorite IDE)
  • You write a JSON file defining your Parcelable class in the input folder (you can use subfolders to sort your files). Examples are provided to learn the syntax
  • You run the project as a Java Project
  • The corresponding classes are “magically” generated in the output folder ready for you to copy them in your project

It’s really easy to use and it’s going to save you a lot of time.

Last important thing : the project license. As all my other projects, it is released under the Beerware license :

You can do whatever you want with this stuff. If we meet some day, and you think this stuff is worth it, you can buy me a beer in return.

DataDroid v2 is available !!!

The version 2 of DataDroid is finally available !

What’s new ?

  • A better architecture of the library which reduce a lot the boilerplate the developer has to write (you can check this article to see the difference)
  • A more robust and easier to use API for your network connections based on HTTPUrlConnection.
  • New features in the network connection API : HTTP authentication and possibility to disable SSL validation.
  • Automatic generation of a valid Android User-Agent for your requests
  • Better management of calling multiple requests at the same time in your Activitiess (It was possible in v1.0 but not easily enough).
  • The library works with API 8+ now (aka Froyo and future versions) which covers currently 97% of the user base, so it shouldn’t be a problem.
  • A lot more samples available.

For a complete presentation of the library, You can check this page.

The sample application has been updated on Google Play :



And as always the source code is available on GitHub

If you want to know how it works and how to use it in your application, go to the DataDroid website and you’ll find all the information you need

ContentProviderCodeGenerator or how to create your ContentProviders easily

There are multiple ways to store data persistently in Android, like for example the SharedPreferences. One of them is to use a ContentProvider.

A ContentProvider is one of primary building blocks of Android applications, providing content to applications. You can for example use it to open some of your data to other applications.
You can also use it to just store your data and not export it to other applications (by setting the flag android:exported="false" in your Android Manifest).

Write your first ContentProvider can be a challenging task as there are a good number of methods to implement and it’s not always clear how to do it.
That was one of the reason why I released with DataDroid (my local and remote data management library) some skeletons explaining how to do it by just following a bunch of TODOs to follow.

However you still have a lot of code to write, most of it just being copy/paste all over the classes. And when you start having multiple versions of your ContentProvider with new columns or tables, it begins to be really annoying to have to maintain that…

Which brings us to ContentProviderCodeGenerator !!

Like every lazy software engineer, it was bothering me and so I took/found some time and wrote a code generator ! :)

You can find all the information on its GitHub page, but here is a short explanation :

  • You clone the repository and import the Java project in Eclipse (or your favorite IDE)
  • You write a JSON file defining your tables and their columns in the input folder. Examples are provided to learn the syntax
  • You run the project as a Java Project
  • All the needed files are “magically” generated in the output folder ready for you to copy them in your project

It’s really easy to use (and if needed I can help you)
It makes adding a column or a table so easy it’s not even funny.
It just works. (yes I know I just used an Apple slogan on an Android blog) (and if it doesn’t work, I’ll fix it)

Last important thing : the project license. As all my other projects, it is released under the Beerware license :

You can do whatever you want with this stuff. If we meet some day, and you think this stuff is worth it, you can buy me a beer in return.

Page optimized by WP Minify WordPress Plugin