0% found this document useful (0 votes)
9 views17 pages

Android Telephony and Notifications Guide

This document discusses Android telephony APIs, notifications, and creating custom notification layouts. It provides information on the TelephonyManager class and how to make phone calls and send SMS. It also explains how notifications work in Android and how to set properties like icons, text, and priorities using NotificationCompat.Builder. The document concludes by mentioning how to create a custom notification layout and control vibration and lights for notifications.
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)
9 views17 pages

Android Telephony and Notifications Guide

This document discusses Android telephony APIs, notifications, and creating custom notification layouts. It provides information on the TelephonyManager class and how to make phone calls and send SMS. It also explains how notifications work in Android and how to set properties like icons, text, and priorities using NotificationCompat.Builder. The document concludes by mentioning how to create a custom notification layout and control vibration and lights for notifications.
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

Module 9

Telephony APIs
• Android TelephonyManager
• The [Link] class provides
information about the telephony services such as subscriber
id, sim serial number, phone network type etc. Moreover, you
can determine the phone state etc.
Example
[Link]
[Link]
[Link]
To make a phone call in android
To send SMS in android
Android - Notifications

• Android Toast class provides a handy way to show users alerts but
problem is that these alerts are not persistent which means alert
flashes on the screen for a few seconds and then disappears.
• A notification is a message you can display to the user outside of
your application's normal UI.
• When you tell the system to issue a notification, it first appears as
an icon in the notification area.
• To see the details of the notification, the user opens the
notification drawer. Both the notification area and the
notification drawer are system-controlled areas that the user can
view at any time.
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 [Link] object. Some of the notification
properties are mention below:
• setSmallIcon(): It sets the icon of notification.
• setContentTitle(): It is used to set the title of notification.
• setContentText(): It is used to set the text message.
• setAutoCancel(): It sets the cancelable property of notification.
• setPriority(): It sets the priority of notification.
Example
[Link]

[Link]
[Link]
[Link]
• The [Link]
class receives the
notification message and
is displayed in TextView.
This class is invoked while
taping the notification.
Cíeate a Custom Notification
Layout
• To ensure your notification looks its best across different
versions of Android, you should always use the standard
notification template to build your notification.
• However, if the system templates do not meet your needs,
you can provide your own layout for the notification.
vibration and lights for the Android
notifications
THANK YOU

You might also like