Also read!
Home / Android / How to make an APP for Android – part 1 of 2

How to make an APP for Android – part 1 of 2

Did you know that Android has more than a billion users? Amazing isn't it? Wouldn't it be nice if you did a useful program which can be run on any tablet or mobile and calculates, send, receive or access anything?

Programming in java for Android and make an application is not a big deal. There is a lot of help on the internet, including tutorials and how-to videos, and here in this article you will find the path of stones for the beginner start putting your brand on Google Play.

This tutorial, in two parts (READ HERE THE SECOND), teaches you how to download the packages and make a program type calculator, IE, a program that receives data and calculates a specific response. You can modify this program to simplify the calculation of area, volume, interest, percentage, probability or any other type of thing you want and be useful in your work. After ready, the program generated can be installed and run on any cell phone or tablet using Android, and may even be sent to Google Play to be downloaded by your friends.

After you understand this program, that for educational purposes will calculate the roots of an equation of second degree, You can modify it to do something different. After that you will no longer be beginner, and maybe not come back here to describe your experiences! Come on!

First of all, You must download the ANDROID STUDIO and SDK TOOLS. Is a package of more than 1 GB containing almost everything you need to make programs for Android.


Before installing the Android Studio, enjoy and download and install the JAVA SE DEVELOPMENT KIT. I'm going to assume from here that you are using a version of Windows. But you can do the same on Linux, MacOS and other.


After installing Android Studio and JAVA SE, start the Android Studio and create a new project, IE, a new application.


Clicking NEXT we're going to a very important screen where you choose the name of the application and the “COMPANY DOMAIN”. The latter is using to generate a name for the application in Google Play. The actual name, like Facebook or Google PLUS is just a fancy name, to PLAY the name of the application that appears in the Package Name: Calculator.. calculadoraraizes.


Here you choose for you want to develop, and what version of Android that your application will use minimum. In my case, I chose Android 4.0.3 that is old enough to run on virtually any Android. Choose to develop for Tablet or Phone.


Now you're going to choose a “ACTIVITY” for your application, which is basically a form where they will be placed buttons, text boxes, menus and other. In the case, I chose a “EMPTY ACTIVITY”, no nonsense that may complicate our life.


An application can have more than one “ACTIVITY”, IE, This we're adding will have a name for the activity and a name for the layout file where are written the display settings. Choose any name here that makes sense.


Now let's run! For now, our program does not do anything other than open, say “Hello world” and close. If we manage this feat we are sure that everything is working. For that, Click the green arrow or press SHIFT-F10.


But run where? You must be wondering, right? Android Studio allows an application to run on a mobile/tablet any or in an emulator. In my case, I chose to run on a real device, What is faster and easy to work. To run your application on your phone or tablet device enable debugging ANDROID (or ANDROID ADB) in settings->Developer options. If you do not find the developer options, It may be possible to enable this menu by clicking several times on VERSION NUMBER in the menu on the phone.

If everything is correctly enabled you should see your device in the list of CONNECTED DEVICES when you click Run.


And there's our application running on your mobile. Amazing!


You can view the installed application in the list of APPS.


And now? How to modify to make an account any? This is the subject of the next post. If you want to read the second part, Click here! If you want to download the complete program source code, ready, Here I leave the link:

About Adriano Moutinho

Adriano Moutinho
Professor of Electronics technician at CEFET-RJ, Telecommunications engineer, Master in computer science and a Ph.d. in Civil Engineering. In addition to crazy China products buyer.

Leave a Reply

Your email address will not be published. Required fields are marked *