0% found this document useful (0 votes)
11 views

Introduction To Mobile Programming

Uploaded by

anjeru
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views

Introduction To Mobile Programming

Uploaded by

anjeru
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 27

DMT 051:

Mobile
Applications
Development
By: Ambrose Njeru [BSc, Msc ComputerScience] 1
Objectives
 Understand the basic components of an Android
application.
 Define the Android application lifecycle.
 Understand the basics of event handling in Android.
 Demonstrate basic skills of using an integrated
development environment (Android Studio) and
Android Software Development Kit (SDK) for
implementing Android applications.
 Demonstrate through a simple application the
understanding of the basic concepts of Android.
 Use Android’s APIs for data storage, retrieval, user
preferences, files, databases, and content providers.
By: Ambrose Njeru [BSc, Msc ComputerScience] 2
Introduction
 A mobile application, most commonly referred to as
an app, is an application software designed to run on
a mobile device, such as a smartphone or tablet
computer.
 Mobile applications frequently serve to provide users
with similar services to those accessed on PCs.
 Apps are generally small, individual software units
with limited function.
 A mobile application also may be known as an app,
web app, online app, iPhone app or smartphone app.
 To begin with, there are different types of Mobile
applications:
By: Ambrose Njeru [BSc, Msc ComputerScience] 3
Introduction

By: Ambrose Njeru [BSc, Msc ComputerScience] 4


Types of Mobile Applications
1. Native Applications:
 These are applications developed to be used on a
particular platform or operating system such as
Android, iOS etc.
 Written in languages that the platform accepts.
 They are also built using the specific Integrated
Development Environment (IDE) for the given
operating systems, such as Android Studio for
Android Apps and XCode for iOS Apps.
 The principal advantage of native apps is that they
optimize the user experience. By being designed
and developed specifically for that platform, they
look and perform better.
By: Ambrose Njeru [BSc, Msc ComputerScience] 5
Types of Mobile Applications
 Native Apps are usually built using either of the
following languages;
 Swift or Objective C for iOS applications
 Java, Kotlin for Android applications
 C# or VB.NET for Windows applications.
 Pros
 They are very fast and responsive because they
are built for that specific platform.
 They have the best performance.
 They are more interactive, intuitive and run
much smoother in terms of user input and
output.
By: Ambrose Njeru [BSc, Msc ComputerScience] 6
Types of Mobile Applications
 Cons
 They are considerably more expensive to
develop compared to cross-platform and web
applications.
 They require more time to develop as one
application has to be written in different
languages for different platforms.
 They have a higher cost of maintenance and
pushing out updates, due to multiple source
code bases.

By: Ambrose Njeru [BSc, Msc ComputerScience] 7


Types of Mobile Applications
2. Cross Compilation Applications:
 Separates build environment from target
environment.
 Platform-independent API using a mainstream
programming language like JavaScript, Ruby or
Java.
 The cross-compiler then transforms the code into
platform-specific native apps.
 The software artefact generated can be deployed
and executed natively on the device.

By: Ambrose Njeru [BSc, Msc ComputerScience] 8


Types of Mobile Applications
 Pros:
 Improved performance and User Experience.
 Full access to functionalities of underlying
mobile OS and device specific capabilities.
 Cons:
 Highly complex as cross-compilers are difficult
to program.
 Need to be kept consistent with fragmented
mobile platforms and operating systems
available.

By: Ambrose Njeru [BSc, Msc ComputerScience] 9


Types of Mobile Applications
3. Hybrid Applications:
 Applications developed to be used across multiple
platforms i.e can be deployed on both iOS and
Android platforms.
 Hybrid mobile applications are built in a similar
manner as websites. Both use a combination of
technologies like HTML, CSS, and JavaScript.
 However, instead of targeting a mobile browser,
hybrid applications target a WebView hosted
inside a native container. This enables them to do
things like access hardware capabilities of the
mobile device.
By: Ambrose Njeru [BSc, Msc ComputerScience] 10
Types of Mobile Applications
 Pros
 Adaptable to multiple platforms, as the same
code can be re-used for Android, iOS, and
Windows.
 Unified and less expensive development, as the
app only has to be developed once using one
code base.
 Faster development time when compared to
native apps as only one development process is
involved.

By: Ambrose Njeru [BSc, Msc ComputerScience] 11


Types of Mobile Applications
 Cons
 Slower app performance when compared to
Native Apps, because the hybrid framework
acts as a bridge to communicate with the
phone’s native features.
 Apps with heavy animations and sound effects
aren’t as seamless as their native counterparts.
4. Progressive Web Applications (PWAs):
 This is a web app that uses modern web
