Hi at all!!!
Today in the series of articles about Case studies from my M.Sc. in Libre Software subject, i’m going to speak about Android.
Android is a open source project driven by the Open Headset Alliance, a set of 47 companies including Google, HTC, Intel, Motorola, Samsung, Qualcomm, and many others.
Google is the leader of this alliance and the Android project.
Android is a software stack for mobile devices that includes an operating system, middleware, and key applications.
Android provides a SDK (Standard Develpment Kit) for developers for build applications that interact in the Android OS.
Android applications can be developed in Java if uses the Android SDK, or C/C++ if uses the Android NDK (Native Development Kit).
Android is libre software under the Apache License v2, and is based in kernel Linux 2.6.
For the virtual machine, Android uses Dalvik Virtual Machine, a specific Java Virtual Machine made by Google for Android.
Android uses 2D and 3D graphics using 2D library and OpenGL for 3D.
For storage and ddbb Android ises SQLite, an entity-relationship db.
For develop Android, offer to the developer a plugin for Eclipse IDE, with all tools for develop in this software, such as emulator, debugger, heap view, etc.
This is a little information about Android project, but in the web you can find more information.
So in this post, for do something different, i talk about the main elements in the Android programming using the SDK, just above, for more deep information you can search books and webpages and communities dedicated to Android develop.
Well, Android programming it’s based in four big elements:
This is like the forms in a desktop application.
Android applications uses activities for show the user information and interaction with him.
In the activities, you can place buttons, text views, labels, and much many widgets.
The activities can be developed by two ways:
1) Using xml files specification:
This is the recommended option for build activities, you define xml files with all elements
that can be used and view in the activities their places, content, ids, labels, etc.
2) You can create the Activities in hard-code mode, that is to say, coding like other clasess.
This is not recommended, but sometimes, ie when you can place some widgets in runtime you must
use this way.
In any case, the explained above is only the two ways for place widgets in the activities, for the functionality you have to program your classes and put in them all that the widgets do and the interaction with data or anything.
b) Content providers:
The content providers are like in Android have benn called the interaction with internal data and between elements.
The content providers provides a layer for interact with the data in the mobile, like de ones in SQLite database.
In contant providers also exists the broadcast receivers, which are broadcast messages for all operating system for use in the applications, ie, when the mobile receive a call, a broadcast message is send to all apps, and if the developer implements broadcast receivers he can take the message and doing something.
The intents are used for communicate and interact between different activities or maybe between different applications.
With an intent you can communicate, in example, your application that need obtain the data of some barcode, with other application wich already implements the read functionality, so you don’t need develop this, only call to other application or functionality and then you can take the data.
Services is like activities but in background mode, that is to say, is functionality that runs in background mode for the user don’t must interact with this, examples of the service use, could be a music player once the user have selected his music, or a service for get the email, etc.
And that’s all, these are the four big and main elements in the Android programming, but these are not trivial, the Android developr have many things for use and for learn.
See u my friends!!!