Merged Android App.devp't (1)
Merged Android App.devp't (1)
DEVELOPMENT
BY Sisay A.(MSc)
What is Android
• Android is a complete set of software for mobile devices such as
tablet computers, notebooks, smartphones, electronic book readers,
set-top boxes etc.
• It contains a linux-based Operating System, middleware and key
mobile applications.
• It can be thought of as a mobile operating system.
• But it is not limited to mobile only. It is currently used in various
devices such as mobiles, tablets, televisions etc.
• Android is a software package and linux based operating
system for mobile devices such as tablet computers and
smartphones.
• It is developed by Google and later the OHA (Open Handset
Alliance).
• Java language is mainly used to write the android code even
though other languages can be used.
• The goal of android project is to create a successful real-
world product that improves the mobile experience for end
users.
What is Open Handset Alliance (OHA)
• It's a consortium of 84 companies such as google, samsung,
AKM, synaptics, KDDI, Garmin, Teleca, Ebay, Intel etc.
• This defines two menu items, one for an "About" section and one for
"Help" information.
Step 5: Inflate Your Menu Resource
• To instruct Android to use your options menu, open the Activity class
you want it to appear with.
• Add the following method to your Java code, inside the class
declaration and after the "onCreate" method:
• Edit the "my_options_menu" section if you saved your menu XML file
with a different name.
Step 6: Detect User Interaction
• To respond to user interaction with your menu, you first need to detect it
within your Activity class.
• Add the following method outline after the "onCreateOptionsMenu"
method:
• Inside this method, which returns a boolean value, you can add code to
respond to each particular item. The system will automatically call the
"onOptionsItemSelected" method when the user chooses any of the
options menu items.
Step 7: Respond to Menu Item Selection
• Before your code can respond appropriately to user interaction with the
menu, you need to work out which item was selected.
• Add a switch statement to your method using the following sample syntax:
• Add a case statement for each item in your menu. This sample code starts
new Activity screens for each item chosen. If you opt to do this, you will
need to add an Activity class for each option in your application Java code
as well as in the Manifest file.