Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,150,367 members, 7,808,280 topics. Date: Thursday, 25 April 2024 at 09:48 AM

For Beginners: Learn How To Create A Simple Android Native App - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / For Beginners: Learn How To Create A Simple Android Native App (18354 Views)

Java Tutorial For Beginners / Programming Challenge For Beginners N20000 / How To Make A Simple Calculator In Notepad Using .bat Format (2) (3) (4)

(1) (2) (3) (4) (Reply) (Go Down)

For Beginners: Learn How To Create A Simple Android Native App by nollyj: 4:30pm On Sep 24, 2014
I have done something like this in Nairaland before and it made front page but when Niaraland was attacked, all the posts were lost. I use to refer people to that thread but now that the thread is no longer here, I am going to write a fresh tutorial on how new app developers should start developing their mobile app of interest using android SDK.

This will be a series of posts that will focus on getting your working environment ready and going through the process of developing android app. It will cover the essential things you need before starting with the core tutorial.

We will talk about android and why we are developing for android.

Lastly, we will jump into the code and by the very end of it; you will have a working android application running on your mobile phone.

Along the line in this tutorial, if there is something that I did not explain in detail and you want me to throw more light to it kindly bring my notice to it.

You are free to ask any question you may have. At the end of the tutorial I will make available the complete source code of the application. It will help you understand in more detail how we will tie everything together.

You are free to download it and use it to do whatever thing you wish to do. Bear in mind that it will be a simple application. By the time we finish with this we will move on to a bigger app and by then you must have gotten some experience on how to develop android native apps.

What app are we going to create?

I have decided to create a simple android app called African Hairstyle. African Hairstyle app catalogues different African hair style and makes it easy for someone that wants to make a particular hair style to easily explain it with this app.

To have an idea of what we will be doing I have attached a screenshot of the app below.


You can read more helpful information about mobile app and game development on my blog. http://toscanyacademy.com/nigerianmobileapps/


If you have a mobile app you want me to show case or write a review on my blog you can also drop the information here.

1 Like 4 Shares

Re: For Beginners: Learn How To Create A Simple Android Native App by BigBizzy(m): 4:54pm On Sep 24, 2014
following....


Hain! Who would ever thought that 2months + comment will make front page And that a dish washer would be a beholder or that the boy bigbizzy would finally become rich!!
Re: For Beginners: Learn How To Create A Simple Android Native App by fnep2smooth(m): 5:25pm On Sep 24, 2014
am here bro. I have a big project in my head just need to know how to do the code to kick start my dream.




»»»»»MODIFY«««««
front page things.
second to comment.
well let me use this opportunity to refer you to my signature.
Re: For Beginners: Learn How To Create A Simple Android Native App by Nobody: 10:08pm On Sep 24, 2014
*clear throat*

Native Android Application Development on a forum?

Lemme see how it goes.

Trolling.
Re: For Beginners: Learn How To Create A Simple Android Native App by codedflowz(m): 11:56am On Sep 25, 2014
Following
Re: For Beginners: Learn How To Create A Simple Android Native App by nollyj: 11:21pm On Sep 25, 2014
This is the second part of our series of tutorial on how to code a simple android native app. If you haven’t seen the first part of the tutorial you can follow this link to read it before starting with this second part.

In this part we will focus on setting up our working environment. I am using windows operating system with eclipse IDE but you are free to use whatever IDE you want. But be aware that I haven't used android studio so I might not be of help but you can still post your question here for other android developers who have worked with android studio to answer.

Using Desktop Computer
You can download and install android SDK and Eclipse in your machine. I will not go through the process of downloading and configuring android in your work environment since there are lots of tutorials online that have already done that. If you are having issues you can follow the tutorial on this link below. It will be very helpful to you. http://www.vogella.com/tutorials/AndroidInstallation/article.html

You can also get the android SDK bundle which have been configured for you on android developers website here http://developer.android.com/sdk/index.html.

Using mobile phone
I do understand that some developers are using their mobile phones to code. You can also dirty your hands by converting your mobile phone to IDE. You can write, compile and execute your code within your handset. There are many free and paid android apps that can help you achieve this.

