Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

Popular Media formats:

File Types
Format Encoder Decoder Details
Container Formats
AAC LC YES YES Support for
mono/stereo/5.0/5.1 content
HE-AACv1 with standard sampling rates
Android 4.1+ YES
(AAC+) from 8 to 48 kHz. • 3GPP (.3gp)
Support for stereo/5.0/5.1 • MPEG-4 (.mp4,
HE-AACv2
content with standard .m4a)
sampling rates from 8 to 48 • ADTS raw AAC
(enhanced YES
AAC+) (.aac, decode in
kHz.
Android 3.1+, encode
Support for up to 8ch in Android 4.0+, ADIF
content with standard not supported)
xHE-AAC Android 9+
sampling rates from 8 to 48 • MPEG-TS (.ts, not
kHz seekable, Android
AAC ELD Support for mono/stereo 3.0+)
(enhanced content with standard
Android 4.1+ Android 4.1+
low delay sampling rates from 16 to
AAC) 48 kHz
4.75 to 12.2 kbps sampled • 3GPP (.3gp)
AMR-NB YES YES
@ 8kHz

Media Player Life Cycle:

Methods States
1. setAudioSource()/setVideoSource() Initialized
2. setOutputFormat() Data source configured
3. prepare() Prepared
4. start() Recording
5. stop() Initial
6. release() Released
1. It is used to initialize the media to be recorded.
2. It is used to configure/set the output file format.
3. Now the media is ready to be recorded.
4. Start is used to start the action for recording.
5. Stop is used to pause the recording.
6. Final state is released which is used to finalize the recorded media.
Multimedia and supporting devices:

Multimedia is a form of communication that uses a combination of different content forms such
as writing, audio, images, animations, or video into a single interactive presentation, in contrast
to traditional mass media, such as printed material or audio recordings, which features little to no
interaction between users.
Input devices that required while working with multimedia:
 Keyboard- Most common and very popular input device is keyboard. The keyboard helps in
inputting the data to the computer.
 Mouse - Mouse is most popular Pointing device. It is a very famous cursor-control device. It is
a small palm size box with a round ball at its base which senses the movement of mouse and
sends corresponding signals to CPU on pressing the buttons.
 Joystick - Joystick is also a pointing device, which is used to move cursor position on a
monitor screen. It is a stick having a spherical ball at its both lower and upper ends.
 Light Pen - Light pen is a pointing device, which is similar to a pen. It is used to select a
displayed menu item or draw pictures on the monitor screen. It consists of a photocell and an
optical system placed in a small tube.
 Track Ball - Track ball is an input device that is mostly used in notebook or laptop computer,
instead of a mouse. This is a ball, which is half inserted and by moving fingers on ball, pointer
can be moved.
 Scanner - Scanner is an input device, which works more like a photocopy machine. It is used
when some information is available on a paper and it is to be transferred to the hard disc of the
computer for further manipulation.

Playing video/Audio using an Intent:

Intent i = new Intent(Intent.ACTION_VIEW);


