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.

5759c89494194_1

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.

5759c895c2fe0_3

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

5759c896321de_4

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.

5759c896a5166_5

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.

5759c89737f3b_6

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.

5759c897d1bf1_7

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.

5759c8985a1d7_8

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.

5759c898c2e2e_9

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.

5759c8994160d_10

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

5759c8999e4f7_11

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

5759c89b44a4e_12

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:

http://www.tudovemdachina.com/uploads/programas/calculadoraraizes.zip

About Adriano

Professor, Engineer and buyer of products crazy China.

Leave a Reply

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

*