Chupamobile Blog

The App Source Code Marketplace. Buy Apps. Sell Apps.

Tagged : Android


Android In-app Purchases: Part 3 – The Final Step

If you’re looking to increase your Android app monetization you might want to learn more about in-app purchases. In the previous articles I talked about the high-level aspects of the topic and the initial steps to the actual implementation using Eclipse with the Android SDK.

Today, I will guide you through the final steps to implement in-app purchases and give you some personal advice about it.

android-part-3Testing with Dummy Data

Our app currently has a lot of dummy or “static response” data provided by Google.  We should ensure the basic code we have created is working correctly before introducing our own SKUs, prices and other variables.  You cannot test In-app purchasing/billing using the emulator.  You will need to load your app onto an actual device that is running Android version 1.6 or higher.  The easiest way to do this is to connect your device to your PC via USB and right click your app in Eclipse and choose “Run As Android Application”. Then click the “Buy” button in your app.  If you see the following screen, you are on the right track.


Then click the “Buy” in the Google Play purchase dialog which should then create a screen similar to this:


Real Data

1.      Creating Your Own SKU

Once we have successfully tested our code using Google’s static response data, we can load our own SKU into the app.  Find the line in your code that says:
static final String ITEM_SKU = "android.test.purchased";

Change what is in the parentheses to the SKU you want for your own product.  The line of code for my app became:
static final String ITEM_SKU = " pro.template.pack ";

2.      Upload APK

Now package your code (full export with Keystore signature) and upload it to the Developer Console.  If this is the first time you have uploaded an app to Google Play, follow the steps in the Android app publishing tutorial, and then come back here. Be sure to “ALPHA TESTING” rather than “PRODUCTION”.

3.      List Products in Developer Console

The In-App Products page in Developer Console only appears if you have a Google Wallet merchant account and the application’s manifest includes the permission.  Once you have uploaded an APK with the correct permissions, you will have the option to list your product by clicking “Add new product“.


Once you click “Add new product” there are seven pieces of information you will need to enter.  The process is similar to setting up a paid app:

  1. Product Type – the first thing that will happen is that you will get a dialog box in which you designate the product as Managed, Unmanaged or Subscription
  2. Product ID – in the same dialog box, you will enter the Product ID. This is also referred to as your SKU.  It is not visible to your users, but it should be unique and descriptive.  The letters can only be lower case, but you can also include numbers, underlines and dots. Once you press Continue, you will enter the rest of your information.dan7
  3. Languages and Translations – this works the same as Languages and Translations for the app itself. You can localize by entering custom translations or selecting for Google to provide the translation of the title and description. The default is that In-app products inherit the app’s default language.
  4. Title – This will be visible to the user. You can include numbers and letters (upper and lower case.)  For optimal viewing by users, the title should be less than 25 characters, but it can be up to 55 characters long.
  5. Description – this is a required field and will be visible by users. Should be very descriptive.  Can be up to 80 characters long.
  6. Price – a default price in your home currency is required. You can also specify prices for other currencies as long as they are listed as one of the app’s target countries.  You can manually enter a price for a currency or allow Google Play to provide the conversion.
  7. Publishing State – this is at the top of the screen. The default is “ – Inactive”.  Click the button and choose Activate.  Once you do this, it will take a few hours to propagate across Google’s servers.

It will then take a few hours to propagate through the Google servers.  With your app itself Published in Alpha and the In-app product in Active status, you are now ready to test.

4.      Testing

Google does not allow us to make test purchases with the same Google ID (Gmail) as we use for the Developer Console.  You have two options:

  • Recruit testers – simply get Gmail addresses of willing friends, family and colleagues. They will need to enable USB Debugging on their device. USB Debugging enablement can vary by device, so do a Google search to learn how to guide your tester on this.  Help them help you.
  • Create your own alternate Google IDs – you can create alternate Gmail accounts to test on your own device. When you do this, you will need to go into Settings on your device and enter this account under Users, then log into the device with it.  This can be a little tricky, and you might need to Google how to accomplish this with your particular device.

Once you have some Google IDs for testing, click on Settings for your app in the Developer Console and scroll to the “LICENSE TESTING” section.  There, you can enter up to 400 accounts for testing, then press Save at the top of the screen.  You and your testers can now make as many test purchases as needed without fear of incurring actual charges.  If you skip this step, charges will be incurred as I learned when I received a PayPal email “You have authorized a payment to Google”.


To test In-app purchases, you cannot simply run the app from Eclipse while your device is connected as in the earlier test phase.  Now you will need to export the app (including signing it with your Keystore) and copy the APK to the test devices.  Make sure all previous versions of the app are uninstalled, then install the new APK and test away.


Once your testing is complete, you will need to upload the latest version of your APK to the Developer Console and push to “PRODUCTION”.

Final Thoughts

This article follows a “happy path” meaning everything goes well.  But in reality, things did not go perfectly for me, and they probably will not for you.  Implementing In-app purchases is a multi-step process that is more complex than I had anticipated. There are fewer online resources for learning than I would have expected for such an important topic.  In fact, while creating this tutorial, I had to enlist a professional developer (found through Fiverr) to untangle the mess I had created.

