This document provides an overview of key concepts for developing Android applications, including app components like Activities and Services, how to handle user interfaces with Views and Layouts, and how to retrieve and display data using ListViews, GridViews, and Adapters. It also covers concepts like Intents, permissions, themes and styles.
Store and retrieve data and make it accessible to all applications
Only way to share data across applications
There's no common storage area that all Android packages can access
Two types of content providers
Android's built-in content providers
Custom content providers we create
Store and retrieve data and make it accessible to all applications
Only way to share data across applications
There's no common storage area that all Android packages can access
Two types of content providers
Android's built-in content providers
Custom content providers we create
Store and retrieve data and make it accessible to all applications
Only way to share data across applications
There's no common storage area that all Android packages can access
Two types of content providers
Android's built-in content providers
Custom content providers we create
• Android ships with a number of content providers for common data types
audio, video, images, personal contact information, and so on
android.provider package
• We can query these providers for the data they contain
Store and retrieve data and make it accessible to all applications
Only way to share data across applications
There's no common storage area that all Android packages can access
Two types of content providers
Android's built-in content providers
Custom content providers we create
Store and retrieve data and make it accessible to all applications
Only way to share data across applications
There's no common storage area that all Android packages can access
Two types of content providers
Android's built-in content providers
Custom content providers we create
Store and retrieve data and make it accessible to all applications
Only way to share data across applications
There's no common storage area that all Android packages can access
Two types of content providers
Android's built-in content providers
Custom content providers we create
• Android ships with a number of content providers for common data types
audio, video, images, personal contact information, and so on
android.provider package
• We can query these providers for the data they contain
Welcome to my series of articles on Unified Modeling Language. This is "Session 11 – Communication Diagram" of the series. Please view my other documents where I have covered each UML diagram with examples
The Content helps those who wish to program mobile applications using android platform. The content has been used to conduct mobile application boot camps using android platform on different regions in Tanzania
Android is a mobile operating system based on the linux and kernel. It's maintained by Google, and comes in a few different versions. At the time of writing, mobile phones run a variant of version
This post will walk you through Android ListView Tutorial for building simple and customized ListView using different Android adapters.
List is one of the most common UI patterns, which is being used extensively to display the collection of data elements in rows. In android ListView is a view group that displays a list of scrollable items. The list items are automatically inserted to the list using an Adapter that pulls content from a source such as an array.
Welcome to my series of articles on Unified Modeling Language. This is "Session 11 – Communication Diagram" of the series. Please view my other documents where I have covered each UML diagram with examples
The Content helps those who wish to program mobile applications using android platform. The content has been used to conduct mobile application boot camps using android platform on different regions in Tanzania
Android is a mobile operating system based on the linux and kernel. It's maintained by Google, and comes in a few different versions. At the time of writing, mobile phones run a variant of version
This post will walk you through Android ListView Tutorial for building simple and customized ListView using different Android adapters.
List is one of the most common UI patterns, which is being used extensively to display the collection of data elements in rows. In android ListView is a view group that displays a list of scrollable items. The list items are automatically inserted to the list using an Adapter that pulls content from a source such as an array.
Data Transfer between Activities & DatabasesMuhammad Sajid
Data Transfer between Activities & Databases, icon: This is displayed as icon for activity. You can check or save png image of name icon in drawable folder. android:icon="@drawable/icon"
• label: The label / title that appears at top in Toolbar of that particular Activity. You can check or edit label name by opening String XML file present inside Values folder
android:label = "@string/label“ or android:label = "New Activity“
Just like icon attribute, if you have not declared any label for your activity then it will be same as your parent activity
Data Transfer between Activities & DatabasesMuhammad Sajid
Data Transfer between Activities & Databases, Content Provider:
Content Provider will act as a central repository to store the data of the application in one place and make that data available for different applications to access whenever it’s required.
the Content Provider is a part of an android application and it will act as more like the relational database to store the app data. We can perform multiple operations like insert, update, delete and edit on the data stored in the content provider using insert(), update(), delete(), and query() methods.
9. Intents and Intent Filters
• An Intent is a messaging object you can use to
request an action from another app component.
• Intent Types: 1. Explicit Intent 2. Implicit Intent
1. Explicit Intent: specify the component to start by
name (the fully-qualified class name). You'll typically
use an explicit intent to start a component in your
own app, because you know the class name of the
activity or service you want to start. For example,
start a new activity in response to a user action or
start a service to download a file in the background.
10. 2. Implicit intents do not name a specific component, but instead declare a
general action to perform, which allows a component from another app to
handle it. For example, if you want to show the user a location on a map,
you can use an implicit intent to request that another capable app show a
specified location on a map.
Intent Filters:
<intent-filter>
<action android:name="android.intent.action.SEND"/>
<category android:name="android.intent.category.DEFAULT"/>
<data android:mimeType="text/plain"/>
</intent-filter>
Ex:
<data android:mimeType="application/vnd.google.panorama360+jpg"/>
<data android:mimeType="image/*"/>
<data android:mimeType="video/*"/>
11. Application Permission
• Requests a permission that the application must be
granted in order for it to operate correctly. Permissions
are granted by the user when the application is installed,
not while it's running
1. android.permission.CALL_EMERGENCY_NUMBERS
2. android.permission.READ_OWNER_DATA
3. android.permission.SET_WALLPAPER
4. android.permission.DEVICE_POWER
5. android.hardware.bluetooth
12. Views, Layouts and UI
Components
• Provides classes that expose basic user interface classes
that handle screen layout and interaction with the user
• Layouts:
18. List view and Grid View
• Android List View is a view which groups several items and
display them in vertical scrollable list. The list items are
automatically inserted to the list using an Adapter that pulls
content from a source such as an array or database.
• An adapter actually bridges between UI components and the
data source that fill data into UI Component. Adapter can be
used to supply the data to like spinner, list view, grid view etc.
• The List View and Grid View are subclasses of Adapter View and
they can be populated by binding them to an Adapter, which
retrieves data from an external source and creates a View that
represents each data entry. Android provides several subclasses
of Adapter that are useful for retrieving different kinds of data and
building views for an Adapter View
20. Grid View
• Android GridView shows items in two-dimensional scrolling
grid (rows & columns) and the grid items are not
necessarily predetermined but they automatically inserted
to the layout using a ListAdapter
• An adapter actually bridges between UI components and
the data source that fill data into UI Component. Adapter
can be used to supply the data to like spinner, list view,
grid view etc.
• The ListView and GridView are subclasses of AdapterView
and they can be populated by binding them to an Adapter,
which retrieves data from an external source and creates a
View that represents each data entry.
25. Adding Styles and
Themes
• A style is a collection of properties that specify the look and
format for a view or window. A style can specify properties
such as height, padding, font color, font size, background
color, and much more. A style is defined in an XML resource
that is separate from the XML that specifies the layout.
Ex:
<TextView
style="@style/CodeFont"
android:text="@string/hello" />