Uri uri = Uri.parse (“http://www.mobmusicstore.com/music.mp3”);
i.setDataAndType(uri,“audio/*”);
startActivity(i);

Intent i = new Intent(Intent.ACTION_VIEW);


Uri uri = Uri.parse (“http://www.mobmusicstore.com/video.mp4”);
i.setDataAndType(uri,“video/*”);
startActivity(i);

Benefits of using GPS:

1. GPS is extremely easy to navigate because it tells you to direction for every turns you’re
taking otherwise you need to fancy reach to your destination.
2. GPS works altogether weather so you would like to not worry of climate as in other
navigating devices.
3. GPS costs you very low as compared other navigation systems.
4. Most attraction of this technique is its100% coverage on earth.
5. It also helps you to look nearby restaurants, hotels and gas stations and is extremely
useful for a replacement place.
6. Due to its low cost, it’s very easy to integrate into other technologies like telephone.
7. System is updated regularly by United States government and hence is extremely
advance.

Location service in Android:

1. GPS Functionality: ...


2. Maps And Directions: ...
3. Search And Discovery: ...
4. Personalization: ...
5. Social Features: ...
6. Augmented Reality: ...
7. Integration With Other Apps: ...
8. Security And Privacy:

How to set up Google Map in Android:

To build apps with Maps and related capabilities, we have to first ensure that the Google Maps
Android API is available in the app development environment. This can be done by installing the
Google Play services SDK. Once this is done, we have to obtain a map key from Google APIs
console, so that the app can access Google Maps servers through the Google Maps Android API.
In order to get a map key, we need to create a project in Google APIs console (requires a Google
account). Once the project is created, we need to enable the Google Maps Android API (present
in the APIs subsection of APIs & auth section) in it. Following this, we need to create a new
Android key by providing, package name, and Secure Hash Algorithm 1 (SHA1) fingerprint of
our app in the Credentials sub-section of APIs & auth section.

Set up the development environment.

1. Set up an Android device.


2. Create a Google Maps project in Android Studio.
3. Set up your Google Cloud project.
4. Add the API key to your app.
5. Look at the code. Maps activity file. Module Gradle file. XML layout file.
6. Deploy and run the app.

Cloud Computing:

The term Cloud refers to a Network or Internet. In other words, we can say that Cloud is
something, which is present at remote location. Cloud can provide services over public and
private networks, i.e., WAN, LAN or VPN. Cloud computing offers platform independency, as
the software is not required to be installed locally on the PC. Hence, the Cloud Computing is
making our business applications mobile and collaborative. Cloud Computing has numerous
advantages. Some of them are listed below –
 One can access applications as utilities, over the Internet.
 One can manipulate and configure the applications online at any time.
 It does not require to install software to access or manipulate cloud application.
 Cloud Computing offers online development and deployment tools, programming runtime
environment through PaaS model.
Security and Privacy: It is the biggest concern about cloud computing. Since data management
and infrastructure management in cloud is provided by third-party, it is always a risk to handover
the sensitive information to cloud service providers.
 Lock In: It is very difficult for the customers to switch from one Cloud Service Provider (CSP)
to another. It results in dependency on a particular CSP for service

Sensors in Android:

Motion Sensors: 1 Accelerometer: An accelerometer is a motion sensor that is typically used to


measure acceleration in any of the three dimensions. It can be used to detect events such as shake
and move. 2 Gyroscope: While an accelerometer measures linear acceleration, a gyroscope that
is also a motion sensor can measure angular acceleration. It can be used to detect events such as
tilt and rotate. Therefore, it is more useful for gaming apps where there is a need for high-
precision tracking of rotation, roll, or yaw.
Position Sensors: 1. Proximity sensor: A proximity sensor is a position sensor that is used to
determine how close the device is to user’s face, and is most commonly used to turn off the
screen when user answers a call. This not only ensures longer battery life but also prevents any
accidental inputs. 2. Magnetometer: A magnetometer is also a position sensor that can detect
device orientation with respect to the earth’s magnetic field, or in simple terms, it can detect
which direction is north.
Environment Sensor: Light sensor: A light sensor is an environment sensor that is used to
provide appropriate screen brightness by optimizing it to the external environment. This not only
saves power but also provides a soothing experience to the user’s eye.

Using Sensors in Android:

Determine which sensors are available on a device.  Determine an individual sensor's


capabilities, such as its maximum range, manufacturer, power requirements, and resolution. 
Acquire raw sensor data and define the minimum rate at which you acquire sensor data. 
Register and unregister sensor event listeners that monitor sensor change.

Monitoring of Sensors in Android:


Once availability of the required sensor is determined, the next step is to enable the sensor and
start monitoring it. This is achieved by registering the sensor using the SensorManager API, and
implementing the SensorEventListener interface.

Ex: The accelerometer is registered in the app using the registerListener() method of the
SensorManager . This method accepts an implementation of the SensorEventListener
interface. This interface declares two methods: onAccuracyChanged() and
onSensorChanged(). The onAccuracyChanged() method gets invoked whenever the
sensor in use reports a change in the accuracy value. But most of the time we would be
making use of the onSensorChanged() method that keeps receiving the sensor data from
the sensor. The frequency of invocation of the onSensorChanged() method is determined
using the last argument supplied to the registerListener() method.

Testing in Android:

Functional Testing: As a type of mobile testing, functional testing ensures that the application
works as per the requirements. We check that all the functionalities are working as intended.

Usability Testing: Testing mobile applications checks for a good user experience, good standard
layout, intuitiveness of the UI, and users’ ease of use.

Compatibility Testing: Compatibility testing ensures whether the mobile app is working and
compatible with all the different types of mobile devices you aim to support. This testing is
crucial to ensure standard usage and performance of your app on various devices, operating
systems, hardware, browsers, and their different versions.

Performance Testing: Performance testing ensures that the mobile application remains stable,
functional, and responsive under an increased workload.

Codec and Multimedia:


Compressor and De-compressor: Basically it is used to compress and de-compress the
multimedia file. Due to compressing, the file consumes lesser space in memory and
transportation becomes easy.
Before playing any multimedia file in and android media player the file path is set and de-
compressed.

When a user taps an action button in the system media controls, the system's MediaController
sends a playback command to your MediaSession. The MediaSession then delegates those
commands down to the player. Commands defined in Media3's Player interface are automatically
handled by the media session.

Google Play Service: Google Play services is a platform that enables an app to access Google
services such as Google Maps, Google+, and Location services. These services are not included
in the Android platform. Rather, they work in a client–server model, where in the server
component of these services is hosted by Google servers, and the client libraries are provided for
each such service, using which a developer implements the client-side functionality to interface
with these services. From an end-user’s perspective, it is just an app (Google Play services) that
resides on the user’s device. This app runs in the background to connect to Google services,
either to leverage the functionality of individual services in an app, or to receive the latest
updates of these services, via Google Play Store app. The benefit of receiving the latest updates
on the user’s device is that this app is always up-to-date with the most recent release of Google
Play services, irrespective of the Android version of the device. It is this app that glues together
the client and server components of Google Play services.

You might also like