SA 5,6,7 Flashcards
is a messaging object used to request an action from another app component.
Intent
facilitates communication between different components
Intent
two types of intent
*Explicit
*Implicit
communicates between two activities inside the same application
explicit intent
communicates between two activities of different application
implicit intent
Designed for storing and transporting data between different parts of an app, often used in conjunction with Intents
Bundle
are used to target a specific app or component within an app.
explicit intents
are more general; they dont specify a particular app or component and rely on the system to choose an appropriate app to handle the request based on the type of action and data provided.
implicit intents
how to start an explicit intent
Intent intent = new Intent(MainActivity.this, SecondActivity.class);
startActivity(intent);
how to start an explicit intent with a different app package
Intent intent = new Intent();
intent.setClassName(“com.example.otherapp”);
startActivity(intent);
Starting with Android ___________ , Android introduced heads-up notification
Android 5.0 (Lollipop)
appear briefly in a floating window at the top of the screen, overlaying the current content
heads-up notification
what triggers heads up notifications?
PRIORITY.HIGH
are used to detect and respond to different user interactions with the apps UI components
Action Listener
is specifically designed to respond to click events on widgets like buttons, text, views, and images
OnClickListener
The listener responds when a view is pressed and held for a long time
OnLongClickListener
The listener detects touch interactions, allowing you to track presses, and movements
OnTouchListener
This listener is often used to detect key events in an EditText, such as when a user presses the Enter key
OnKeyListener
Used for detecting when a view like an input field gains or loses focus
OnFocusChangeListener