capabilities to deliver an app-like experience to
users without requiring them to install an app
from the AppStore/PlayStore.
By: Ambrose Njeru [BSc, Msc ComputerScience] 12
Types of Mobile Applications
 They are usually accessible by a web URL which
can always be pinned or saved on your phone’s
home screen.
 PWAs are built using HTML, CSS, JavaScript also.
 Pros
 Easy to build.
 Easy to maintain.
 Works offline and performs well on low-quality
networks.
 Build one app for all platforms —iOS, Android,
etc. as long as it can run a browser.

By: Ambrose Njeru [BSc, Msc ComputerScience] 13


Types of Mobile Applications
 Cons
 Needs a browser to run. Users have to take
another step to type in the URL of the app
which amounts to a poor user experience.
 Web apps are less interactive and intuitive than
native apps.

By: Ambrose Njeru [BSc, Msc ComputerScience] 14


Why Mobile Applications?
1. Smartphones are everywhere and always with user.
2. Manifoldness of possibilities.
3. Proximity to customers.
4. Unmatched user-experience.
5. Better visibility

By: Ambrose Njeru [BSc, Msc ComputerScience] 15


Why Mobile Applications?
 Mobile Apps : Business Perspective
 Reaching to more users.
 Growing number of smartphones.
 Increasing affordability of smartphones.
 Increasing mobile internet speed and quality.
 Catching users in more engaging way.
 Better sales conversion rate.
 Better collection of user’s contextual data.
 Ease of use : Better productivity.
 Most rural users access the internet from their
mobile handsets.

By: Ambrose Njeru [BSc, Msc ComputerScience] 16


Why Mobile Applications?

By: Ambrose Njeru [BSc, Msc ComputerScience] 17


Why Mobile Applications?
 Mobile Apps : User Perspective
 Ease of use.
 One device works for everything.
 Health.
 Education.
 Shopping.
 Communication.
 Entertainment.
 Government Services.
 Low cost.
 Longer battery life.
 Relatively much easier learning curve.
By: Ambrose Njeru [BSc, Msc ComputerScience] 18
Why Mobile Applications?
 Mobile Apps : Developer Perspective
 Multiple platforms.
 Different screen sizes.
 Screen density.
 User interaction.
 Limited hardware resources.
 Sensors.
 Integration with Phone Functions.

By: Ambrose Njeru [BSc, Msc ComputerScience] 19


Why Android?

By: Ambrose Njeru [BSc, Msc ComputerScience] 2


0
Why Android?

By: Ambrose Njeru [BSc, Msc ComputerScience] 21


Why Android?

By: Ambrose Njeru [BSc, Msc ComputerScience] 22


Android Development
 There are 5 key Android fundamentals that you
should know before you begin programming an
Android app:
1. Master the Language.
 Java and XML are the two main programming
languages used in Android App development.
Knowledge and mastery over these programming
languages are, the prerequisites to developing an
Android app.
 Some of the fundamentals of the Java
programming language include:
 Packages.
By: Ambrose Njeru [BSc, Msc ComputerScience] 23
Android Development
 Objects & classes.
 Inheritance & interfaces.
 Data types.
2. Familiarity with the Right Development Tools
and Environment.
 Familiarize yourself with the build automation
tools as well as the integrated development
environment before you start developing your
app.
 You can use Android app studio IDE or the Eclipse
for the tools; they will help you learn the basics
and many other things that will help improve your
code. By: Ambrose Njeru [BSc, Msc ComputerScience] 24
Android Development
3. Knowledge of the Application Components.
 Application components are the essential
building blocks of Android app development.
 Each of the components is a different point by
which the system can enter your app
 There are five different types of app components
each serving a distinct purpose with a distinct life
cycle which defines how it is created and
destroyed.
 They include: Activities, Services, Content
providers, Broadcast receivers and Activating
components.
By: Ambrose Njeru [BSc, Msc ComputerScience] 25
Android Development
4. Awareness over Fragmentations, Android
Application, Threads, Loaders and Tasks.
 Android is a fragmented market with many
different devices and operating system versions.
 You require appropriate fonts, assets and layouts
that will help in ensuring that the best possible
experiences in the various screen characteristics
are given.
 You should also consider the array of android
supported sensors or UI facilities. All android
apps have an application class, one or more
activities and one or more fragments.
By: Ambrose Njeru [BSc, Msc ComputerScience] 2
6
Android Development
5. Making the Right Choice over Needed Tools.
 The simple tools that you need for Android app
development are just a Mac or Windows PC, any
type of Linux, and the Android SDK—all of which
are free.

By: Ambrose Njeru [BSc, Msc ComputerScience] 27

You might also like