Programming with Android Thread created by Preboy in Nairaland (https://www.nairaland.com/1571326/programming-android), has done an amazing job in compiling many apps that can help you program android apps on your mobile. I will suggest you go through the list and find an app that best suits your need.

We will head to the next post where we will talk about some other few things we need

If your installation works well you should have an environment like this.

1 Like 1 Share

Re: For Beginners: Learn How To Create A Simple Android Native App by nollyj: 11:48pm On Sep 25, 2014
Well, this is the third part of our android programming tutorial, I know by now we are getting ready to start rolling out our code but before we start there are other few things I will suggest we have in place.

I have designed all the images you see in the app screenshot in Photoshop. You are free to design your own. But if you want to use my own images you can download them from the link below.
http://toscanyacademy.com/blog/download/androidtut.zip

Also, we are going to use some Java android third party library called “Sqlite Asset helper”. This library will help us to manage the SQLITE database we will use in this tutorial. You can download the file here

http://toscanyacademy.com/blog/download/androidtut.zip

In the next post we will start by create our application folder with some basic configuration.
Re: For Beginners: Learn How To Create A Simple Android Native App by epospiky(m): 12:40am On Sep 26, 2014
Following...
Re: For Beginners: Learn How To Create A Simple Android Native App by jamelorys: 5:36am On Sep 26, 2014
Java is the primary language for App-making. Java is comonly used for android aaps where as c, c++ are used for ios apps.

mobile application development
Re: For Beginners: Learn How To Create A Simple Android Native App by Nobody: 7:10am On Sep 26, 2014
jamelorys: Java is the primary language for App-making. Java is comonly used for android aaps where as c, c++ are used for ios apps.

mobile application development

Seriously c, c++

Lol grin

2 Likes

Re: For Beginners: Learn How To Create A Simple Android Native App by nollyj: 9:07am On Sep 26, 2014
In today’s tutorial we will focus our attention on creating our new android project. It is time to fire up your android IDE. Like I said before I will use Eclipse throughout this tutorial.

The next step is to start your IDE. If you have not work with Eclipse before, this tutorial will show you steps to follow to create your first android project in Eclipse.

Steps to follow

Open your Eclipse IDE.
On the top navigation menu click on File
It will open a sub-menu
Click on New sub-menu as shown in the image below



When you click on New, another sub-menu will open. Move to the last sub-menu “other” and click on it as shown in this image below



Another pop-up window menu will open. Look for Android Application project and click on it. This will start a new window pop-up menu for details of your android project.



When the new window menu opens, fill in your android application name, project name and your package name in the empty fields. I have filled mine and you can use the same information or something different. But please observe the format used for package name.



When you are done filling this information, continue to click on the Next button until the Finish button is activated. Then click on the finish button to create your new android application folder.

If you are done then take a break and look at your application folder. Check out all the sub-folders and other files within it. But please don’t change or delete anything there.

1 Like

Re: For Beginners: Learn How To Create A Simple Android Native App by nollyj: 9:31am On Sep 26, 2014
We finished the last tutorial by creating a new android application project. Now is the best time to look at our folder structure and understand what each subfolder is used for and all the files present in our new android application project.

But before we dig into it, this is how my folder structure looks like. Please note that the folder structure might be slightly different depending on the kind of android IDE or the version of android SDK you are using.



I have decide that it is better you read more about what all the sub-folder and files are for before we even start coding. This piece of information below was adopted from android website here https://developer.android.com/tools/projects/index.html

Android Projects
Android projects are the projects that eventually get built into an .apk file that you install onto a device. They contain things such as application source code and resource files. Some are generated for you by default, while others should be created if required. The following directories and files comprise an Android project:

src/
Contains your stub Activity file, which is stored at src/your/package/namespace/ActivityName.java. All other source code files (such as .java or .aidl files) go here as well.

bin/
Output directory of the build. This is where you can find the final .apk file and other compiled resources.

jni/
Contains native code sources developed using the Android NDK. For more information, see the Android NDK documentation.

gen/
Contains the Java files generated by ADT, such as your R.java file and interfaces created from AIDL files.

assets/
This is empty. You can use it to store raw asset files. Files that you save here are compiled into an .apk file as-is, and the original filename is preserved. You can navigate this directory in the same way as a typical file system using URIs and read files as a stream of bytes using the AssetManager. For example, this is a good location for textures and game data.

res/
Contains application resources, such as drawable files, layout files, and string values. See Application Resources for more information.

anim/
For XML files that are compiled into animation objects. See the Animation resource type.

color/
For XML files that describe colors. See the Color Values resource type.

drawable/
For bitmap files (PNG, JPEG, or GIF), 9-Patch image files, and XML files that describe Drawable shapes or Drawable objects that contain multiple states (normal, pressed, or focused). See the Drawable resource type.

layout/
XML files that are compiled into screen layouts (or part of a screen). See the Layout resource type.

menu/
For XML files that define application menus. See the Menus resource type.

raw/
For arbitrary raw asset files. Saving asset files here instead of in the assets/ directory only differs in the way that you access them. These files are processed by aapt and must be referenced from the application using a resource identifier in the R class. For example, this is a good place for media, such as MP3 or Ogg files.

values/
For XML files that are compiled into many kinds of resource. Unlike other resources in the res/ directory, resources written to XML files in this folder are not referenced by the file name. Instead, the XML element type controls how the resources is defined within them are placed into the R class.

xml/
For miscellaneous XML files that configure application components. For example, an XML file that defines a PreferenceScreen, AppWidgetProviderInfo, or Searchability Metadata. See Application Resources for more information about configuring these application components.
Re: For Beginners: Learn How To Create A Simple Android Native App by nollyj: 9:41am On Sep 26, 2014
libs/
Contains private libraries.

AndroidManifest.xml
The control file that describes the nature of the application and each of its components. For instance, it describes: certain qualities about the activities, services, intent receivers, and content providers; what permissions are requested; what external libraries are needed; what device features are required, what API Levels are supported or required; and others. See the AndroidManifest.xml documentation for more information

project.properties
This file contains project settings, such as the build target. This file is integral to the project, so maintain it in a source revision control system. To edit project properties in Eclipse, right-click the project folder and select Properties.

local.properties
Customizable computer-specific properties for the build system. If you use Ant to build the project, this contains the path to the SDK installation. Because the content of the file is specific to the local installation of the SDK, the local.properties should not be maintained in a source revision control system. If you use Eclipse, this file is not used.

ant.properties
Customizable properties for the build system. You can edit this file to override default build settings used by Ant and also provide the location of your keystore and key alias so that the build tools can sign your application when building in release mode. This file is integral to the project, so maintain it in a source revision control system. If you use Eclipse, this file is not used.

build.xml
The Ant build file for your project. This is only applicable for projects that you build with Ant.

Looking unto the next tutorial. Don't forget to drop questions if you have any.
Re: For Beginners: Learn How To Create A Simple Android Native App by Nobody: 11:05am On Sep 26, 2014
Nice one NollyJ....

1 Like

Re: For Beginners: Learn How To Create A Simple Android Native App by nollyj: 11:45am On Sep 26, 2014
Djangocode: Nice one NollyJ....

Thanks for your kind words
Re: For Beginners: Learn How To Create A Simple Android Native App by jamb20s: 10:47am On Sep 27, 2014
nollyj:

Thanks for your kind words
continue pls
Re: For Beginners: Learn How To Create A Simple Android Native App by Nobody: 11:51am On Sep 27, 2014
jamb20s: continue pls

I won't be surprised if this tutorial gets truncated by the way.

www.nairaland.com/1919407/plaguing-section
Re: For Beginners: Learn How To Create A Simple Android Native App by jamb20s: 12:05pm On Sep 27, 2014
shocked why ?
phatjoe50:

I won't be surprised if this tutorial gets truncated by the way.

www.nairaland.com/1919407/plaguing-section
Re: For Beginners: Learn How To Create A Simple Android Native App by nollyj: 1:44pm On Sep 27, 2014
phatjoe50
Why have your two comments so negative. Well by the end of the tutorial I will see what your comment will look like.

At least for your information I will finish it. I hope you find rest now. I am not doing it for you. Even if it did not help someone today it will help somebody in future so relax

There are thread created in early 2000 in Nairaland that has helped me. This is just for archive and in line it might help someone.

2 Likes

Re: For Beginners: Learn How To Create A Simple Android Native App by nollyj: 1:45pm On Sep 27, 2014
jamb20s: continue pls

Just relax, I will finish it
Re: For Beginners: Learn How To Create A Simple Android Native App by Nobody: 5:10pm On Sep 27, 2014
nollyj:
Why have your two comments so negative. Well by the end of the tutorial I will see what your comment will look like.

At least for your information I will finish it. I hope you find rest now. I am not doing it for you. Even if it did not help someone today it will help somebody in future so relax


Guy calm down we no dey fight. cheesy
Re: For Beginners: Learn How To Create A Simple Android Native App by CodeHouse: 7:04pm On Sep 27, 2014
Please allow him to continue without distractions.

I personally will not teach anyone all there is to know, thereby allowing you to research and expand your knowledge but with the way he is going, it will help those who really are new to android app development.

The best way to go about such forum tutorials, is to allow the instructor ask if anyone wants to ask a question as regards the lessons at different stages, so there won't be more comments unrelated to the topic than the actual tutorial.
Re: For Beginners: Learn How To Create A Simple Android Native App by henryobinna(m): 11:13am On Sep 28, 2014
nollj:
Programming with Android Thread created by Preboy in Nairaland (https://www.nairaland.com/1571326/programming-android), has done an amazing job in compiling many apps that can help you program android apps on your mobile. I will suggest you go through the list and find an app that best suits your need.

We will head to the next post where we will talk about some other few things we need

If your installation works well you should have an environment like this.
bro please can you help me with any java ide that eedits compiles n runs, on Android device.
all the ones listed in that post refused to work on my Android please can you be of help to me
Re: For Beginners: Learn How To Create A Simple Android Native App by Awwal1st(m): 10:18pm On Sep 28, 2014
God bless you man, continue....

1 Like

Re: For Beginners: Learn How To Create A Simple Android Native App by Nobody: 3:43am On Sep 29, 2014
henryobinna:
bro please can you help me with any java ide that eedits compiles n runs, on Android device.
all the ones listed in that post refused to work on my Android please can you be of help to me
AIDE works fine on ALL android devices, it can build apks and also edit, compile and run java console apps, which you can export to your PC later.

@nollyj nice to see that you brought this up again, I like how detailed this one is compared to the other one. I hope you get to finish it, including the ADMOB part.

1 Like

Re: For Beginners: Learn How To Create A Simple Android Native App by nollyj: 8:35am On Sep 29, 2014
Preboy:
AIDE works fine on ALL android devices, it can build apks and also edit, compile and run java console apps, which you can export to your PC later.

@nollyj nice to see that you brought this up again, I like how detailed this one is compared to the other one. I hope you get to finish it, including the ADMOB part.

I will include the admob advertisement at the end of the tutorial
Re: For Beginners: Learn How To Create A Simple Android Native App by henryobinna(m): 11:00am On Sep 29, 2014
Preboy:
AIDE works fine on ALL android devices, it can build apks and also edit, compile and run java console apps, which you can export to your PC later.

@nollyj nice to see that you brought this up again, I like how detailed this one is compared to the other one. I hope you get to finish it, including the ADMOB part.
bro to be sincere with you, I've downloaded AIDE twice but they both refuse to work, ok let me go to google play and download it again cos I've not downloaded it from there
Re: For Beginners: Learn How To Create A Simple Android Native App by henryobinna(m): 11:46am On Sep 29, 2014
Preboy:
AIDE works fine on ALL android devices, it can build apks and also edit, compile and run java console apps, which you can export to your PC later.

@nollyj nice to see that you brought this up again, I like how detailed this one is compared to the other one. I hope you get to finish it, including the ADMOB part.
ok now I've installed it on my android, let me see how it goes,
thanks for bringing my interest back to AIDE cool
Re: For Beginners: Learn How To Create A Simple Android Native App by Nobody: 12:09pm On Sep 29, 2014
nollyj:

I will include the admob advertisement at the end of the tutorial
that'd be nice
Re: For Beginners: Learn How To Create A Simple Android Native App by Nobody: 12:20pm On Sep 29, 2014
henryobinna: ok now I've installed it on my android, let me see how it goes,
thanks for bringing my interest back to AIDE cool
I'm glad to be of help and make sure you try n support the developers anyway you can
Re: For Beginners: Learn How To Create A Simple Android Native App by henryobinna(m): 1:48pm On Sep 29, 2014
Preboy:
I'm glad to be of help and make sure you try n support the developers anyway you can
eerm....ok, I'll try to. they really did a good n big work
Re: For Beginners: Learn How To Create A Simple Android Native App by Adrenaline123(m): 2:49pm On Sep 29, 2014
Grabs sit smiley nollyj I am with you.

(1) (2) (3) (4) (Reply)

I Need Help On How To Avoid Burnout / Why I Dumped Wordpress As A CMS (my Experience) / Coding Looks Cool.

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 62
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.