Let’s start with most basic android concepts which some of us may already know.
Android Applications
An Android Application is something that a user might install from the Google Play Store or otherwise download to their device from any remote location over internet/ even from their local systems as well. This application should have some user interface, and it might have some other code designed to work in the background of application. Here I am assuming that you have some hands-on experience with Android devices, and therefore you are familiar with buttons like HOME and BACK, the built-in settings, the concept of a home screen and launcher, and so forth. If you have never used an Android device, I would like to strongly encourage you to get one and play with the device and apps which come installed on it/ or download from app store. This will help you in understanding what you will be building after so much hard work.
Allowed Programming Languages
The vast majority of Android applications are written exclusively in Java. However, there are other options as well:
- You can write parts of the app in C/C++. It is usually done for performance gains or porting over existing application’s code bases etc.
- You can write an entire applications in C/C++. It is mostly done for games using OpenGL for 3D animations.
- You can write part of an android app in HTML, CSS, and JavaScript as well. There are tools which will package them into an Android application.
But still the fact is that Java is most used and popular language to build android applications. If you want to deep dive into android app development, then there is no excuse for not learning java,
For Learing Android please visit:android development course
Major Android ConceptsComponents:
Remember when you started learning java, your first program was ‘Hello World‘ application. You wrote a
main()
method and some print statement; then some magic happened and output was written in console. Similarly, when you entered into web programming area, normally you will learn/write the http servlet first. You extend a class and write some code in it; and then something passes control to your servlet and it start executing.
Android takes the second approach i.e. you extend some specific classes and define your configuration in some XML file and you are good to start your first android app. The subclasses you create, by extending base classes supplied by Android, are called components. Below are major 4 components you should know before hand
Activities
The major building block of the user interface is called activity. You can think of an activity as an user interface as you see in classic windows application. Just like in windows where an application takes most of screen apart from toolbar strip, activity also leave area on mobile device screen only for strip on top contain device clock, signal strength indicators etc. Remember this term, you will be using it in every step of your app development
Services
Activities are short-lived and can be shut down at any time, such as when the user presses the BACK button or HOME button. Services, on the other hand, are designed to keep running, if needed, independent of any activity inside application, for a short period of time. You might use a service for checking for updates to an RSS feed, or to play back music even if the controlling activity (i.e. media player) is no longer operating on front screen.
Content Providers
Content providers provide a level of abstraction for any data stored on the device that is accessible by ‘multiple’ applications. The Android development model encourages you to make your own data available to other applications. Building a content provider lets you do that, while maintaining a degree of control over how your data gets accessed by other apps on same device.
Broad cast services
The system, and/or other apps, will send out broadcasts/notifications from time to time for everything relevant e.g. for the battery is getting low, the screen turns off OR connectivity changes from WiFi to mobile data etc. A broadcast receiver in your application will be able to listen for these broadcasts/notifications and respond accordingly the way you want.
To more information visit Android Training
0 Comments:
Post a Comment