0% found this document useful (0 votes)
15 views19 pages

Chapter 6.pptx

The document covers various topics related to graphics and multimedia, including multithreading, computer graphics, and Android graphics and multimedia. It explains concepts such as interactive and passive computer graphics, different animation systems in Android, and the use of the MediaPlayer class for audio/video playback. Additionally, it discusses location-based services and mobile agents in mobile computing.

Uploaded by

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

Chapter 6.pptx

The document covers various topics related to graphics and multimedia, including multithreading, computer graphics, and Android graphics and multimedia. It explains concepts such as interactive and passive computer graphics, different animation systems in Android, and the use of the MediaPlayer class for audio/video playback. Additionally, it discusses location-based services and mobile agents in mobile computing.

Uploaded by

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

Chapter 6 Graphics and multimedia Graphics

1
Outlines ➢ Multithreading

➢ Computer Graphics

➢ Android Graphics

➢ Multimedia

➢ Android Multimedia

➢ Mobile Agents and Peer-to-Peer Architecture

Complied by:Atinkut M.(MSc.,) 3/25/2024


Multithreading in Android
2
▪ Working on multiple tasks at the same time is Multitasking.

▪ In the same way, multiple threads running at the same time in a machine is called Multi-
Threading.

▪ Technically, a thread is a unit of a process.

▪ Multiple such threads combine to form a process.

▪ This means when a process is broken, the equivalent number of threads are available.
▪ For example, Autocorrect is the process where the software looks for the mistakes in the
current word being typed.

▪ Endlessly checking for the mistake and providing suggestions at the same time is an
exampleComplied
of aby:Atinkut
Multi-Threaded
M.(MSc.,) process. 3/25/2024
Computer Graphics
3
▪ Computer graphics deals with generating images and art with the aid of
computers.

▪ Today, computer graphics is a core technology in digital photography, film,


video games, digital art, cell phone and computer displays, and many specialized
applications.
Computer Graphics can be:

▪ Interactive Computer Graphics: In interactive computer graphics, users have


some control over the picture i.e. user can make any changes or alterations in the
produced image.
▪ At the hardware level, a computer receives input from interaction devices and
Complied by:Atinkut M.(MSc.,) 3/25/2024
outputs images to a display device.
Computer Graphics
4
▪ Passive computer Graphics: Passive computer graphics is an operation on
computer graphics that transfers automatically and without operator intervention.

▪ Noninteractive computer graphics or passive computer graphics involves


one-way communication between the computer and the user.

▪ The picture is produced on the monitor and the user does not have any control
over the produced picture.

Complied by:Atinkut M.(MSc.,) 3/25/2024


Android Graphics
5
▪ Android provides a huge set of 2D-drawing APIs that allow you to create graphics.

▪ Android has got visually appealing graphics and mind blowing animations.
▪ The Android framework provides a rich set of powerful APIS for applying
animation to UI elements and graphics as well as drawing custom 2D and 3D
graphics.

▪ Following are the three animation systems used in Android applications:


▪ Property Animation
▪ View Animation
▪ Drawable Animation
Complied by:Atinkut M.(MSc.,) 3/25/2024
6 Cont.
Property Animation

▪ Property animation is the preferred method of animation in Android.

▪ This animation is the robust framework which lets you animate any properties of
any objects, view or non-view objects.
▪ The android.animation provides classes which handle property animation.

Complied by:Atinkut M.(MSc.,) 3/25/2024


7 Cont.
View Animation
▪ View Animation is also called as Tween Animation.
▪ The android.view.animation provides classes which handle view animation.
▪ This animation can be used to animate the content of a view.

▪ It is limited to simple transformation such as moving, re-sizing and rotation, but


not its background color.

Complied by:Atinkut M.(MSc.,) 3/25/2024


8 Cont.

Drawable Animation:

▪ Drawable animation is implemented using the AnimationDrawable class.

▪ This animation works by displaying a running sequence of ‘Drawable’


resources that is images, frame by frame inside a view object.

Complied by:Atinkut M.(MSc.,) 3/25/2024


Multimedia
9▪ As the name implies, multimedia is the combination of the words "multi" and
"media," which refers to the various media (hardware/software) utilized for
information transmission.

▪ Multimedia is a technological way of presenting information that combines audio,


