BIM493 – Mobile Programming I
Introduction
Prepared
Emin Talip DEMİRKIRAN
etd@[Link]
Mobile Programming I - Introduction
Quizzes - Assignments
• Copying homework/project is subject to the immediate fail
from the course for both students who give and take the copy.
• Those students will also be directed to the disciplinary
committee, and this may result send-away from the school for
6 months.
• Assignments will be submitted via the ESTUOYS Platform and
late assignments will not be accepted.
• NOTE: If there are also 2nd grade students in the course list,
please drop this course.
Mobile Programming I - Introduction
Grading Plan
• One Midterm: 20%
• Programming Assignments: 40%
• Final Exam (Term Project): 40%
Mobile Programming I - Introduction
Attendances
• Lessons will start at 14:00
• You don’t have to attend the classes but you are responsible
for visiting the website of the course regularly in each week.
• Announcements, assignments, and grades will be published
on the website.
• [Link]
• You can login to the website using your ESTU e-mail
account.
Mobile Programming I - Introduction
Mobile Computing
• Driven by technology and vision
– wireless communication technology
– global infrastructure
– device miniaturization
– mobile computing platforms
• The field is moving fast
• “People and their machines should be able to access information and
communicate with easily and securely, in any medium each other or combination
of media – voice, data, image, video, or multimedia – any time, anywhere, in a
timely, cost-effective way.”, Dr. G. H. Heilmeier, Oct 1992
• “The mobile device will be the primary connection tool to the Internet for most
people in the world in 2020.”, PEW Internet and American Life Project, Dec. 2008
Mobile Programming I - Introduction
Mobile Phone Evolution
Mobile Programming I - Introduction
A Brief History of Mobile Software Development
• “The Brick”
– The Motorola DynaTAC 8000X
• Dynamic Adaptive Total Area Coverage
– First commercially available cell phone
– 1983
– 13 x 1.75 x 3.5 inches in dimension
– 1.33Kg (2.5 pounds)
– Talk time around 30 minutes
– Retail price of $3,995
– Hefty monthly service fees
– Hefty per-minute charges
Mobile Programming I - Introduction
A History of Mobile (Cont’d)
• Early phones
– Used to make and receive calls
– Not full featured like today
– SEND, END, CLR buttons
– Some even had a contacts application
– Designed and developed by handset manufacturers
– Software developed in-house
– No opportunities for outside developers
Mobile Programming I - Introduction
A History of Mobile (Cont’d)
• Introduction of “time-waster” games
– Nokia famous for loading 1970s Snake game
– Others followed suit
• Pong
• Tetris
• Tic-Tac-Toe
• Changed how people thought of communication
• Customers wanted more
• Difficult for manufacturers to keep up with demand for software
Mobile Programming I - Introduction
Wireless Application Protocol (WAP)
• Their solution?
– The Internet!
• But wait! There are too many problems
– Direct phone access to the Internet didn’t scale well for mobile
– Internet used text, media, JavaScript, Flash, and other technologies
– Target resolution for the Internet was 800 x 600 pixels or higher
Mobile Programming I - Introduction
WAP (Cont’d)
• Phone displays were poor in 1996
– LCD ten-digit segmented display
– Later models added dot-matrix display
• Example: the slider phone
– Nokia 8110, “The Matrix Phone”
– Capable of displaying four lines of text
– 13 characters per line
Mobile Programming I - Introduction
WAP (Cont’d)
• Various mobile phone form factors
– The candy bar
– The slider
– The clamshell
Mobile Programming I - Introduction
WAP (Cont’d)
• Wireless Application Protocol (WAP)
standard emerged to address
– Postage-stamp-size low-resolution screens
– Limited storage
– Limited processing power
– Devices not capable of running browsers
– Bandwidth and data transmission high costs
Mobile Programming I - Introduction
WAP (Cont’d)
• What was WAP?
– Stripped-down version of HTTP
– A simple browser
– Wireless Markup Language (WML)
– Navigated a “simpler” Web
• Great for handset manufacturers
– Created one browser
– Relied on third-party developers to come up with user content
• Great for mobile operators
– Provided custom WAP portals
– Directed subscribers to content
– Raked in data charges
Mobile Programming I - Introduction
WAP (Cont’d)
• Early WAP developers
– CNN, ESPN, other news, stock, sports content providers
• Commercializing WAP was difficult
– No built-in billing
• Successes in personalization
– Wallpaper and ringtone apps
• Purchasing
– Order forms collected phone number and handset model
– Provider’s responsibility to deliver content compatible with phone
• Payment and verification
– SMS, EMS, MMS, WAP Push
Mobile Programming I - Introduction
WAP (Cont’d)
• Early-day difficulties
– Browsers slow and frustrating
– Try typing long URLs with numeric keypads
– Pages difficult to navigate
– Sites written once for all phones
• Content providers often used SMS short codes
instead of WAP sites
• Fell short of commercial expectations in the US
• WAP flourished in Japan
• Critics nicknamed WAP “Wait and Pay”
Mobile Programming I - Introduction
WAP (Cont’d)
• WAP and walled garden
– WAP portal operators limited accessible sites
– Funneled subscribers to operator’s preferred content
– Further discouraged third-party developers
Mobile Programming I - Introduction
Smart Devices
• A smart device is a device that is digital, active,
computer networked, is user reconfigurable and that
can operate to some extent autonomously.
• A smart device is a ubiquitous computing device: a
device that exhibits some properties of ubiquitous
computing including artificial intelligence.
• Mark Weiser categorized ubiquitous devices:
– Tabs: accompanied or wearable centimeter sized devices, e.g.,
smartphones, smart cards
– Pads: hand-held decimeter-sized devices, e.g., laptops
– Boards: meter sized interactive display devices, e.g., horizontal
surface computers and vertical smart boards.
Mobile Programming I - Introduction
Mobile Devices
• Multi-purpose ICT devices (e.g., personal office, mobile
phone, camera, etc.)
• Mobility: loosely-bound vs. tightly-bound to users
• Personalized
• Operates as a single portal, e.g., a Web portal.
– Internal application services
– External services typically accessed local area wireless network
• Intermittent resource Access
• A locus of control that resides in the smart device.
• Networked, distributed and transparently accessible.
• Context awareness
Mobile Programming I - Introduction
Smart Devices at Home/Office
Mobile Programming I - Introduction
Smart Devices on Move
Mobile Programming I - Introduction
Smart Devices on Road
Mobile Programming I - Introduction
Smart Devices for Intelligent Transportation
Mobile Programming I - Introduction
Habitat monitoring
Mobile Programming I - Introduction
Supply Chain Management
Mobile Programming I - Introduction
Smart Biomedical Systems
In-body smart devices
-sensors/monitoring devices
-drug delivery systems
-medical robots
-neural implants
Mobile Programming I - Introduction
Mobile Social Networking
Mobile Programming I - Introduction
Mobile Devices
Hardware: What is inside a Cellular Phone?
Oversimplifying…
Mobile Programming I - Introduction
Hardware: Reusing Cell Phone Frequencies
Great concept !!!
• The core idea behind cellular phones is the
division of a large city into small areas
called cells.
• Each hexagonal cell covers approx. 10 sq
miles (26 km2)
• Base stations use low-power transmitters,
therefore the same frequencies can be
reused in non-contiguous cells.
Mobile Programming I - Introduction
Trend: everything in one small device
Mobile Programming I - Introduction
Mobile Computing
• Human computes while moving
• Continuous network connectivity,
• Points of connection (e.g. cell towers, WiFi access point) might change
• Note: Human initiates all activity, (e.g launches apps)
• Wireless Network is passive
• Example: Using [Link] on SmartPhone
Mobile Programming I - Introduction
Related Concept: Location-Awareness
• Mobile computing = computing while location changes
• Location-aware: Location must be one of app/program’s inputs
• Different user location = different output (e.g. maps)
• E.g. User in Antalya gets different map from user in Eskişehir
Mobile Programming I - Introduction
Location-Aware Example
• Location-aware app must have different behavior/output for
different locations
• Example: letgo App
• Example search: Find PS4 games
• App checks user’s location
• PS4 games sellers close to user’s location are returned
Mobile Programming I - Introduction
Example of Truly Mobile App: Word Lens
• Translates signs in foreign
Language
• Location-dependent
because sign location
varies
• It was the old name, but
after Google bought it, it
was used as embedded in
google translate.
Mobile Programming I - Introduction
Isn’t it a great idea? XLR8 App
• Learn how to turn make your car sound like a race car as you drive, with
XLR8.
Mobile Programming I - Introduction
Some Mobile apps are not Location-Aware
• If output does not change as location changes, not location-
aware
• Apps run on mobile phone just for convenience
• Examples:
Mobile banking app Diet recording app
Mobile Programming I - Introduction
Ubiquitous Computing
• Collection of specialized assistants to assist human in tasks (reminders,
personal assistant, staying healthy, school, etc.)
• App figures out user’s current state, intent, assists them
• How? array of active elements, sensors, software, Artificial intelligence
• Extends mobile computing and distributed systems (more later)
• Note: System/app initiates activities, has intelligence
• Example: Google Now app, updates user on
• Driving time to work, home
• Weather
• Favorite sports team scores, etc.
Mobile Programming I - Introduction
Ubiquitous Computing Senses User’s Context
• Context?
• Human: motion, mood, identity, gesture
• Environment: temperature, sound, humidity, location
• Computing Resources: Hard disk space, memory, bandwidth
• Ubicomp example:
• Assistant senses: Temperature outside is -10°C (environment sensing) +
Human plans to go work (schedule)
• Ubicomp assistant advises: Dress warmly!
• Sensed environment + Human + Computer resources = Context
• Context-Aware applications adapt their behavior to context
Mobile Programming I - Introduction
Mobile Sensing the Human
• Environmental sensing is relatively straight-forward
• Use specialized sensors for temperature, humidity, pressure, etc
• Human sensing is a little harder (ranked easy to hard)
• When: time (Easiest)
• Where: location
• Who: Identification
• How: (Mood) happy, sad, bored (gesture recognition)
• What: eating, cooking (meta task)
• Why: reason for actions (extremely hard!)
• Human sensing (gesture, mood, etc) easiest using cameras
• Research in ubiquitous computing integrates
• location sensing, user identification, emotion sensing, gesture recognition,
activity sensing, user intent
Mobile Programming I - Introduction
Sensor
• Example: E.g. door senses only human motion, opens
• Sensor: device that can sense physical world, programmable, multi-
functional for various tasks (intrusion detection, temperature, humidity,
pressure, etc.)
• More generally means device that can take input from physical word
• Also includes camera, microphone, etc.
• Ubicomp uses data from sensors in phone, wearables (e.g. clothes),
appliances, etc.
Mobile Programming I - Introduction
Smartphone Sensing
• Smartphone used to sense human, environment
• Example: Human activity sensing (e.g. walking, driving,
climbing stairs, sitting, lying down)
• Example 2: Waze crowdsourced traffic
Mobile Programming I - Introduction
Sensor Processing
• Machine learning commonly used to process sensor data
• Action to be inferred is hand-labelled to generate training data
• Actual data is mined for combinations of sensor readings
corresponding to action
Mobile Programming I - Introduction
What Can We Detect/Infer using These Sensors
Mobile Programming I - Introduction
Internet of Things (IoT)
• IoT: Networked Smart Things (Devices)
• Smart things: Can be accessed, controlled over the network,
learns users patterns
Mobile Programming I - Introduction
Smart Phone - Overview
• A smartphone is a high-end mobile phone
• Combines the functions of
– mobile phone
– personal digital assistant (PDA)
– portable media players
– camera phones
– high-resolution touchscreens
– web browsers
– GPS navigation
– Wi-Fi and mobile broadband access
– etc.
• Feature phone vs. Smartphone
• Feature phone
– proprietary firmware & limited platforms
• Smartphone
– open and complete mobile operating system
– tightly integrate with the user interface and phone features
– relies on a more powerful application programming interface (API)
Mobile Programming I - Introduction
Smart Phones - Statistics
Mobile Programming I - Introduction
Number of Apps in App Stores
Mobile Programming I - Introduction
Number of Apps in App Stores
Mobile Programming I - Introduction
Number of Smartphone Users
Mobile Programming I - Introduction
Amazing Android Statistics
Mobile Programming I - Introduction
Elon Musk’s idea, the Everything App
Mobile Programming I - Introduction
Elon Musk’s idea, the Everything App
Mobile Programming I - Introduction
Elon Musk’s idea, the Everything App
Mobile Programming I - Introduction
Elon Musk’s idea, the Everything App
Mobile Programming I - Introduction
Elon Musk’s idea, the Everything App
Mobile Programming I - Introduction
Elon Musk’s idea, the Everything App
Mobile Programming I - Introduction
Web App vs. Mobile App
Mobile Programming I - Introduction
Web App vs. Mobile App
What is a Mobile App?
The mobile apps are built and designed to make them work on smartphones,
tablets, and other touch devices glitch-free. The apps are built for specific
operating systems such as Android, iOS, Windows, and others that are installed
from respective app stores to the devices. The mobile apps are made to work on
various screen sizes without any resolution issues.
What is a Web App?
The web apps are created to run in browsers and made mobile-friendly so that
they are accessible on mobile devices as well. In a nutshell, they are internet-
enabled applications that don’t require users to download and install on their
mobile devices, unlike mobile applications. No dependency on operating systems
improves their accessibility globally.
Mobile Programming I - Introduction
Web App vs. Mobile App
The way they are built
The mobile apps are built for specific platforms using particular languages, IDEs
(Integrated development environments), SDKs, tools, interface elements, and other
resources. For instance, the Android platform requires expert app developers to use
Java or Kotlin as a programming language, the Android Studio or Eclipse IDE as
IDE, and other tools. On the other hand, Apple requires companies to build iOS
apps using Objective C or Swift programming language, the Xcode IDE, and other
graphical elements according to Apple guidelines. Also, mobile apps can make use
of device-specific features such as GPS, Bluetooth, Cameras, and more.
As the web apps are not built for the specific operating systems, no standard SDKs
are used for their development. Instead, JavaScript, CSS, HTML, and Python
technologies are used for web app development. The huge community, video
tutorials, and extensive documentation help developers build the web app
effortlessly.
Mobile Programming I - Introduction
Web App vs. Mobile App
Internet connection availability
The mobile apps are downloaded on mobile devices and enable users to access
some features even in the absence of an internet connection. For instance, when
users update data in a mobile application when they are offline, it gets uploaded
when they enter an internet zone. The online and offline accessibility makes the
mobile app favorable to the users.
On the other hand, web apps cannot be accessed without an active internet
connection as they are accessed through the browser. However, the in-built servers
enable accessing saved and cached information during poor connection.
Mobile Programming I - Introduction
Web App vs. Mobile App
Time and money investment
Mobile app development is an expensive affair. It involves hiring expert app
developers for the development and designing to deployment and marketing of the
app for each platform. It means when the app is developed for multiple OSs, the
time and cost get increase accordingly.
The web apps are built once and they work on all devices through browsers, which
eliminates the need to develop and deploy the app repetitively. It makes the web
app development cost and time-savvy approach.
Performance level
The native mobile apps perform at speed as they are built for specific operating
systems and leverage device-specific features. The native-like performance
improves the user experience too.
The web apps also perform at par efficiently due to caching of text, images, and
other content that the user has accessed once before. Every time, the high-
performance goes in conjunction with internet speed.
Mobile Programming I - Introduction
Web App vs. Mobile App
Maintenance and updates
The consistent maintenance of mobile applications is important to keep them
updated with market trends and make them work on the latest OS that users are
using. Releasing the updates and making the users download the updates is a little
time-consuming, costly, and tedious endeavor.
The web apps release the updates automatically when the users use the app next
time without requiring users’ permission to download the updates. Mostly, the web
app updates get downloaded silently, but sometimes, a push notification is sent to
notify the users about the upcoming update.
Mobile Programming I - Introduction
Web App vs. Mobile App
App store submission
The mobile apps submitted on the Play Store or App store require developers to follow all the
guidelines and meet the requirements to get approval for app submission. The app stores
take time to review, approve, and upload the application.
On the flip side, the web apps are published on distribution platforms effortlessly from where
the users can download them. The distribution platform won’t take time and charge a fee for
web app publishing.
Security
The mobile apps are built using the best technologies and need to approve by the app stores
where the app is completely scanned by the IT engineers to ensure there are no security
glitches and dents that can put user data at stake.
Web apps are more susceptible to security risks as no app store screening is involved. Plus,
the updates are installed automatically without user permission required which increases the
chances of getting the device or other information hacked or becoming vulnerable.
Mobile Programming I - Introduction
Mobile Computing
Mobile Programming I - Introduction
What Is The Best Way For You?
Mobile Programming I - Introduction
Development Environments
• Most platforms have an SDK that you can download and build
against
• Every platform has an emulator that you can use to test your
apps
• Most emulators are configurable to match a variety of mobile
devices
– Various screen sizes, memory limitations, tablets, etc.
– In practice, emulators quite limited
IDE - integrated development environment that provides tools to allow a
developer to write, test and deploy applications into the target platform
environment.
Mobile Programming I - Introduction
Native Development Environments
Mobile Programming I - Introduction
Why Cross-platform Framework?
• Cost-effectiveness
– It enables investing just once and in a single team.
• One technology stack
– Developers can use a single technology stack for a broad variety of engineering tasks.
• Reusable code
– Up to 90 percent of codebase can be reused from one platform to the other, instead of designing
the same functionality in another language.
• Easy maintainability
– It’s easier to maintain and deploy changes because there is no need to maintain applications on
each platform separately.
Cross-platform mobile development has long been a viable alternative to fully native engineering. Following
the classic native approach, you produce two different applications: one written in Java for Android and the
other in Swift or Objective-C for iOS. This path is pretty time-consuming and expensive because the same code
must be written twice. On the other hand, it ensures the highest code consistency with the original app look
and feel.
Mobile Programming I - Introduction
Reasons Why Flutter is Setting the Trend in Mobile App Development
Mobile Programming I - Introduction
Flutter
Mobile Programming I - Introduction
Fast Development
Mobile Programming I - Introduction
How Flutter Works?
Mobile Programming I - Introduction
Why Flutter?
Mobile Programming I - Introduction
Questions?