0% found this document useful (0 votes)
8 views26 pages

Networking Slides

The document discusses mobile computing, focusing on how mobile devices connect to networks and the importance of networking for mobile applications. It covers various network types, protocols, and security measures, along with real-life applications and future trends in mobile networking. Additionally, it includes technical details on checking internet connectivity and peer-to-peer communication methods.

Uploaded by

233518
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views26 pages

Networking Slides

The document discusses mobile computing, focusing on how mobile devices connect to networks and the importance of networking for mobile applications. It covers various network types, protocols, and security measures, along with real-life applications and future trends in mobile networking. Additionally, it includes technical details on checking internet connectivity and peer-to-peer communication methods.

Uploaded by

233518
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 26

01.

Networking

Mobile Computing
Submitted To:
Prof.Dr.Kaleem Razzaq Malik
Group Members

• 233518(Tooba Ghafar)
• 233520(Komal Naz)
• 233582(Amna Sajjad)
• 233522(Fatima Rani)
• 233552(Malaika Batool)
Introduction

• Mobile computing means using computers and mobile


devices like smartphones and tablets while moving.
It includes:
• Mobile devices (like phones, tablets)
• Wireless networks (like Wi-Fi, 4G)
• Mobility (ability to move freely and stay connected)
Real-life examples: Online shopping apps, mobile
banking, Google Maps, video calls.
Objectives
• To understand how mobile devices connect to networks
Learn how phones and tablets connect using Wi-Fi, 4G, Bluetooth, etc.
• To study how networking helps mobile apps work
Find out how apps like WhatsApp, Zoom, and Uber send and receive data.
• To learn about different network types and protocols
Know the difference between Wi-Fi, 5G, and how data is sent using rules
(like TCP/IP, MQTT).
• To find out how to keep mobile networks safe
Learn about common problems and how to protect data with VPNs and
encryption.
• To see how networking is used in real projects
Build or show a simple app that uses networking (like a chat app or IoT
control).
• To explore future technologies in mobile networking
Discover what’s coming next, like 6G, smart networks, and faster internet.
Checking Internet
Connectivity in Android

Function: isNetworkConnected()
•Purpose: Check if the device has an active internet
connection.
•Steps:
1.Get the ConnectivityManager from the
system service.
2.Obtain the currently active network.
3.Get network capabilities for the active
network.
4.Return true if the network has the
NET_CAPABILITY_INTERNET.
Using the
Connectivity Check

Code Execution Flow:


•If Connected:
•Asynchronously sends a network request using
doAsync { Request(url).run() }.
•Shows a toast message after the request.
•If Not Connected:
•Displays an alert dialog notifying the user of no
internet connection.
01.

Importance of
Networking

• Networking helps mobile devices to:


• Talk to each other (e.g., messages, calls)
• Send/receive data (e.g., videos, files)
• Access the internet and cloud services (e.g.,
Google Drive)
Without networking, mobile apps would not work
properly.
Mobile Network Types

• Mobile devices connect through:


• Cellular Networks (3G, 4G, 5G – used by SIM
cards)
• Wi-Fi (wireless local networks at home, offices)
• Bluetooth (short-distance connection like
earphones)
• Satellite (used in remote areas)
Include a table showing speed, range, and use for
each.
Simple Weather
Forecast App

•How It Works – Code Explanation


•cityEditText: User enters city name
•fetchWeatherButton: Triggers weather fetch
•fetchWeather():
•Builds API URL using city name and API key
•Sends a request to OpenWeatherMap
•Reads and parses JSON response
•Displays temperature, humidity, and
description in weatherTextView
Layout Design
(activity_main.xml)
Layout Design (activity_main.xml)
UI Elements:
•EditText – input for city name
•Button – to get weather
•TextView – to show weather result
Design:
•Simple LinearLayout with padding and
centered content
•Clean and user-friendly interface
Output
Cellular Network Evolution

