Advances in Mobile Technology
Advances in Mobile Technology
Blackberry, Motorola.
Mobile Technology
Classification of mobile technologies
Mobile Technology simply means technology that is portable;
Mobile technology instils the image of personal, portable
it refers to any device that you can carry with you to perform
device, linked to the World Wide Web
a wide variety of “tasks”
(Naismith, et al., 2004) classify the range of mobile
It is technology that allows those tasks to be performed via
technology using the two orthogonal dimensions of personal
cellular phone, PDA, vehicles, laptops, etc
vs shared and portable vs static.
Mobile device has gone from being no more than a simple
two-way pager to being a cellular phone, a GPS navigation
system, a web browser, and instant messenger system, a
video gaming system, and much more.
It includes the use of a variety of transmission media such as:
radio wave, microwave, infra-red, GPS and Bluetooth to
allow for the transfer of data via voice, text, video, 2-
dimensional barcodes and more.
Types of Mobile Technology
Personal Digital Assistant (PDA)
They are sometimes called pocket computers. The four quadrants of the figure indicate the classification of
They are handheld devices that combine elements of the mobile technology.
computing, telephone/fax, Internet and networking in a The first quadrant (1) is the idea that mobile technology is
single device. portable and personal, and allows for networking and
A typical PDA can function as a cellular phone, fax sender, communication.
Web browser and personal organizer. It is probably atypical of mobile technology and the backbone
PDAs have largely been rendered obsolete by the rise in of m-learning. Personal and static learning (2).
popularity of smartphones and tablets. We have Classroom response systems, devices such as quizdom
Examples of PDA’s : Palm Pilot, Revo, Sony Clie, Hewlett- and the SMART response system to name a few.
Packard Jornado, Casio Cassiopedia, Compaq iPaq and Quadrant 3 refers to personal but shared mobile technology.
Toshiba Pocket PC. Being physically moved from one place to another is not the
Tablet PCs only way in which mobile technologies can be portable.
Tablet PCs are an evolution of the notebook computer with It is the person that is mobile and the “kiosk” is fixed.
touchscreen LCD screens that can be utilized with your Suggests such devices are typically seen as being less personal,
fingertips or with a stylus. and are likely to be shared between multiple users.
The handwriting with a stylus is digitized and can be Large devices such as interactive whiteboards and video
converted to standard text through handwriting recognition, conferencing, allow for a more sharable interactions and are
or it can remain as handwritten text. much less portable, as shown in quadrant 4.
The stylus can also be used to type on a pen-based key layout Mobile communication technologies
where the lettered keys are arranged differently than a Mobile devices can be enabled to use a variety of
QWERTY keyboard communications technologies such as:
may also offer a removable keyboard as an additional input − wireless fidelity (WiFi) - a type of wireless local area
option network technology
Examples: Apple iPad, Microsoft Surface and Surface Pro, − Bluetooth - connects mobile devices wirelessly
Samsung Galaxy Tab, Samsung Nexus and Amazon Kindle − ‘fourth generation’(4G),'third generation' (3G), global
Fire HD system for mobile communications (GSM) and general
Smartphones packet radio service (GPRS) data services - data networking
Smartphones combine a mobile phone and a handheld services for mobile phones
computer into a single device. − dial-up services - data networking services using modems
Smartphones allow users to access and store information and and telephone lines
install programs while also being able to use a mobile phone − virtual private networks - secure access to a private
in one device. network
A smartphone could be a mobile phone with some PDA Future of smart phones
functions integrated into the device or vice versa.
Always on screen so you are never in the dark
Mobile communication has become more popular in last few − Provides phone calls
years due to fast reform from 1G to 5G in mobile technology. − Send/receive e-mail messages
transmission technology and very high increase in telecoms − Speed : 64-144 kbps
compatible transmission technology and new frequency − Take a time of 6-9 mins. to download a 3 mins. MP3 song.
bands. In 1980 the mobile cellular era had started, and since Third Generation (3G)
then mobile communications have undergone considerable 3G is based on GSM and was launched in 2000. The aim of
changes and experienced massive growth. this technology was to offer high speed data. The original
These phones were the first mobile phones to be used, which more using packet switching.
was introduced in 1982 and completed in early 1990. It was It uses Wide Band Wireless Network with which clarity is
used for voice services and was based on technology called as increased.
Advanced Mobile Phone System (AMPS). It also offers data services, access to television/video, new
The AMPS system was frequency modulated and used services like Global Roaming.
frequency division multiple access (FDMA) with a channel It operates at a range of 2100MHz and has a bandwidth of
capacity of 30 KHz and frequency band of 824- 894MHz. 15-20MHz used for High-speed internet service, video
− Poor battery life accommodate web-based applications and audio and video
Introduction to Android Programming calling, texting, and navigating with the phone.
Wi-Fi Internet tethering: Android supports tethering, which
What is android?
allows a phone to be used as a wireless or wired hot spot that
Based on modified version of Linux which is open and free
other devices can use to connect to the Internet.
Most of android code was developed under the open source
Apache License.
Android Architecture
Layouts
The Android user interface includes a layout resource designer
that organizes how controls appear on the app’s various
screens. There are several layouts available in android:
Relative Layout
LinearLayout
TableLayout
GridLayout
FrameLayout
Relative layout
Click on the Create a virtual device button in order to invoke
It organizes layout components in relation to each other as
the Virtual Device Configuration dialog
shown.
In the Virtual Device configuration dialog, select the
This provides more flexibility in positioning controls than
appropriate options.
other layouts.
Give it a name
Click finish
To perform a test run of the newly created AVD emulator,
simply select the emulator from the AVD Manager and click
on the launch button (the green triangle in the Actions
column).
The onClick() method is called when the view is clicked RadioButton controls are used to select or deselect an option.
Each RadioButton control has a label defined by the Text
Creating a Button Event Handler(3)
property and a Checked property set to either true or false.
In the Package Explorer, double-click Main.java to open its
RadioButton controls are typically used together in a
code window. Click to the right of the
radioGroup.
setContentView(R.layout.main); line. Press the Enter key. To
Checking one radio button unchecks the other radio buttons
initialize and reference the Button control with the Id name
within the group.
of b, type
Example
Button b =(Button) findViewById(R.id.btnOpen);
Suppose you are to develop a medical app with an
Press the Enter key. To code the button listener that awaits
EditText(patients weight) control, a RadioGroup containing
user interaction, type b.seton and then wait for a code listing
two RadioButtons(convert pound to kg and kg to pound) and
to open. Double-click the first setOnClickListener to select it.
a Button (weight conversion)
In the parentheses, type new View .Double-click the first
Solution
choice, which lists an OnClickListener with an Anonymous
Each of the RadioButton controls placed on the emulator
Inner Type event handler.
need to be referenced by using the findViewById Java
Type ; (semicolon) after the closing parenthesis to complete
command.
the auto-generated stub.
final RadioButton lbsToKilo = (RadioButton)
Toasts findViewById(R.id.radLbToKilo);
final RadioButton kiloToLbs = (RadioButton)
A toast provides simple feedback about an operation in a findViewById(R.id.radKiloToLb);
small popup. After the RadioButton controls have been referenced, the
It only fills the amount of space required for the message and next priority is to determine which of the two radio buttons
the current activity remains visible and interactive. the user selected.
Toast object can be intiated with one of the makeText() If the user selected the Convert lbs to Kg radio button, the
methods. This method takes three parameters: the weight entered is divided by 2.2, but if the user selected the
application Context, the text message, and the duration for Convert Kg to lbs radio button, the weight is multiplied by
the toast. It returns a properly initialized Toast object. You 2.2.
can display the toast notification with show() Variable named conversionRate is assigned the decimal value
Toast.makeText(context, text, duration).show(); 2.2. The variables weightEntered and convertedWeight
E.g contain the patient weight and converted weight result,
Toast.makeText(MainActivity.this,“Hello”,Toast.LENGTH_LO respectively.
NG).show(); In the Package Explorer double-click Main.java to open the
Expected java code code window. Click after the comment line: /** Called when
public void onCreate(Bundle savedInstanceState) { the activity is first created. */. Press the Enter key to insert
super.onCreate(savedInstanceState);
setContentView(R.layout. main); a new blank line.
Button b = (Button)findViewById(R.id.btnOpen);
onClick listener type: you want to display is within the same project as the current
weightEntered=Double.parseDouble(weight.getText().t activity.
oString());
if (lbsToKilo.isChecked()){ Binding Activity Data
if (weightEntered <=500){ Two activites were created. The first activity has two edit
convertedWeight = weightEntered /
conversionRate; texts for entering username and password and a button for
result.setText(convertedWeight+ “
opening the second activity and sending the username and
kilograms”);.
} password to it.
else {
Toast.makeText(Main.this,"Pounds must be less than the second activity has a button which when clicked should
500", Toast.LENGTH_LONG).show(); display the username from the first activity in a TextView
} In your main.java class
} Use the putExtra() in your intent.
if (lbsToKilo.isChecked()){ Declare the variables that will hold the input e.g
if (weightEntered <=500){ String name,password
convertedWeight = weightEntered / Final EditText
conversionRate; val1=(EditText)findViewById(R.id.name);
result.setText(convertedWeight+ “ Final EditText
kilograms”);. val2=(EditText)findViewById(R.id.password);
} name=val1.getText().toString();
else { password=val2.getText().toString();
Toast.makeText(Main.this,"Pounds must be less than Put this in the onClick method of the button
500", Toast.LENGTH_LONG).show(); startActivity(new Intent(Main.this,
} second.class).putExtra(“com.example.Adam ", name));
} OR
isChecked( ) method is used to determine if the RadioButton startActivity(new Intent(Main.this,
second.class).putExtra(“com.example.Adam ",
object has been selected name).putExtra(“com.example.Pass”,password));
Linking Activities using Intents
NB: The stringName serves as the key or a reference for the
An Android application can contain one or more activities.
value.
When your application has more than one activity, you often
The stringName must be preceeded by your package name
need to navigate from one to another.
e.g. com.example.stringName.
In Android, you navigate between activities through what is
The value can be a fixed value or user defined value.
known as an intent.
In the other class, use the following code whenever you need
Creating a new Activity
the sent data
Begin by displaying the Project tool window using the Alt-1
keyboard shortcut. getIntent().getStringExtra(“com.example.Adam”);
can also be stored in When the user selects an item from the drop-down, the
Adding items to String Array and prompt display in the implement the AdapterView.OnItemSelectedListener
You can add a spinner to your layout with the Spinner object. method.
You should usually do so in your XML layout with a <Spinner> First you need to specify the interface implementation by
you can use the following code in your Activity to supply the setContentView() method to load the UI from the xml file
spinner with the array using an instance of ArrayAdapter because the ListActivity class already includes the ListView.
Spinner spinner = (Spinner)
findViewById(R.id.spinner);
Using onListItemClick Method Programming the autocomplete view requires the creation of
Each of the names displayed in the list can be selected by a string array
String [] names={“habu”,”peter”};
tapping the name on the mobile device.
The ArrayAdapter object manages the array of strings that
The method onListItemClick( ) is called when an item in
will be displayed by the AutoCompleteTextView.
the list is selected. ArrayAdapter<String> adapter = new
When a name in the list is selected, the position of the item ArrayAdapter<String>(this,android.R.layout.simple_d
ropdown_item_1line, presidents);
is passed from the onListItemClick and evaluated with a
The setThreshold() method sets the minimum number of
decision structure. If the user selects the first attraction, the
characters the user must type before the suggestions appear
position parameter is assigned an integer value of 0. The
as a drop-down menu:
second item is assigned the position of 1, and so forth. textView.setThreshold(3);