video, images, and animations with textual data.

▪ Examples include video conferencing, Yahoo Messenger, email, and the Multimedia
Messaging Service ( MMS Service (MMS).

▪ Multimedia is nothing but the processing and presentation of information in a more


structured and understandable manner using more than one media such as text,
graphics, animation, audio, and video.
Complied by:Atinkut M.(MSc.,) 3/25/2024
10
Android Multimedia
▪ Android provides many ways to control playback of audio/video files and
streams. One of this way is through a class called MediaPlayer.
▪ Android is providing MediaPlayer class to access built-in mediaplayer
services like playing audio,video e.t.c.
▪ In order to use MediaPlayer, we have to call a static Method create() of this
class.
▪ This method returns an instance of MediaPlayer class.
▪ Its syntax is as follows:

MediaPlayer mediaPlayer = MediaPlayer.create(this, R.raw.song);


Complied by:Atinkut M.(MSc.,) 3/25/2024
Cont.
11
▪ The second parameter is the name of the song that you want to play.

▪ You have to make a new folder under your project with name raw and place
the music file into it.

▪ Once you have created the Mediaplayer object you can call some methods to
start or stop the music.
▪ These methods are listed below.

▪ mediaPlayer.start();

▪ mediaPlayer.pause();
Complied by:Atinkut M.(MSc.,) 3/25/2024
12 Cont.
▪ On call to start() method, the music will start playing from the beginning.
▪ If this method is called again after the pause() method, the music would start
playing from where it is left and not from the beginning.
▪ In order to start music from the beginning, you have to call reset() method.
▪ Its syntax is given below.

▪ mediaPlayer.reset();

Complied by:Atinkut M.(MSc.,) 3/25/2024


Location
13
Types of Location-Based Services

▪ There are four primary types of location-based services: maps and


navigation;tracking services; information services; and applications.
▪ Maps and Navigation: maps, routing, and assisted navigation services
▪ Tracking Services: real-time traffic updates, vehicle tracking, friends and family
finder
▪ Information Services: local contacts search, city guides, user generated content
▪ Applications: context advertising, social networking

Complied by:Atinkut M.(MSc.,) 3/25/2024


14 Cont.
▪ For location-based services to operate, the following four basic components are
required:

▪ an application that uses location-based services;

▪ a positioning mechanism to collect geodata;

▪ a mobile network to transmit or receive data; and

▪ analytics software running on a remote server to compute and deliver relevant


data to the user based on geographic location.
Complied by:Atinkut M.(MSc.,) 3/25/2024
Cot.
15

Some Location-Based Services Applications:


▪ Location-based mobile advertising
▪ Recovering stolen assets with active RF
▪ Sending a mobile caller's location during an emergency call
▪ Tracking people on a mobile map application

Complied by:Atinkut M.(MSc.,) 3/25/2024


Mobile Agents and Peer-to-Peer Architecture
16 ▪ In Mobile Computing, Mobile Agents are the composition of computer software
and data that can autonomously move from one computer to another computer
and continue its execution on the destination computer.

▪ In other words, it is an autonomous program that is capable of moving from


host to host in a network and interact with resources and other agents.

▪ autonomous means the agents are not only motivated by the outside actions
initiated by the users or system but also they have internal events that decided
their performance and behavior.
▪ Mobile Agents are also called as transportable agents.

Complied by:Atinkut M.(MSc.,) 3/25/2024


Mobile Agents and Peer-to-Peer Architecture
17

Complied by:Atinkut M.(MSc.,) 3/25/2024


18
Packages
▪ A package is a container of a group of related classes where some of the classes are
accessible are exposed and others are kept for internal purpose.
▪ We can reuse existing classes from the packages as many time as we need it in our
program.
▪ Package names and directory structure are closely related.
▪ For example if a package name is college.staff.cse, then there are three
directories, college, staff and cse such that cse is present in staff and staff is
present inside college. Also, the directory college is accessible through
CLASSPATH variable

▪ Subpackages: Packages that are inside another package are the subpackages.
These are not imported by default, they have to imported explicitly.
Complied by:Atinkut M.(MSc.,) 3/25/2024
19

Complied by:Atinkut M.(MSc.,) 3/25/2024

You might also like