[go: up one dir, main page]

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

Android Development Slides Lec 07 GCUF

The document discusses displaying notifications on Android devices using the NotificationManager. It provides instructions on creating a project with a NotificationView class and notification.xml layout file to display a notification message at the top of the device status bar.

Uploaded by

code with joey
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)
52 views17 pages

Android Development Slides Lec 07 GCUF

The document discusses displaying notifications on Android devices using the NotificationManager. It provides instructions on creating a project with a NotificationView class and notification.xml layout file to display a notification message at the top of the device status bar.

Uploaded by

code with joey
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/ 17

Mobile and Application

Development

Lecture # 07
M. Javed Iqbal
DISPLAYING NOTIFICATIONS
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.
you should use the
NotificationManager to display a
message at the top of the device,
commonly
known as the status bar (sometimes
also referred to as the notification
bar).
1. Using Eclipse, create a new Android
project and name it Notifications.
2. Add a new class file named
NotificationView to the package. In
addition, add a new
notification.xml file to the res/layout
folder.
3. Populate the notification.xml file as
follows:
Populate the
NotificationView.java file as
follows:
Add the following statements
in bold to the
AndroidManifest.xml file:
Add the following statements
in bold to the main.xml file:
Finally, add the following
statements in bold to the
NotificationsActivity.java file:

You might also like