Additional Short notes for mobile application development course for chapter two
Size: 841.19 KB
Language: en
Added: Oct 16, 2025
Slides: 12 pages
Slide Content
Lecture 2 Notification, Menus and Dialogs
INTENTS WITH PARAMETER • An intent is an abstract description of an operation to be performed. • It can be used with start Activity to launch an Activity , • broadcast Intent to send it to any interested • BroadcastReceiver components, and Context.startService (Intent) or Context.bindService (Intent, BindServiceFlags , Executor, ServiceConnection ) to communicate with a background Service. • An Intent provides a facility for performing late runtime binding between the code in different applications. • Its most significant use is in the launching of activities , where it can be thought of as the glue between activities. • It is basically a passive data structure holding an abstract description of an action to be performed.
TYPES OF INTENT • Intent is a Messaging object used to request an action from an APP other app component • Intent facilitates communication between different components • Intents are two types 1. Explicit Intent communicating between two activates inside the same application 2. Implicit Intent communicates between to Activates of Different Application
Cont..
NOTIFICATIONS WITH STATUS BAR AND TOAST • 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.
Cont..
ANDROID LOCALIZATION • An android application can run on many devices in many different regions. In order to make your application more interactive, your application should handle text,numbers,files e.t.c in ways appropriate to the locales where your application will be used.
OPTION MENU • The options menu is the primary collection of menu items for an activity. It's where you place actions that have a global impact on the app, such as "Search," "Compose email," and "Setting
ANDROID TOAST • 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 toast provides simple feedback about an operation in a small popup. It only fills the amount of space required for the message and the current activity remains visible and interactive. Toasts automatically disappear after a timeout. • For example, clicking Send on an email triggers a "Sending message..." toast, as shown in the following screen capture:
Cont..
Dialog as activity In the context of Android development, "Dialog" refers to a user interface component that appears as a popup window, often used to prompt the user for information, confirm an action, or display information temporarily without obstructing the main application flow. Here's how "Dialog" functions as an activity in Android:
ALERT DIALOG • Alert Dialog → A dialog is a small window that prompts the user to make a decision or enter additional information . • A dialog doesn't fill the screen and is normally used for modal events that require users to take an action before they can proceed.