Value Added Course
Value Added Course
implementation, and use of local, wide-area, and mobile networks that link computers
together. The Internet itself is a network that makes it feasible for nearly all computers
in the world to communicate.
A communication Network is a collection of methods that users employ to pass
on valuable information. The communication network is the sum of all the means and
methods that an organization employs to communicate.
A state machine reads a set of inputs and changes to a different state based on
those inputs. A state is a description of the status of a system waiting to execute a
transition. A transition function reads an input and determine the next state. A program
cannot be in two states at any given time.
Let’s start with an example: fetching data from an endpoint. The program can have 3
states: loading, success, and error.
A state machine also has a starting state, which coincidentally here is named “not
started” but you can name it anything you want. Here, the starting state indicates that
the API is not called yet.
When a user opens a screen, the screen begins fetching the data, so the state moves to
“loading”.
If the API call returns success/error, the state moves
to SUCCESS/ERROR respectively.
After that, if the user refreshes the screen, the state goes back to LOADING.
We could call the annotation “fetch”, “error”, “success”, “refresh” an event or input.
The transition function receives the current state and an input and determines the next
state.
Any meaningful program always has side-effects. These side-effects are the result of
transition from state A to B. For example, when the state changes
from NOT_STARTED to LOADING via the event fetch, the program shows progress
bar to the screen and fetches some data from the server.
Android lets your application connect to the internet or any other local network and
allows you to perform network operations. A device can have various types of network
connections.
Before you perform any network operations, you must first check that are you
connected to that network or internet etc. For this android
provides ConnectivityManager class. You need to instantiate an object of this class by
calling getSystemService() method.
Android provides HttpURLConnection and URL class to handle these operations. You
need to instantiate an object of URL class by providing the link of website. Its syntax is
as follows −
Telephony
Telephony Applications:
Dialer
Contacts
Messaging — SMS/MMS(BasicSmsReceiver)
Settings app — a) Airplane mode b) APN settings C)Network selection (auto/manual)
d) Call settings, such as, call waiting, call forwarding/diverting e) CLIR f)FDN
SIM Application Toolkit (SAT)
Browser
CellBroadcastReceiver
CarrierConfig
PhoneCommon
Platform Diversity: The two dominant mobile platforms are Android and iOS, each
with a significant user base. Developers can choose to specialize in one platform or
develop cross-platform applications using frameworks like React Native, Flutter, or
Xamarin.
Mobile apps span various categories such as social networking, e-commerce, gaming,
productivity, health and fitness, entertainment, education, travel, and more. Developers
can focus on a specific category or diversity their skill set across multiple types of
apps.
Wireless Connectivity
Wireless communications is the transmission of voice and data without cable or wires.
In place of a physical connection, data travels through electromagnetic signals
broadcast from sending facilities to intermediate and end-user devices. A wireless
network is a grouping, or network, of multiple devices where data is sent and received
over radio frequencies.
Four Layers
Communication Processor
It is a bridge between the hardware and Android phone framework services. Rather we
say, it is a protocol stack for Telephone. It has two main components that are:
RIL Daemon– It starts when the android system starts. It reads the system properties
to find a library that is to be used for Vendor RIL.
Vendor RIL– It is also known as RIL Driver. It can be understood as a library that is
specific to each modem
Framework Services
The telephony Framework starts and initializes along with the system. All the queries
by Application API are directed to RIL using these services.
Application
These are the Application UI related to telephony such as Dialler, SMS, MMS, Call
tracker, etc. These applications start with the android system boot up. These are tied
with framework services of telephony.
Notification
A notification is a message that Android displays outside your app's UI to provide the
user with reminders, communication from other people, or other timely information
from your app. Users can tap the notification to open your app or take an action
directly from the notification.
Wear OS devices
If the user has a paired Wear OS device, all your notifications appear there
automatically, including expandable detail and action buttons.
You can enhance the experience by customizing the appearance of your notifications
on wearables and by providing different actions, including suggested replies and voice
input replies. For more information, see how to add wearable-specific features to your
notification.
Alarms
Alarms (based on the Alarm Manager class) give you a way to perform time-based
operations outside the lifetime of your application. alarm to initiate a long-running
operation, such as starting a service once a day to download a weather forecast.
You can use them in conjunction with broadcast receivers to schedule jobs or Work
Requests to perform other operations.
They operate outside of your application, so you can use them to trigger events or
actions even when your app is not running, and even if the device itself is asleep.
They help you minimize your app's resource requirements. You can schedule
operations without relying on timers or continuously running services.
Memory Management
Android memory management is a process that ensures that an Android device runs
smoothly and efficiently by managing the allocation and release of memory resources.
Memory Leaks: Memory leaks occur when an app retains memory even when it is no
longer needed. This can cause performance issues and eventually lead to an app crash.
To prevent memory leaks, developers should ensure that all objects and resources are
properly released when they are no longer needed. This can lead to an increase in
memory usage and potentially cause your application to crash. Here are a few ways to
prevent memory leaks in your Android application.
Android Notification
Android Notification provides short, timely information about the action happened in
the application, even it is not running. The notification displays the icon, title and
some amount of the content text.
The properties of Android notification are set
using NotificationCompat.Builder object. Some of the notification properties are
mention below:
Android Alarm
Alarms in Android have the following characteristics: Alarms let you send intents at
set times or intervals. You can use alarms with broadcast receivers to start services
and perform other operations.
Scheduling an alarm
The AlarmManager class gives you access to the Android system alarm
services. AlarmManager lets you broadcast an Intent at a scheduled time, or after a
specific interval.
To schedule an alarm:
Call getSystemService(ALARM_SERVICE) to get an instance of
the AlarmManager class.
Use one of the set...() methods available in AlarmManager (as described below).
Which method you use depends on whether the alarm is elapsed real time, or RTC.
Canceling of Alarm
To cancel an alarm, use cancel() and pass in the PendingIntent. For example:
alarmManager.cancel(alarmIntent);