Do not let the complexity hold you back.  Read the documentation that Google provides at  Follow this and other tutorials.  Google any errors you encounter in your code.  Enlist professional help if needed as I did.  Be patient but persistent.  Do move forward with your app the way you feel it should go. Good luck.  And always, please use the comments section below to share your experiences.


Build Your First Android App – Step 4: Functionality

So, wannabe developers, have you practiced step 1 to step 3 during the last couple of weeks? We hope so, today, we’ll make your app come to life by letting it move its first steps. Keep reading and enjoy the tutorial!


In order to make our little app actually do something, we need to go into the Java code. In the left-most pane (Package Explorer), open which is in the com.example.calcup package in the src folder.  Open the Java file (double click for Windows users) and it will display in the main pain.  You will see only the code – there is no graphical interface for the Java.

develop android app

Parts of the Default Java File

; {} Are Not Emoticons

One of the first things I want you to notice is that most of the lines end with either a semicolon or open bracket.  A semicolon tells Android that that is the end of that line of code.  An open bracket tells android that the line of code is continued below.  Often there are several lines that follow, and then eventually you will see a closed bracket.  Make sure there is always a 1:1 relationship between open brackets and closed brackets.

package com.example.calcup;

This simply states which package this file belongs to.  When creating an app from scratch, this is no big deal, but sometimes when you import a project or copy code from another source, this can be mismatched and Android will give you errors.  Common mistake, easy fix.


A lot of what makes your app work is not actually in your Java or XML.  A lot of code has already been created which you can leverage.  That is sort of what imports do, they tell Android what other functions your code needs to call.  As you attempt to do certain things, you will be prompted to create imports.


When our project was created, it started with three sections that began with @Override.  The first and most important one (the one that says onCreate in the second line of the section) tells Android what to do when this code is run, including the fact that the XML file you just edited is responsible for the layout for this code.

