Android Studio – Importing Library Projects

So Recently I moved to using Android Studio as my primary development environment for Android of course. The switch was simple and Studio has some really nice productivity feature to help you write code quickly. However I did find that importing library projects a little tricky initially especially having little to no knowledge of Gradle and how it works. So I thought I would write up a short post describing how.

Steps to Import Android Library to your Project

  1. Create folder in top level called libraries (same level as target,.idea)
  2. copy the library project into this folder
  3. Open Project Structure (Right-Click on Top Level Project)
  4. Click + icon towards top left
  5. Import Module
  6. Import the module you copied into libraries
  7. Click on the library name (left hand nav bar)
  8. If the library you are using has any dependencies that your project uses you can remove these on dependency tab (i.e Support Libs)
  9. Click on your project in the left hand nav bar
  10. Select dependency tab and add the new library module to your project, Apply and close

Thats the basic setting to apply a module to your project running the project will probably result in Gradle errors at this stage, because Gradle cant build the project or even find it. Edit the following files


include ':libraries:library-name',':project_name'


add in

    compile project (':libraries:view-pager')


If building the code at this point still gives you gradle errors your library project probably cant be built because it doesnt have an appropriate build.gradle using this template build file should help you get the project building.

buildscript {
    repositories {
    dependencies {
        classpath ''
apply plugin: 'android-library'

dependencies {
    compile ''

android {
    compileSdkVersion 17
    buildToolsVersion "17.0.0"

    defaultConfig {
        minSdkVersion 8
        targetSdkVersion 16
    sourceSets {
        main {
            manifest.srcFile 'AndroidManifest.xml'
            java.srcDirs = ['src']
            res.srcDirs = ['res']

Hopefully this short guide will help anyone that faced the same problems I had at the beginning


Appspiration – Backwards Compatible ICS Apps

Since my last post I have been trying to come up with a new idea for an app, something that isn’t just going to get a few downloads and fade away. This is one of the hardest things to do outwith a day job, there are few processes left in life now that can still be improved and ways to make things easier often make things harder.

Seeing as I am completely dry of idea’s I decided to have a play around with the ICS design guidelines and try out some UI designs. When I realized that features such as ActionBar and ViewPager arent compatible before Android 3.0. It was during this time that I found a few widgets that help achieve similar effects with earlier versions of Android and would encourage anyone to use them.

This mans GIT should provide all –

Look for ActionBarSherlock and ViewPagerIndicator both of which can transform any UI.


Since finding both of these I have yet to find my next idea but I am still  looking or if anyone has any requests let me know I can see if I can help.



Migration from AdMob to Leadbolt !

Thought I’d give an update on how the swap of ad providers has gone so far after a few days.

I have almost migrated all my Ad’s onto Leadbolt app banner from Admob and I have seen interesting results so far, app banner advertises an App most of the time and you don’t get paid for clicks but conversions and the EPC seems to be substantially higher than Admob. At the moment I still have some users on the Admob Ad’s perhaps they haven’t yet updated the app.


Here’s a quick snap shot of current proceedings

Admob – I seen a rise back to the highs of $0.03 cents woohoo 

Only showing the last 4 days as that’s when changes went in





LeadBolt – Note following figures are from last 2 d

ays, with $0.18 cents, and $0.0.7 cents from the two coversions





So overall first few days have been pretty good considering the rates that Admob has offered,I will keep everyone posted on whether this continues. In the meantime I would recommend signing up and trying Leadbolt for yourself you can do this via this refferal link – Leadbolt Ad’s


Good Luck – I have started work on latest project so will be tied up with that for some time will post as soon as time frees up with an update on the Leadbolt platform.

Week 2 – Android Market (Beginners Experience)

Last week I posted about my first week on the Android Market, This week has seen the end of Week 2 and I thought I would update on what has happened with my app Killerballs below :

Android Market (Installs)

So last week I was just about hitting 50 installs, a week later and I am around 150 the net installs is much lower at around 50/60% of this it does fluctuate day to day. I am fairly happy with this anyone that had read last weeks post will know that the game I made was meant to be an end to end learning experience of everything android so these figures seem quite good considering.  The feedback on the blog and the market has been extremely useful and It will definitely make my future projects run more smoothly.

As it stands currently my downloads are slowing creeping up by a few more each day, which can only be a good thing.

AdMob (Google’s Advertising Platform)

As I said last week I was disappointed with the AdMob Platform as the revenue per click was very low at $0.03 now I’m in the UK so with conversion that’s even lower, Also the fill rates weren’t all that great but they have slowly began to creep up once again. Now considering $0.03 a click I stuck with AdMob as this could add up over a number of clicks and especially because the primary goal was not to make money but to learn but…….. The days of the  3 cent click are long gone recently I have been getting more around the 1 and 2 cent mark i have yet to reach the dizzy heights of 3 cents again. This said I think tonight is the night that AdMob is turned off and I look to a new provider.

Leadbolt(App Wall)

the App Wall I implemented as part of menu has now been up for just over a week and in one conversion I earned 64 cents, A conversion in Leadbolt is when someone for example downloads an app listed on the app wall. I am really happy with Leadbolt so far I have heard a lot of bad things about them after my last post but I think If you are careful with how you implement you can see gains that overshadow AdMob

I would recommend Leadbolt on the basis that you are careful about how you show ads I don’t believe you should use the AirPush ads or App Icon features as they seem highly obtrusive to the users and I am positive this would result in terrible ratings on the Market even though you may be tempted as they will give you high gains but Is it worth it when users boycott your app because your that guy?

Of course this is easy for me to say as I don’t develop Apps for my living I am merely a hobby app developer outside my normal working hours and I do understand that it can be very difficult for developers to make serious money on the Android Market compared with iOS developers but I still think tact with ads will gain you much more respect.


I added Scoreloop to my app and It was very easy to integrate the main function I wanted was leaderboard’s this has proved a great addition and has added some competition to the app that was previously not there before. Check it out!

Next Steps

I have now got the decision on who to chose to implement my banner ads now I feel its time to leave AdMob. MobClix and MobFox get solid reviews and will look at them but I am very tempted to see what leadbolt offers in terms of banner ad’s I am just very reluctant that they may not filter the ad content and you get adult rated adverts but I will look further into this and will post if I see any improvement and may even do a comparison post. I have started a new project that hopefully I can shed some details on in the near future so the lessons being learnt with Killerballs will hopefully bode well for the new project.

My First week on Android Market

For those that have been reading this over the last few weeks I thought I would share my experience’s with finally publishing an app to the Android Market.

Here it is – Please give it a try

The app as you will have gathered from previous posts is a simple game the concept being it would be a good learning exercise. Once I completed the app I thought I would place it on the market and use it to see how the publishing side works, So here’s  what i’v found out after a week.

1. Its really hard to get noticed!

This is one thing I have found quite frustrating, albeit the app I made is no Cut the Rope or Angry Birds but I wanted people to download and play and critique, leaving your app on the market with no promotion will get you nowhere. I posted on reddit the community is great and 99.9% of the time give you great feedback  the other 0.01% someone mentions the app would be made better with the addition of a penis or boobs but the rest of the comments more than make up for this, from reddit I recieved great feedback and support and made few changes to my game but after reddit I found myself with no other form of promotion. I could have spammed forums and so on but I wasnt keen on this so for now I have gave up to concentrate on another project I am excited about, though I am still enhancing Killerballs. So if you want your app to be popular you have to push it out there.

Of course their is the Amazon Market and GetJar to explore this is an option I may look into in future I will post if I do!

2. Ad’s – Worth it ?

Now if you are like me you will have already seen the vast majority of blogs that post sensational earnings from the android market in a short period of time with no promotion and all that, now I am not saying they are lying and no so long ago I believe it was a lot easier to make money from ad’s but now it is much harder.

I signed up with admob, you get around $0.03 cents per click of an ad, for an app like mine which currently has low traffic and is likely to stay that way it is unlikely I will ever make any decent return on ad’s. The biggest lesson i made with the ad’s the first few days is I forgot all about the users network connection as I was on wifi while testing so ad’s loaded with super speed even the larger ad’s so I had them inbetween rounds on a time delay dialog. For the first few day my requests were in the 100’s but impressions very low, I quickly realised this was because I was trying to show large ads in a small space of time and they simply never had time to load. I fixed this in an update and seen a great difference as shown below.

Ad Table
The add table for first week

So seeing the poor return from Admob I decided to look at better alternatives and found Leadbolt, If you havent tried I strongly encourage people to take a look they Ads even come in HTML form so you dont need to integrate any SDK like with most providers. The provide a feature called  an AppWall which gives the user a list of top apps that they can download and of course you get compensated for this. Check it out here – LeadBolt – It is free and easy to sign up and you get a great service ! I will update as I use them more

3. Scoreloop

If you are making a game and need leaderboards,awards or anything else of that nature check scoreloop out I have just used them to integrate a highscore board but will be looking into them a lot more.


I have made a grand total of  $0.17 cents which is around 10 pence UK money so a long way before Im retiring

So far a slow week (5 days) for my app hopefully it can start to pick up as i update it and improve it after all it was a learning exercise and wasnt meant for public consumption so is far from perfect. I will also keep you updated on the latest Ad providers and how they treat me and Id love to hear your feedback.


Week 3 – App Published

It’s been a tricky few weeks but finally all the learning and extra hours outside of work have paid off. I have reached my 2012 goal of publishing a game to the Android Market Killerballs.

In my last post I was discussing what Ad Provider to choose but in the end I stuck with AdMob even though the ad revenue isnt great but Im still treating this as a learning experience as this is an unknown realm to me. My game is a demo version of the potential free version that might come around if the demo proves popular. Please have a look and tell me what you think.

It got increasingly harder and harder to finish the app and publish it , as the bug fixing and long arduous nights of trying to solve errors was taking its toll and as it was my first app I feared the feedback may be poor and knock my confidence. If I can give anyone advice I would say take the jump and publish your app otherwise all that work has been lost, even if you don’t get the best feedback Its all about learning and people will never usually just abuse you the criticism is usually nice and constructive.

Before I started this app If I had an idea I had no knowledge or way of planning how it will work, now after completing this small project and learning as I came across obstacles I am able to plan future projects and estimate the work required.

So my advice is get publishing those ideas that you pushed aside. Going to start work on planning my next application which I think will be much more popular as I am quite excited about it myself. Also will post a tutorial on Parcelable a part of SDK I found really helpful and probably do some analysis of AdMob and provide a review depending how it all works out.


Will keep posted, Thanks


Android Dev Diary – Killer Week 1

Since my last post I have  started work on my first Android game!! (exciting times). I hope that by setting this dev diary up I can track my progress and document my experiences for others to learn from.

So I already had much of the game logic sorted from a previous java project and just had to get the UI sorted. As a programmer I have limited skills with Photoshop and hadn’t anticipated the problems that would come from having to make my own graphics as good graphics can be all the difference.

My game is a strategy/luck game where you have to make a serious of decisions that ultimately end with the user winning a fake cash sum. I started with a very basic UI until the game logic was solid at first it looked pretty shady as shown at end of post

Once I had this and was happy with the play through I started to work on new graphics to spruce it up slightly.This was difficult and in future would consider getting someone with more experience but as this was my first dive into games and a side hobby I thought id try myself and version 2 and 3 can be seen below.

For new Android developers something that may pass you by but is extremely useful is Parcelable which allows you to pass data between Activity’s using native type such as Strings,ints and doubles. This allows you to keep data rolling between activitys and is much better than using serializable which if Java is your native language you may be tempted to, as this comes with serious performance issue. (I Intend to add a tutorial for Parcelable soon)

Now my game has decent not great graphics and has its basic structure complete my quest to improve user feedback and get some sounds has begun and its not fun 😦