BCA Mobile Computing UNIT - 2
BCA Mobile Computing UNIT - 2
BCA Mobile Computing UNIT - 2
BCA VI
UNIT – II
Jiwaji University
Year – 2019-20
An Introduction to mobile computing
Mobile Computing is a technology that allows transmission of data, voice and video via a
computer or any other wireless enabled device without having to be connected to a fixed physical
link. The main concept involves −
Mobile communication
Mobile hardware
Mobile software
Mobile communication
The mobile communication in this case, refers to the infrastructure put in place to ensure that
seamless and reliable communication goes on. These would include devices such as protocols,
services, bandwidth, and portals necessary to facilitate and support the stated services. The data
format is also defined at this stage. This ensures that there is no collision with other existing
systems which offer the same service.
Since the media is unguided/unbounded, the overlaying infrastructure is basically radio wave-
oriented. That is, the signals are carried over the air to intended devices that are capable of
receiving and sending similar kinds of signals.
Mobile Hardware
Mobile hardware includes mobile devices or device components that receive or access the service
of mobility. They would range from portable laptops, smartphones, tablet Pc's, Personal Digital
Assistants.
These devices will have a receptor medium that is capable of sensing and receiving signals. These
devices are configured to operate in full- duplex, whereby they are capable of sending and
receiving signals at the same time. They don't have to wait until one device has finished
communicating for the other device to initiate communications.
Above mentioned devices use an existing and established network to operate on. In most cases,
it would be a wireless network.
Mobile software
Mobile software is the actual program that runs on the mobile hardware. It deals with the
characteristics and requirements of mobile applications. This is the engine of the mobile device.
In other terms, it is the operating system of the appliance. It's the essential component that
operates the mobile device.
Android operating system is a stack of software components which is roughly divided into five
sections and four main layers as shown below in the architecture diagram.
Linux kernel
At the bottom of the layers is Linux - Linux 3.6 with approximately 115 patches. This provides a
level of abstraction between the device hardware and it contains all the essential hardware drivers
like camera, keypad, display etc. Also, the kernel handles all the things that Linux is really good
at such as networking and a vast array of device drivers, which take the pain out of interfacing to
peripheral hardware.
Libraries
On top of Linux kernel there is a set of libraries including open-source Web browser engine
WebKit, well known library libc, SQLite database which is a useful repository for storage and
sharing of application data, libraries to play and record audio and video, SSL libraries responsible
for Internet security etc.
Android Libraries
This category encompasses those Java-based libraries that are specific to Android development.
Examples of libraries in this category include the application framework libraries in addition to
those that facilitate user interface building, graphics drawing and database access. A summary of
some key core Android libraries available to the Android developer is as follows −
android.app − Provides access to the application model and is the cornerstone of all
Android applications.
Having covered the Java-based core libraries in the Android runtime, it is now time to turn our
attention to the C/C++ based libraries contained in this layer of the Android software stack.
Android Runtime
This is the third section of the architecture and available on the second layer from the bottom.
This section provides a key component called Dalvik Virtual Machine which is a kind of Java
Virtual Machine specially designed and optimized for Android.
The Dalvik VM makes use of Linux core features like memory management and multi-threading,
which is intrinsic in the Java language. The Dalvik VM enables every Android application to run
in its own process, with its own instance of the Dalvik virtual machine.
The Android runtime also provides a set of core libraries which enable Android application
developers to write Android applications using standard Java programming language.
Application Framework
The Application Framework layer provides many higher-level services to applications in the form
of Java classes. Application developers are allowed to make use of these services in their
applications.
The Android framework includes the following key services −
Activity Manager − Controls all aspects of the application lifecycle and activity stack.
Content Providers − Allows applications to publish and share data with other
applications.
View System − An extensible set of views used to create application user interfaces.
Applications
You will find all the Android application at the top layer. You will write your application to be
installed on this layer only. Examples of such applications are Contacts Books, Browser, Games
etc.
Applications
These are the basics of Android applications:
• Android applications are composed of one or more application components (activities,
services, content providers, and broadcast receivers)
• Each component performs a different role in the overall application behavior, and each one
can be activated individually (even by other applications)
• The manifest file must declare all components in the application and should also declare all
application requirements, such as the minimum version of Android required and any hardware
configurations required
• Non-code application resources (images, strings, layout files, etc.) should include alternatives
for different device configurations (such as different strings for different languages)
Google, for software development and application development, had launched two competitions
ADC1 and ADC2 for the most innovative applications for Android. It offered prizes of USD 10
million combined in ADC1 and 2. ADC1 was launched in January 2008 and ADC 2 was launched
in May 2009. These competitions helped Google a lot in making Android better, more user
friendly, advanced and interactive.
The iOS is the operating system created by Apple Inc. for mobile devices. The iOS is used in
many of the mobile devices for apple such as iPhone, iPod, iPad etc. The iOS is used a lot and
only lags behind Android in terms of popularity.
The iOS architecture is layered. It contains an intermediate layer between the applications and
the hardware so they do not communicate directly. The lower layers in iOS provide the basic
services and the higher layers provide the user interface and sophisticated graphics.
The different layers as shown in the above diagram are given as follows:
Core OS
All the iOS technologies are build on the low level features provided by the Core OS layer.
These technologies include Core Bluetooth Framework, External Accessory Framework,
Accelerate Framework, Security Services Framework, Local Authorisation Framework etc.
Core Services
There are many frameworks available in the cure services layer. Details about some of these are
given as follows:
Cloudkit Framework
The data can be moved between the app the iCloud using the Cloudkit Framework.
This provides the data management and service features for the iOS apps.
The data model of the model view controller app is handled using the Core Data Framework.
The address book framework provides access to the contacts database of the user.
All the motion based data on the device is accessed using core motion framework.
Healthkit Framework
The health related information of the user can be handled by this new framework.
This framework provides the location and heading information to the various apps.
Media
The media layer enables all the graphics, audio and video technology of the system. The
different frameworks are:
UIKit Graphics
This provides support for designing images and animating the view content.
This provides support for 2-D vector and image based rendering and is the native drawing engine
for iOS apps.
Core Animation
The Core Animation technology optimizes the animation experience of the apps.
This framework provides support for playing playlists and enables the user to use their iTunes
library.
AV Kit
Cocoa Touch
EventKit Framework
This shows the standard system interfaces using view controllers for viewing and changing
calendar related events.
GameKit Framework
This provides support for users to share their game related data online using Game center.
MapKit Framework
This provides a scrollable map which can be included into the app user interface.
The Windows Phone SharePoint List Application template and the MVVM design pattern
The Windows Phone SharePoint List Application template generates a Visual Studio 2010
project for a Silverlight-based Windows Phone app developed according to a software design
pattern known as the View-Model-ViewModel (MVVM) pattern. The MVVM pattern is a way
of organizing and compartmentalizing code in a project into manageable layers, which can be
independently developed, tested, and modified. It is a particularly effective development pattern
for Windows Presentation Foundation (WPF) and Silverlight projects because, among other
benefits, the pattern allows for the presentation layer of a given application to have a less rigid
dependency on the structure of underlying data, freeing developers to adapt the presentation
layer for different contexts (as, for instance, Web browsers, mobile device interfaces, or desktop
applications) while retaining the same underlying data structures.
As opposed to a simpler approach of, say, writing all of your data-management code in the code-
behind files associated with particular XAML files in a Silverlight application, organizing a
project according to the MVVM pattern involves an additional initial investment of effort to plan
and develop the necessary classes, the inheritance model, and the methods of communication
between the components of the pattern. The Windows Phone SharePoint List Application
template takes care of this initial configuration and development work to set up the pattern for
you, allowing you to customize and extend the project to develop a functional MVVM
application quickly.
The three main components or layers of the MVVM pattern are the View, the Model, and the
ViewModel. In projects based on the Windows Phone SharePoint List Application template,
these components are implemented by various project files, as shown in Figure 1.
Figure 1. Windows Phone SharePoint List Application files in the MVVM pattern
The following sections explain some of the details related to the implementation of these
components in the Windows Phone SharePoint List Application template.
The Model component
The Model component in the MVVM pattern refers to the classes and structures used to
represent the data for an application. For an app based on a SharePoint list, the list and its items
serve as the underlying data. In the Windows Phone SharePoint List Application,
the ListDataProvider class handles the standard SharePoint client object model operations for
connecting to a SharePoint list; for example, creating an instance of the ClientContext class and
setting its properties. The exact implementation details of the ListDataProvider class in the
template depend on the options specified in the steps of the SharePoint Phone Application
Wizard when you create a project based on the template.
If you want to filter the data retrieved from the SharePoint list or specify exactly what data to
retrieve, you can modify the code in the ListDataProvider class (in the ListDataProvider.cs
file). The parts of the file you would most likely modify for these purposes are
the LoadDataFromServer method and the implementation of the
static CamlQueryBuilder class. You can also derive your own class from
the ListDataProviderBase class. If you do so, be sure to implement the abstract methods from
the base class, LoadData and LoadItem, and also implement the Context property member of
the base class, providing a suitable get accessor method.
The View component
The View component in the MVVM pattern refers to the user interface (UI) of an app. In
Silverlight-based Windows Phone app, the View component is constituted by XAML files for
declaring and qualifying UI elements and code-behind files associated with those XAML files
that implement event handlers and other code to determine how users interact with the UI
elements.
It is important to distinguish between two senses of the word "view" in the context of developing
SharePoint list apps for Windows Phone. A SharePoint list is associated with one or more views,
as, for example, the default All Items view for a list, or the Current Events view for a list based
on the Calendar list template. These views represent ways of organizing and displaying list items
in a SharePoint list. Depending on the kind of SharePoint list (and on whether custom views
have been added to the list) you target for your app, the views associated with the list, such as
All Tasks or Current Events, are made available for you to choose to include in your app in the
SharePoint Phone Application Wizard when you create a project from the template. If you
include a given view, the template generates a PivotItem control (contained within
a Pivot control) to render the view of the list.
This sense of the word "view" is to be distinguished from the sense of the word as it applies to
the Views in the template. In a project based on the Windows Phone SharePoint List Application
template, the Views (implemented as XAML files in the Views folder of the project) refer
conceptually to the View component of the MVVM pattern. That is, the Views in the project
represent the presentation layer for the data (or, Model) of a given entity. In this case, the entity
is either a SharePoint list or a SharePoint list item.
Although the List form (List.xaml) in the project can be said to correspond to the default view
associated with a SharePoint list, the conceptual distinction between the default view of a
SharePoint list and the View as represented by the List form should still be maintained, because
the List form in the project doesn't necessarily map to the default view of the list on the server.
If, for example, you modify the default list view on the server (by, say, specifying a given sort
order or displaying certain fields and not others), the modifications will not be represented in the
XAML that constitutes the List form in the project. You set the order of the items as they are
shown in the List form in your app based on your choices in the SharePoint Phone Application
Wizard (or based on your subsequent customizations of the List form), regardless of the order
configured for the default view associated with the SharePoint list on the server.
The List form represents the View (or presentation layer) for the SharePoint list. The other three
View files pertain to individual list items, and they can be said to correspond to the forms
available (generally) from the list item menu for a list item in SharePoint.
The List form is always included by default in a project based on the Windows Phone SharePoint
List Application template. The XAML files for the other forms in the Views folder of the project
are generated based on the list operations (New, Display, or Edit) selected in the SharePoint
Phone Application Wizard.
The ViewModel component
The ViewModel component in the MVVM pattern is intended to serve as a kind of broker to
facilitate the interactions between the View component and the Model component, while
decoupling the View component from the Model component so it is easier to change one or the
other without adversely affecting the other. Strictly speaking, the ViewModel component could
be considered part of the presentation layer, because it often includes logic for "shaping"
underlying data for presentation in the View component. In projects based on the Windows
Phone SharePoint List Application template, the ViewModels implement the code for binding
SharePoint list data retrieved from the Model component (that is, from an object of
the ListDataProvider class) to UI controls in a part of the View component (for example, the
Edit form). Depending on the kind of control used to display the data from the list and the type of
data (that is, whether the field type for the list item is text or numerical data or something like a
SharePoint Choice field), the ViewModel first processes or converts the data such that it can be
bound to a given UI control.
Software designs based on the MVVM pattern often confine business logic and validation
routines to the Model component of the pattern. In projects based on the Windows Phone
SharePoint List Application template, however, some operations that are typically considered
part of the Model component have been implemented in the ViewModel component to make it
more convenient for developers to extend the projects, at the cost of slightly blurring the
conceptual distinction between the data layer (Model) and the presentation layer (ViewModel).
For example, the ViewModel classes for editing and creating list items (that is,
the EditItemViewModel and NewItemViewModel classes) expose a Validate method that
developers can override to implement validation of data entered by users. (For information on
implementing data validation with these ViewModels, see How to: Implement business logic and
data validation in a Windows Phone app for SharePoint..md)
You will be glad to know that you can start your Android application development on either of
the following operating systems −
Second point is that all the required tools to develop Android applications are freely available and
can be downloaded from the Web. Following is the list of software's you will need before you
start your Android application programming.
Android Studio
Here last two components are optional and if you are working on Windows machine then these
components make your life easy while doing Java based application development. So let us have
a look how to proceed to set required environment.
If you are running Windows and installed the JDK in C:\jdk1.8.0_102, you would have to put the
following line in your C:\autoexec.bat file.
set PATH=C:\jdk1.8.0_102\bin;%PATH%
set JAVA_HOME=C:\jdk1.8.0_102
Alternatively, you could also right-click on My Computer, select Properties, then Advanced,
then Environment Variables. Then, you would update the PATH value and press the OK button.
On Linux, if the SDK is installed in /usr/local/jdk1.8.0_102 and you use the C shell, you would
put the following code into your .cshrc file.
Android IDEs
There are so many sophisticated Technologies are available to develop android applications, the
familiar technologies, which are predominantly using tools as follows
Android Studio
Eclipse IDE(Deprecated)
1. Universal Chargers
Apple’s Lightning connector works on all mobile Apple devices purchased after 2012. If your
Apple device is older than that, its charger won’t work on your newer device. The new Lightning
connector won’t work on devices other than Apple without a Lightning to Micro USB adapter.
Android, meanwhile, already uses the standardised and ubiquitous Micro USB connection for its
chargers.
4. Widgets
Widgets, or self contained programs, add functionality and flexibility to Android devices.
Android has far more to offer than Apple, such as Battery Widget Reborn and Circle Launcher.
5. Better Hardware
Some Android flagship phones compete well against iPhone, with better hardware. The Samsung
Galaxy S7 Edge, for example, out muscles the iPhone 6S Plus with a faster processor, more
RAM, increased battery capacity and better screen resolution.
9. Custom Keyboards
If you don’t like your Apple keyboard, your options are limited, whereas Android offers
alternative choices such as Swiftkey.
Android Development Tools (ADT) is a plugin for the Eclipse IDE that is designed to give you a
powerful, integrated environment in which to build Android applications.
ADT extends the capabilities of Eclipse to let you quickly set up new Android projects, create an
application UI, add packages based on the Android Framework API, debug your applications
using the Android SDK tools, and even export signed (or unsigned) .apk files in order to
distribute your application.
Developing in Eclipse with ADT is highly recommended and is the fastest way to get started.
With the guided project setup it provides, as well as tools integration, custom XML editors, and
debug output pane, ADT gives you an incredible boost in developing Android applications.
Categories:
Tags:
android,
Mobile,
smartphone,
Mobile apps,
tablet,
google
HideAdditional Details
Eclipse Versions:
Mars (4.5), Luna (4.4), Kepler (4.3), Juno (4.2, 3.8), Previous to Juno (<=4.1), Neon (4.6),
Oxygen (4.7), Photon (4.8), 2018-09 (4.9)
Platform Support:
Windows, Mac, Linux/GTK
Organization Name:
Google, Inc.
Date Created:
Wed, 2012-05-09 10:58
Development Status:
Production/Stable
License:
Apache 2.0
Date Updated:
Mon, 2019-02-04 13:50
Submitted by:
Eric Cloninger