Sunday, 27 January 2013

The Android Stack


Do you want to know the secrets of Android Mobile Programming and Development and use it for the advancement of your career in IT? Do you have problems in your thesis or research about Mobile apps or games? Here is an instant solution for your problem. Avail the Android Mobile Programming and Development Training package of Prof Erwin Globio and get free tips about Android Mobile Platform Secrets. 



For more free information about Android and Android Training visit the following sites:
http://erwinglobio.sulit.com.ph/
http://erwinglobio.multiply.com/
 http://erwinglobio.wordpress.com/.
You may contact the Android Trainer at 09393741359 or 09323956678. Call now and be one of the Android Experts

Setting Up a PATH to Tools



The Android SDK has a folder that contains all its major tools. Since we’re going to use
these tools from the command line, it is very helpful to add your ~/android-sdk/tools/
and your ~/android-skd/platform-tools/ directories to your system PATH variable. This
will make it easier to access your tools without having to navigate to their specific
location every single time.
Details for setting up the PATH variable depend on the platform; see step 2 of the docu-
ment “Installing Android SDK”.

Portability of Linux


Portability


Linux is a portable platform that is relatively easy to compile on various hardware
architectures. What Linux brings to Android is a level of hardware abstractions. By
basing Android on Linux, we don’t have to worry too much about underlying hardware
features. Most low-level parts of Linux have been written in fairly portable C code,
which allows for third parties to port Android to a variety of devices.

Graphical User Interface (GUI) Components



Input and output dialog boxes can be used to input data into a program and show the output of a program.  The methods showInputDialog and showMessageDialog found in the class JOptionPane of package javax.swing could be used to perform this task.  These methods however have only displayed one dialog box at a time.  A program that will display all input and output in one dialog box is called a Graphical User Interface (GUI).  With a GUI, a user can see inputs and outputs simultaneously, as well as change input values to recalculate output values.

In a Java GUI, the areas used to get input and show results are called JTextFields.  The labels for these text fields are called JLabels, the buttons that calculate output or close the GUI are called JButtons, and the window containing all these components is called JFrame.

The GUI components are places in an area called the content pane of the window.  When a button in the content pane is clicked an event has occurred. The Java system is very prompt in listening for the events generated by a program and then reacting to those events.

Getting Access to the Content Pane


The class JFrame has the method getContentPane that can be used to access the content pane of the window. However, the class JFrame does not have the necessary tools to manage the components of the content pane. The components of the content pane are managed by declaring a reference variable of the Container type and then using the method getContentPane.  This can be done as follows:

Container pane = getContentPane();

The class Container is in the package java.awt.  Some methods of the class are:

public void add(Object obj)
public void setLayout(Object obj)

The method setLayout is used to set the layout of the content pane. To set the layout of the container to a grid, you use the class GridLayout. Consider the following statement:

pane.setLayout(new GridLayout(5, 2));

This statement creates an object belonging to the class GridLayout and assigns that object as the layout of the content pane, pane, by invoking the setLayout method.

If you do not specify a layout, Java uses a default layout. If you specify a layout, you must set the layout before adding any components.

Teaching Tip

Java provides many layout managers. A tutorial on layout managers for Java can be found at:

The Stack




















This is the 9,000-foot overview of the Android platform. Although you’re concerned
primarily with writing Android applications, understanding the layout of the system
will help shape your understanding about what you can or cannot do easily with
Android.
By the end of this chapter, you’ll understand how the whole system works, at least from
the high level.

Application Distribution


One way in which Android is quite different from other platforms is the distribution
of its apps. On most other platforms, such as iPhone, a single vendor holds a monopoly
over the distribution of applications. On Android, there are many different stores, or
markets. Each market has its own set of policies with respect to what is allowed, how
the revenue is split, and so on. As such, Android is much more of a free market space
in which vendors compete for business.

In practice, the biggest market currently is Android Market, run by Google. It is unclear
whether Google means to just seed the market space while other stores develop or plans
to make it a profitable venture.
Applications can also be distributed via the Web. When you download an APK file
from a website through the browser, the application represented by the APK file is
installed automatically on your phone.
What about viruses, malware, spyware, and other bad things?
With its decentralized application distribution system, it is certainly possible for an
unsuspecting user to download a malicious app that consequently does bad things. For
example, there have been reports of phishing attacks via fake banking apps.
So, Android leaves it to the marketplace to sort it out. Eventually, there will be stores
that are more reputable and those that are less so, at least in theory. Google relies on
user reports for policing its Android Market, but other stores may choose to do more
proactive testing and raise the bar on what gets into the store in the first place.

Do you want to know the secrets of Android Mobile Programming and Development and use it for the advancement of your career in IT? Do you have problems in your thesis or research about Mobile apps or games? Here is an instant solution for your problem. Avail the Android Mobile Programming and Development Training package of Prof Erwin Globio and get free tips about Android Mobile Platform Secrets. For more free information about Android and Android Training visit the following sites: http://erwinglobio.sulit.com.ph/http://erwinglobio.multiply.com/ http://erwinglobio.wordpress.com/. You may contact the Android Trainer at 09393741359 or 09323956678. Call now and be one of the Android Experts