public class MainActivity extends Activity {@Overrideprotected void onCreate(Bundle savedInstanceState) {super.onCreate(savedInstanceState);setContentView(R.layout.activity_main);


Delete the other two @Override sections to simplify the code since they are not needed.  Be sure to delete all the way down to the close bracket for the second @Override.  For my file this meant delete rows 16 thru 33.  See image below.

develop android app

Adding to Our Java File

Now we are going to create the unique logic for our app.  The first thing we want to do is to tell the Java to pay attention to the number which the user enters for ounces.  In the XML, we had kept the default name of editText1.  Put your cursor at the end of the line that says setContentView… and press return a couple of times, then type:

EditText editTextOunces = (EditText) findViewById(;

Let’s dissect that statement just a tad.  The left side is telling Android, that we have this text field (number) that we are going to need to pay attention to.  The right side of the equal sign is telling Android where to get that data.

Eclipse will perform auto completes for you if you press Control Space (in Windows).  It will give you options to choose from.  Single clicking will give you a dialog box with a little more info, sometimes even leading to a URL with more info.  Double click on the option you want.  See image below.

develop android app

Once you have typed your line of code, you will see a little red icon with an X, so you know something is not completely right.  Hover over the first part of your statement and Eclipse will kindly give you some options for resolving the error.  In this case, Android is saying it does not know what to do with EditText.  So we need to “import” the EditText information that Android needs.


Once you select Import, look at the top part of your code where the Import statements are and you should see something like:

import android.widget.EditText;

If you only see one Import statement, click the little plus button to the left of it to see the other Imports.  The error icon that had stressed us out is now gone.  Congratulations – you just created your first line of Android code!

Cup EditText

Now we need to do a similar thing for the cups EditText.  The easiest way to do that is to: copy the line of text you just created; put the cursor at the end of that line of text; press Enter twice then paste.  Once you’ve pasted, change the word Ounce to Cup and change the number 1 to a number 2 so that your new line of text reads as follows:

EditText editTextCups = (EditText) findViewById(;

The Button

Next we need to wire up the button.  Enter the following line of text a couple of rows below the last line of code you created:

Button button = (Button) findViewById(;

You’ll notice that the structure of this line of text is exactly the same as the EditTexts.  You’ll also see that you created another error.  Resolve this error by importing the needed info (or widget) the same way you did for the EditText.

The calculation

Now we really get to the heart of the matter.  We are going to tell Android to listen for a touch (a click) of the button.

Type the following line a couple of rows below the last line of code you created:

button.setOnClickListener(new OnClick)

Now, with your cursor blinking between the K and ), press Control Space and select the only option that appears in the dialog box.  This will create a few lines of code on your behalf.  This is great, but we need to clean it up a little by doing the following:

  • Get rid of the error by clicking on “OnClickListener” toward the end of your line of code and selecting Import ‘OnClickListener’ (android.view.View).
  • Add a semicolon to the end of the last line which is comprised of a close bracket and a close parenthesis.
  • One of the lines that was created starts with two slashes. Any line in Java that begins that way is a comment which will not be read by Android.  Remove that line and in its place, type the following:
double ounces = Double.valueOf(editTextOunces.getText().toString());
  • Once again, you will notice that our code caused an error. No worries, just click on “editTextOunces” and select the only option presented.
  • The line of code you just created converted your user-input text (EditTextOunces) into a numeric data type in preparation for performing calculations on it. Now we need to actually perform that calculation by typing the following line of code a couple of rows below the last one:
double cups = ounces / 8;
  • Now that we have performed the calculation, we need to display the answer to our user. Type the following code a couple of rows below the last line you created:
  • This gives us an error because editTextCups is not final, so click on the first word in your new line of text and select the option to make it final to get rid of the error.

That’s it!  Here is my Java in case you still have errors that you cannot resolve and you want to move forward with exploring other aspects of the app.  Just replace your code with mine.

package com.example.calcup;import;import android.os.Bundle;import android.view.Menu;import android.view.MenuItem;

import android.view.View;

import android.view.View.OnClickListener;

import android.widget.Button;

import android.widget.EditText;


public class MainActivity extends Activity {



protected void onCreate(Bundle savedInstanceState) {




final EditText editTextOunces = (EditText) findViewById(;


final EditText editTextCups = (EditText) findViewById(;


Button button = (Button) findViewById(;


button.setOnClickListener(new OnClickListener() {



public void onClick(View v) {

double ounces = Double.valueOf(editTextOunces.getText().toString());


double cups = ounces / 8;











That’s all for today! We hope you enjoyed the post and don’t forget to practice, practice, practice and let us know how it goes!


ASO For iOS Or Android: Where Should You Start From?

The chicken and the egg dilemma

Before you disregard this post because you don’t have an app in the 2 platforms, read carefully my little grasshopper, because if you find out what came first: the chicken or the egg… I bet you can cook the most delicious app omelette.


Now that I have your attention let’s move on to understanding why it’s important to consider on which platform you should do ASO for first.

Before we start with the considerations we need to refresh our understanding of the differences between the two app stores regarding how their algorithms work.

I’m not going to write a whole blueprint about the indexing and ranking differences between Apple App Store and Google Play (I already wrote a book about that), but to make things easier to understand let’s just highlight that Google Play works on keywords inside the description of the app page whereas Apple just considers title and keywords in the meta section.

So Apple will look at your keywords in the meta section of iTunes connect and with those keywords, you can rank for a series of potential combinations.

In the case of Google Play the ranking is more complex, the keywords are “part of the content” and therefore there are a series of factors that make a difference in the ranking.

  • Keyword density
  • Context of the keyword vs. the content
  • Content length

The purpose of this post is not to explore in depth Google Play but to understand why you may want to consider starting your ASO process with Google Play vs. Apple.

The first point to understand is that ASO tools suck at providing data for Google Play.  And although “suck” may be a hard word to describe the accuracy of ASO tools, it seems nobody out there is willing to point the finger to this huge hole that ASO tools fail to patch.

The reason why ASO tools are not brave enough to dive into the Google arena is because they can’t really tell us anything “amazing” “or “extremely unique” about Google Play that we can’t witness ourselves.

You see under Apple, ASO tools tend to tell us amazing data that in one way or another we can’t prove.

Can you prove how popular one keyword is in the Apple App Store?

No, you can’t.

Therefore the relationship developers and ASO tools have regarding the data they obtain about Apple is a bit like the relationship you have with your physiologist.  You want to trust your physiologist, but deep inside there is no clear way to know if you are more, or less, crazy than before. (Trust me: I’m an expert)

Google is so honest that doing ASO is a pleasure, but at the same time makes it pretty confusing initially. Google give us everything we need.

The number of competitors is limited: Therefore the crappy competitors are weeded out during the initial filtering process

We can see the number of downloads of the top positions: therefore we can really understand if a keyword delivers downloads or not. If you believe a keyword is “the next wonder thing” and you see that the top position in Google Play has from 50 to 100 downloads after 6 months… it’s time to think again champ.

Also the most obvious factor with Google Play is that keywords are right there in front of you, voila… no need of mega amazing keyword spy systems! You have the keywords right there in the content, your only requirement is some brain cells, and try to find what keywords they are targeting in the content: easy.

So why start with Google Play.

First, if you are going to do the whole research without ASO tools initially (that I highly recommend) it’s important to understand that when we use the App Store itself to navigate, ideas seem to flow easily. No UI (user interface) of any ASO tool is going to highlight anomalies or unusual results as easily as you can identify them using the App Store.

The second part is that you can use Google Play flawlessly from your browser, making it easy to move from app to app and gather data.

The auto suggest of Google Play will provide you with the first batch of potential keywords you can start using to build your spreadsheet of potential long tail keywords and in a very fast an efficient way you can test how popular the apps ranking in top position are.

Trust Google before an ASO tool

If the ASO tool has things right, a popular keyword on Google play should be popular on iOS.

And the reason is not a technical one…. It’s a human one.

App Store Optimization is more about humans, about emotion, about our weird behaviors like when we are looking for something in the app store at 2 am in the morning, or when our kids are screaming at the airport: “I want the iPad!!!!”

The typical search in the App Store is quick, emotional and is never analytical; it flows fast and keeps the same constant variables.

Those variables are our human needs; our curiosity as humans, as users, as gamers, therefore the human behavior doesn’t change 100% from one store to another.

You may think that my statement is a fallacy… but you see, I just said good bye to my iPhone and switch to Samsung… and funny wise, my search patterns are still the same!

A device doesn’t change the way our search behavior is shaped … therefore it’s important for us to find those patterns when we start our ASO process.

So then what? Where do we start?

Well, my suggestion is to always start any market research, any ASO research directly in Google Play. And before you scream: “But hey Gab! I don’t have apps in Google Play!!!!! What is the point of going to Google Play when I only want to work with Apple”, let me ask you a question: Who cares?

Really – let’s think about this for 2 seconds.

Who cares that you use a different app store to find ideas to another app store that potentially has the same type of users same demographics, same behavior, same age, same irrational patterns.

Google Play is an oracle of information, an oracle full of opportunities ready to let you browse its pages and spy its competitors. Google Play lets you analyze categories, provides you all the data you need… and the best part… oh the best part… this awesome tool for market research is in fact FREE.

You can use it before launching the ASO tool, or before wondering how much traffic a keyword really has in Apple.

Instead of wondering about the mysteries of Apple, let’s embrace the openness Google provides. Be your own human scrapper, gather data, do your own keyword CSI and take ASO from the Google Play horns.

Good luck matador! ;)

If you enjoyed this post from Gabriel and would like to read more from him here are two more articles:

ASO For Reskinners – Easier Than You Think

Understanding ASO As A Powerful Market Research Process In 5 Steps


Build Your First Android App – Step 3: User Interface

We are back with the third step of a very interesting tutorial. If you haven’t read it already, here are the step 1 and two on how to build your Android app. Without much more talking, let’s get into it!


Step 3: The Look (User Interface)

For this app, we simply want to enter the number of ounces and let the app calculate the number of cups.  Recall that we define the appearance of a screen by modifying the XML file found in res | layout, so navigate to that folder in the pane on the right and open activity_main.xml.  In Windows, you can do this by double clicking on the file, which will open it in a tab in the large pane to the right.

build android app

Once the file is open, simply:

  1. Click on the little tab that says xml near the center of your screen (not at the top), to see the XML instead of the graphical view.
  2. Find the line that says android:text=”@string/hello_world” />. That line tells Android to display the value of the string “hello_world”.  We are going to change that.  We could go into the xml file in the values folder to edit it, but for demonstration purposes, we are just going to change the XML so that instead of looking at the string, it looks at static text.  To do this, select everything within the quotes and replace it with “Enter number of ounces” so the line will now read android:text=” Enter number of ounces” />.  You may see (and ignore) the warning about hardcoding strings.
  3. Click on the Graphical Layout tab beside the tab clicked in step 1 and notice that our text is now displayed instead of “Hello World”
  4. Click the button that says Text Fields. Eclipse will now provide you several options scroll until you see one that says 42.  You can hover over it to confirm this is the option for Number Fields.
  5. Click on the 42 and drag it to the center of your activity a little bit below where your text is located. I wanted mine centered so when the vertical dotted line appeared, I released. When you do this, note that Eclipse tells you how it is defining the position you select.  For example, in the screenshot below it says “below: textView1 centerHorizontal: true”.

build android app

  1. Now let’s put some more text on the screen by clicking on the Form Widgets folder, then dragging the word “Large” onto the screen a little below our last element. (See screenshot below for guidance on this step and the next two.)
  2. The element we just dragged onto the screen is called a TextView, and it defaults to have the text “Large Text”. We want to change that.  Changing the properties of any element you put on your screen is easy with the Outline feature.  If the Outline feature is not showing on the far right of your screen, you may see the word “Structure” written vertically or an icon that has a couple of little boxes with some vertical lines.  Click on either of those, OR from the drop down menu at the top, click Window, then select Reset Perspective.  You can play with all of these view options and (probably) not do any irreversible damage.
  3. Once you see the Outline on the far right, select textView2 and change the entry in the Text field below from “Large text” to read “Ounces is equal to”. The default width and height will be “wrap_content” which means the field will expand or contract to match the size of the contents.  Feel free to edit any of these settings to see how they work.

build android app

  1. Now we want another number field where the number of cups will be displayed. As in step 4, click the button that says Text Fields, then scroll until you see one that says 42.  Click on the 42 and drag and drop it on the center of your activity a little bit below your text “is equal to”.
  2. Now let’s put a label on the screen to make it clear that the numbers in the field we just created is the number of cups. Click on the Form Widgets folder again, then drag the word “Large” onto the screen a little below our last element then change the text to “Cups”.
  3. The final element on our screen will be a button that the user will press to tell the app to convert ounces to cups. Buttons are found under Form Widgets.  As with other elements, just drag and drop the button a little below your last element then change the text to read “Convert”.

At this point the screen you created should look similar to the one in the image below.  It is fine if yours looks a little different. However, do ensure that the elements listed in your Outline matches mine and be sure to save your work.

dan 4

This is a great time for you to move things around and change parameters using the Outline/Properties window and by editing the XML directly in the editor view.  You can make this little app look nicer, but the real goal is to get comfortable making simple user interface changes to Android apps.

Below is my activity_main.XML in its entirety.  If you encounter issues that you cannot resolve, simply remove your XML and paste this into your file.

<RelativeLayout xmlns:android=""








tools:context="com.example.calcup.MainActivity" >





android:text="Enter number of ounces" />









android:inputType="number" >

<requestFocus />









android:text="Ounces is equal to"

android:textAppearance="?android:attr/textAppearanceLarge" />









android:inputType="number" />









android:textAppearance="?android:attr/textAppearanceLarge" />








android:text="Convert" />


That’s it for today. Stay tuned for the next step as we are going to “wire up” what we have done to make it functional by editing the Java file.

Did you like this post? Like it! :)

Got something to say? Comment! :D

Think someone else should see it? Share it! ;)


Build Your First Android App In 7 Easy Steps 

Have you been buying iOS codes here at Chupamobile and are thinking about giving Android a try? In a lot of ways, creating an Android app is easier and faster than iOS.  This article is designed to give you just enough of a foundation that you feel comfortable giving Android a try.

how to build-android-appWe are going to create a very basic app in 7 easy steps:

  • Step 1: Create a New Android Project
  • Step 2: Getting Oriented to an Android Project
  • Step 3: The Look (User Interface)
  • Step 4: Functionality (Java)
  • Step 5: Test on a Virtual Device
  • Step 6: Test on a Real Device
  • Step 7: Bug Fixing

In our previous post, we walked through how to install the software you need for Android development – Eclipse, Android Software Development Kit and Android Developer Tools.  This article assumes you have installed these tools, but have not really done much with them.

Let’s get started.

Step 1: Create a New Android Project

For our little app, let’s create something that is useful for forgetful people like me.  There are lots of formulas in life that I need help remembering – ounces in a cup, exchange rates, Celsius to Fahrenheit, megabytes to terabytes, and interest calculations are just a few.  Except for the exchange rate calculation, all of these formulas remain constant, e.g., yesterday there were 8 fluid ounces in a cup, and that is the case today and will be tomorrow.

Admittedly, if my country (U.S.) would just move to the metric system, a lot of these problems would go away for me.  But this is not a political blog, and it really is not a big problem in my life anyway so let’s just pick the ounces to cups calculation for our little app.  The great thing about it is that an 8:1 ratio is basic enough that we can easily verify if the calculations are working correctly.

Maybe I could use a little app that I could just plug numbers into.  Let’s call it Cup Calculator, or just CalCup.  Creating a new project in Eclipse is easy.  The six steps below could be completed in just a few seconds, but I recommend you go a little slower to read all of the screens to improve your understanding.

  1. Open Eclipse
  2. In the menu at the top (far left) select File, then New, then Android Application Project

build android app

  1. Type “CalCup” (without the quotes) for Application Name. This will auto-populate Project Name and Package Name.  There are several other drop-down lists that will be preselected for you.  For this little exercise, leave everything as is. These things are really important, but beyond the scope of this little exercise.
  2. Click Next

build android app

  1. Click Next on the next three screens – Configure Project, Configure Icon and Create Activity. (For a production app, if you already had your icon graphics, you might put them into the project through this process. But it is easy to do after the initial set-up.)
  2. Click Finish on the Blank Activity Screen.

Congratulations.  You have just created your first (?) Android project.  In a moment we will make something out of it, but first I want to help you understand what you are looking at.

Step 2: Getting Oriented to an Android Project

Once you have created your project, you will see a listing of folders and files in the pane on the left and the contents of two files opened in the main central pane.  The four highlight items in the image below will be modified by you to varying degrees on almost every Android project. Let’s review them one by one.

make android app

The src folder is where the Java for Android projects is held. is a file buried in the src folder.  Typically for each screen that an app will have, there will be one Java file.   Ours is called simply because we kept the default, but can be different.  And for most production apps, there will be multiple Java files.  We will explore this file in depth later in this article.


The res folder contains a lot of important resources including strings, images, and layouts.  Images, including your icon (or launcher) go in the drawable folders.  There are several different drawable folders.  The hdpi, ldpi, mdpi, etc. refers to the resolution of the screen of the user’s device.  You might have the same image in each of these folder with different resolutions.  Acceptable image file types are .png, .jpg and .gif.

Two quick tips for avoiding frustrating issues with the res folder are:

  • Never save a file in the root res folder unless you would like to learn more about compile errors the hard way.
  • Only use lower case letters for drawable file names – no capitals, numbers or special characters. I did this once and trying to figure it out almost drove me mad because it caused errors all over the place, except in the drawables folder.


Typically for each Android app screen, you will have one Java file and one XML layout file.  The XML is located in the Layout folder.  When you open this file, you can edit it using a graphical layout interface or edit the XML directly.  After initially setting up an activity with the graphical layout interface, I make about half my edits using the editor.  We will spend time in both later in this article.


The manifest is a short but powerful file. It tells the Android system crucial information about your app such as your minimum and target versions of Android, what screens, or activities, exist within your app and what permissions your app will need.  You will not spend a lot of time in this file, but you will need to add a few lines to it when you are creating new activities and integrating certain ad platforms.

Three Disclaimers/Explanations

This article was written to get people up to speed quickly on some Android basics.  If design or coding best practices are violated, I apologize.  Courteous comments and corrections are welcomed.

I use the terms activity and screen interchangeably even if there is some difference, it is immaterial for our purpose.  At a later time we should explore the differences and also introduce fragments, but for now, think of an activity as a screen.  And think of your XML (e.g., activity_main.xml) as how you define the look of a screen and your Java (e.g., as what your screen does.

As you work through this project, your experience may differ from mine.  If something odd happens or if you get an error, do what we do in normal life – just Google it.  Very often one of the first results of your search will be a phenomenal resource called

So? We hope you were able to learn something today, and if you did don’t forget to share your experience with us!

Stay tuned for our upcoming post to to learn about the next steps!

UPDATE 11/18/2014: Find Step 3 Here .


Lollipop Review: A Developer’s Guide

Lollipop is here!  Finally! What is Lollipop? It is a new version of Android and it’s big. Sure, the new iPhones and iOS have grabbed a lot of hearts and headlines over the last couple of months, but Lollipop is the most important Android upgrade in about three years.  There are changes galore in Android’s appearance and functionality.

lollipop review developer

This article will explore some of the key changes you might want to know about and provide you some ideas on what you as a developer-reskinner-marketer-publisher type might want to do to take advantage of Lollipop.

What Is Lollipop

Also known as Android 5 or Android L, Lollipop is the successor of Kit Kat. It is available from November 3rd and will be on a couple of Nexus devices in November. Other devices will get the update over time depending upon the make, the model and the carrier. Not all phone makers have announced timetables for upgrades – most notable is Samsung. But for our purposes a preview version is available now, so let’s explore some of the features and discuss what developers might consider and do.

Lollipop looks better and works better than previous versions. There are cosmetic changes as well as functional changes and Google has said over 5,000 new APIs will be made available for developers. Key changes include…


When I moved from an iPhone to Android, one of my biggest frustrations had to do with power consumption. Google has addressed that with Lolllipop in the form of Project Volta. Volta seeks to conserve power and give device owners greater control. You can see battery percentage and more detail on what apps or processes are consuming your battery power. You can set your device to battery saver mode manually or set it to turn on at a certain percentage of battery remaining. The battery saver mode will turn off certain Android animations, slow the CPU, lower the refresh rate and make tweaks to app synchronizations.

Lock screen & Notifications

Google has made several changes to the lock screen including changes to how the phone wakes and notifications. You can now wake the phone by saying “Ok Google,” double-clicking the screen or connecting to Bluetooth.Once your phone is awake, you can swipe right to use it as a phone, left to go to camera or down to go to quick settings. Notifications now show right on the lock screen and you can swipe them right to dismiss or down to read more. You can assign apps’ notifications a priority level which has an effect similar to do not disturb. And you can set notifications to be redacted so you are notified, but the actual contents, say of an email, remain private.

The Design

One of the most important changes with Lollipop is what Google calls Material Design. This is more than a basic facelift to Android’s user interface. It replaces Holo as the the standard theme for Android, and will be incorporated into other Google properties such as Google Now, Gmail, Google Docs, Google Drive, Chrome and others. Key aspects of Material Design include:

  • Material theme – textures and edges are intended to give a sense of “tactile reality”.
  • 3D views with shadows – Elevation property for each element on the screen are designed to give a sense of depth and layers.
  • Movement – new animation capabilities are intended to contribute to the sense of depth and reality, or as Google calls it, “authentic motion.” For example touching certain icons initiates animation that makes the new element grow from the element that was touched. Another example includes a rippling effect when a touch event occurs, similar to water.
  • Color – Google has provided specific recommendations on color use in apps, including how to choose the main and accent colors for your apps.

 A Few More Changes

Something that power users (like Chupamobile blog readers!) will probably appreciate is a Tap & Go function that imports account info from an old device to a new device by holding the two devices together.

Google has also created a feature called Guest Mode to allow you to share your device with others without granting access to all apps. You can also pin apps so that only one app is accessible, so your kids can play their favorite game, without reading your email or inadvertently posting gibberish to Facebook.

Quick Settings are a little different now, too. There are changes to how to access settings and the settings screen has been improved. And the screen that shows your running apps is similar to the mobile Chrome browser yet more 3D as if the tabs were on an axis or, for my generation, a Rolodex.

Google also included an Easter Egg of sorts. By rapidly clicking on Android Version in Settings, you can open a screen with a lollipop. Clicking the lollipop changes its color; long pressing it opens a flappy birds like game with the little green robot navigating through giant lollipops.This does not seem like a big deal to me, but so many other reviewers were ecstatic about it that I thought I better share it with the Chupamobile community.

Android Runtime (ART) is now required instead of Dalvik. ART had been available in Kit Kat, but was optional. For more information, see this previous Chupamobile Blog post.

Last but not least, Google has said thousands of additional APIs will be made available. A lot of the APIs are related to TV, wearables and cars. Other API changes include advanced camera capabilities, audio and media, storage, as well as APIs to support the enhancements described above. Once the APIs are available for general use, a follow-up article will discuss some of the more pertinent ones in more depth.

Three Actions Can You Take Now

1.      Design

Learn more about Material Design and begin directing your apps to follow the new standards. Google has provided a handy Material Design checklist for this purpose.

2.      Evaluate User Base

As exciting as Lollipop may be to some, it will take a while for the world to move to it. Google recommends you change the Target SDK to 21 for your new apps. After testing, that may be fine but you should leave the Minimum SDK to something lower if you want to capture the majority of the market. For example, the image below shows the breakdown of Android versions for my app Certificate Maker! As you can see, only about 27% of users are even on 4.4, the previous version of Android.

android total installs by user

3.      Update your SDK

Use the SDK Manager to download the Android 5.0 SDK Platform and System Images.

android sdk platformYou can also begin testing your apps on a real device by flashing a Nexus 5 or Nexus 7 with the Android Preview System Image or installing the Lollipop emulator.

There are many other aspects to Lollipop for you to consider for your apps. As these features are tested in the real world, we will share more information at Chupamobile blog.


Best Apps Of The Week- Last Week Of October

Have you ever thought about developing an app but didn’t have the skills to do it? Don’t worry, there’s an easier way, app templates! The process of reskinning an app is much easier, it saves you time and also a lot of money. Today we will show you our 6 best app templates of the week from which you can take inspiration. Let’s get started.

iOS Apps

Stickman Javelin Master

jevelin masters app

Just like the famous homonymous game that has been steadily climbing the charts from over a week. Each day the player can achieve a higher total score and unlock more items. Unlike other games that quickly fall off the charts, this game has staying power! Lots of reskin possibilities with this one.

Photo Collage Editor


photo collage editor

With this app you can apply filters, stickers and doodles to your photos and share it on Instagram, Facebook or Twitter. Photos in Collages fit perfectly and does not stretch, giving it a high quality look.

Texas Hold’em Poker Pro

ios texas poker


Poker Pro is Texas Hold’em Poker mobile SOCIAL Multiplayer Game inspired by one of the Number#1 Top Grossing Casino Poker Game on App Store. This app has a high eCPM and many monetization ways. “Cheat card”, “mystery chip” and messaging service in-app purchases; login via Facebook, Twitter, or a dedicated account. Guest login and live chat are also available.

Android Apps

Crazy Taxi Driver

crazy taxi driver

This is a simple game in which the player controls a taxi on a three-lane highway and should tap the sides of the screen to move the taxi on the wanted direction. It features easy to reskin graphics and easy AdMobintegration including banners and interstitials so that you can start earning money right away.

Defender Style Game

defender style game

This game is a mode of survival. Defend yourself against the monsters, shooting with a bow. Nine ad networks included (Chartboost, AdMob, AdColony and more). Facebook share and rate buttons provided!

Finger Press Mood

finger press mood detector

Fingerprint Mood Detector is a prank application for entertainment purpose. Press your finger and hold for some time. After that, application will tell you in which mood you are right now.

We hope you enjoyed this week’s app and we wish you all a Happy Halloween!


Android Runtime-ART vs Dalvik

While ART was experimentally launched with KitKat 4.4, Google has made it clear that ART will be replacing Dalvik as the Android Runtime for all apps. Currently, users do have the ability to switch back and forth between the two. Fortunately, ART has a faster runtime than Dalvik, as well as better performance.

runtime vs dalvik

Installation and Performance

Apps being installed on devices with ART runtime do initially take a bit longer to install. The reason being that the AOT compiler must first translate the information (DEX bytecode) into machine code during the installation, which causes the longer install time. However, since the DEX bytecode was translated during installation, it does not need to be translated again each time the app is run. This makes the app run faster overall on ART than it does on Dalvik. The performance time itself makes up for the longer installation time, as installation occurs only once.

Battery life and Storage space

Because the ART runtime uses AOT compilation (Ahead of Time), the CPU of the unit is free from translating DEX bytecode into machine code while the app is running, which leads to much less energy consumption and a longer battery life. The time between recharges can last substantially longer on ART than Dalvik, depending upon the apps used. When it comes to storage, however, apps on ART require a bigger footprint than on Dalvik. This is because the machine code that was translated by the AOT compiler is stored in the device’s storage.

 Benefits for Developers

ART runtime comes with many benefits for developers. By translating the DEX bytecode during installation, it allows for all apps to be run faster. ART also has improved bug fix issues for developers as well. ART has support for dedicated sampling profiles within the apps. These profiles give an accurate view of the execution of the app, without any of the slow down that those using Traceview have experienced. ART has also improved garbage collection, such as allowing for one pause instead of the normal two, and will allow for a collector with a lower pause time. That will be for special cases of cleaning up the short-lived objects within the app. While ART currently doesn’t use compacting garbage collecting, the feature is under development in the android open source project, and will be made available once it is complete, making GC even easier. On top of these benefits, ART is also providing the app native crash reports in both Java and native stack information form, which allows for improved context information.

While there are some drawbacks to Google’s ART runtime (such as the longer app install time and the higher storage space), overall this update is better for developers and users alike than its Dalvik counterpart. ART allows for apps to run faster, and since it has the AOT compilation, also allows for a longer battery life for the device. The benefits to developers in terms of garbage collection and debugging improvements, really outweigh the drawbacks mentioned earlier.

Did you like it? Like it! Have something to say? Comment below! Want someone else to see it? Share it!


It’s Official! Android 5.0 Is Called Lollipop

We’ve been referring to it as Android L, the new version of the Google Operative system has officially been revealed. After months of speculation of which sweet-themed name it would chose, they opted for Lollipop. Sounds familiar? To us it does ;)

android lollipop

Google calls it “the largest, most ambitious” Android OS ever released yet. The most obvious change is its design language, ‘Material Design’ which is supposed to create seamless user experience across multiple devices that run Android, including wearables. The ‘Material Design’ has a flatter look with bolder colors and fonts and over. According to Google the new operative system runtime, ART, which is replacing DALVIK, will be much more responsive and intuitive.

What’s new on Android Lollipop?

The new sleek and colorful system will also bring new setting adjustments like notifications and security features. Users will be able to hide unwanted updates and prioritize their notifications allowing only their preferred notifications to get through.  Lollipop will support a kill switch that will keep thieves from stealing your device by turning on encryption by default.

According to Google if your device is on battery saver mode, the life of your battery will last up to 90 minutes more. For all those people that charge their phone multiple times a day this is a win. Additionally you’ll be able to see how much time you’ve left of your charge and how long it will take to charge it to 100%.

Multiple profiles will now be available on smartphones. So if you’re kid keeps playing with it and tweeting randomly to your friends and colleagues you no longer have to worry about that.

Google just released the new Nexus 6, which will obviously run Lollipop. The new OS system will be available to the Nexus owners starting from November. As usual with other Android devices, it’s up to your manufacturer to get the update ready.


4 Steps To Learn Android Mobile Development

Are you thinking about buying some Android code but have never worked with Android before?

As with iOS, a lot of people buy code at Chupamobile and outsource everything – graphics, sounds, development, etc.  That’s great as it allows you to work ON your business instead of IN your business and will probably allow you to scale faster.

But Android is fairly easy to develop for, so that with a small investment of time you can master the basics and quickly take much greater control of your reskins.



When I first started investigating Android programming, I was flustered by so many books and websites telling me I should have a foundation of Java.  I just wanted to get things going.  I eventually learned just enough to cobble together my first app, then to reskin it several times.  That is sort of my goal with this series – teach you just enough Java, XML and other aspects of Android so that you feel comfortable making (or attempting to make) a few basic modifications as well as:

  • Import images from your graphic artists into the project
  • Integrate ad networks
  • Identify trouble areas in your code
  • Make your conversations with developers more efficient and effective
  • Package up your reskin for submission to the app stores
  • And much more.

If you screw up, it does not matter as long as you have your code saved somewhere.  And if you get in over your head, there are lots of developers that can unravel things for you quickly and cheaply.  So let’s go.

Here is our plan, starting with this article and continuing over the next several weeks:

  • Download the software for Android development – Eclipse and the Android Software Development Kit (Android SKD or sometimes ADK)
  • Configure Eclipse (update it to meet your needs and set up a virtual device)
  • Create a very basic app – getting exposure to Java, XML, Android file structure, and some of the key files
  • Import an app into your workspace and address some of the most common problems
  • Explore how to set up some of the most popular ad networks – AppLovin, RevMob and AdMob
  • Set up a Google Developer Account – for app submission and management

Lets’ get started.

Download Eclipse with the Android SDK

Most Android development work is performed in a program called Eclipse.  It is completely free and works with Windows, Linux and Macintosh.  Eclipse is used for a lot of different types of development.  You will also need something called the Android Software Development Kit.  It too is free.  Both are now bundled in one easy download.  To ensure you get the proper version go to the following website –

When I go to this site, there is a big blue button for Windows users.  If you have a Mac or Linux system, click “VIEW ALL DOWNLOADS AND SIZES”.  Perform the download, unzip the files and open the Eclipse application.  You should see a screen similar to the one pictured below.

how to develop android app

Orienting you to Eclipse

When you look at Eclipse, it looks pretty innocuous – with some standard-looking drop-down menus and icons across the top.  The majority of the view is taken up by 3 major panes:

  1. The tall pane on the left is where you will soon see your directory structure for your apps and the folders and files within them.
  2. The pane that takes up most of the window is where you will see the code from a file you have opened. You can even open multiple files (of varying types) and it will show them in a tabbed view similar to a browser.
  3. The lower pane on the right has a lot of functionality that you should hope you never need. When things are going well, you usually do not need this pane.  But when things are going badly, it is invaluable.

Updates – SDK & ADT

Software Development Kit

It seems there are always updates to the Android SDK files.  You should perform this update now before going any further.  Click the icon at the top that shows a little green robot on top of a download arrow to open the Android SDK Manager.

how to develop app android

The little window that opens will list several options with checkboxes so you can select the ones you want to download.  Don’t feel obligated to download everything.  Many items will already be checked – I would keep those.  Then, scan through the Tools (top of the list) and Extras (at the bottom of the list) and select any that seem applicable to what you want to accomplish.  You will see several sections with labels such as Android 4.2.2 (API 17).  Depending on what you need to accomplish, you probably do not need anything 3.x or lower.  You can always come back here and download other packages if it turns out you need something that you did not download at this point.

Once you have selected all the options you feel you need, press the Install x packages… button.  Depending on how many packages you selected and your Internet speed, this could take a long time to download.  You should be able to proceed with the steps below while the download process continues in the background.

Android Development Tools

The last step in preparing your environment is to install something called the Android Development Tools (ADT.)  I’ll spare you the lengthy explanation; just trust me – you need it.  Follow these simple instructions:

  • Click Help in the menu at the top then choose Install New Software…
  • Click Add in the window that opens, which in turn opens yet another, smaller window
  • Type “ADT Plugin” (without the quotes) for the Name
  • Copy and paste the following URL for the Location
  • Press OK, which takes you back to the previous window
  • You should now see “Developer Tools” in the main pane, select the checkbox next to it and click Next
  • In the next window, just click Next
  • Click Finish after reading and accepting the license agreements
  • Just click Ok if you get a security warning. You should be able to proceed.
  • Restart Eclipse when prompted to do so.

Congratulations!  You now have the basic tools you need to edit your code.  In the next article, we will create a basic app to learn some of the key elements of Android.  Talk to you soon.

If you ran into problems feel free to leave a comment below.  I can’t promise that I can fix your problem, but I promise I’ll try.