• History of mobile networks:


• 1G: Only voice, poor quality
• 2G: Added SMS
• 3G: Better internet
• 4G: Fast internet, video calls
• 5G: Superfast, low delay
Use a timeline diagram.
01.

Peer-to-Peer
Communication
• Devices can talk directly to each other without
internet:
• Wi-Fi Direct – for file sharing
• Bluetooth – short-range chatting
• P2P Chat Apps – LAN-based apps for local
messaging
Encrypted Messaging
Over LAN
Objective:
•Enable private LAN chat between Android
devices.
•Use AES encryption for secure messaging.
•Discover nearby devices using UDP broadcast.
Device Discovery:
•Devices send a UDP packet:
"LAN_CHAT_DISCOVERY" to
255.255.255.255:8888.
•Other devices listen on port 8888 and respond
with their IP.
•Symmetric algorithm encrypts/decrypts
messages.
•Ensures message privacy over LAN.
• TCP Socket Communication:
• After discovery, a TCP connection is made.
• Messages are encrypted → sent via TCP →
decrypted and shown.
• Why TCP?
• Ensures reliable, ordered message delivery.
• Threads are used for network I/O to keep UI
responsive.
• Main Features & Ouput:
• Chat window with encrypted message
display.
• "Discover" button sends UDP broadcast.
• List of discovered devices.
• Click a device → Start secure chat.
TCP/IP in Mobile
Networking
• TCP/IP in Mobile Networking
• Content:
TCP/IP is the rulebook for sending data.
4 layers:
• Application Layer – Apps (e.g., WhatsApp)
• Transport Layer – Ensures data is sent fully (TCP)
• Internet Layer – Finds the best path (IP)
• Network Layer – Sends the data over Wi-Fi or 4G
Wireless Technologies
in Mobile Computing

• Comparison:
• Wi-Fi – Medium speed/range, used at home
• Bluetooth – Short range, for file sharing or
headphones
• NFC – Very short range, for payments
• LTE/4G/5G – Wide range, fast internet
Use a table or chart.
01.

IP Addressing and Mobility

• Every device has an IP address (like a home address).


• Static IP – Fixed address
• Dynamic IP – Changes every time you connect
• Mobile IP – Helps you stay connected as you move across
networks
Protocols Used in Mobile
Networking
•HTTP – Browsing websites
•MQTT – IoT communication (like smart devices)
•CoAP – Lightweight for IoT
•DHCP – Gives IP addresses to devices
•DNS – Converts website names to IP addresses
All help devices communicate properly.
Network Challenges in
Mobile Environments

• Problems mobile users face:


• Handoff delay – connection drops when
changing towers
• Low bandwidth – slow internet
• Signal interference – many devices cause
problems
• Weak signals – especially in remote areas
Cloud Integration in Mobile
Networking

• Mobile apps connect to cloud servers for:


• Saving files (Google Drive, Dropbox)
• Backup (photos, contacts)
• Remote computing (games, storage)
Cloud makes mobile apps powerful and connected.
Mobile Hotspots and
Tethering

•Hotspot – Your phone shares its internet


with others
•Tethering – Connect via USB/Bluetooth
Security tip: Use passwords to prevent
unauthorized access.
IoT and Mobile Networking Real-Time Applications

• Mobile devices can control smart Examples of apps needing real-time


devices like: networking:
•WhatsApp – Instant chat
• Smart bulbs, fans, cameras
They use MQTT or HTTP to talk •Zoom – Video calls
to the cloud and send commands. •Uber – Live location tracking
They depend on strong and fast networks.
01.

Future Trends

• What’s coming next:


• 6G – Even faster and smarter
• Edge Computing – Processing near the
user
• AI in networking – Smarter routing
and management
• Ultra-low latency – Instant response
for games, health, etc.
Thank you!
CREDITS: This presentation template was
created by Slidesgo, and includes icons,
infographics & images by Freepik

You might also like