0% found this document useful (0 votes)
73 views4 pages

Mobile Application Developement (1) - Notes

The document provides an overview of mobile application development on the Android platform, detailing its features, the Android SDK, and the transition from Eclipse to Android Studio as the primary development tool. It outlines the steps to create an Android application, including setting up the environment, designing the UI, and writing application logic. Additionally, it explains the structure of an Android application and the significance of the AndroidManifest.xml file in defining app metadata and permissions.

Uploaded by

mojanabi84
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)
73 views4 pages

Mobile Application Developement (1) - Notes

The document provides an overview of mobile application development on the Android platform, detailing its features, the Android SDK, and the transition from Eclipse to Android Studio as the primary development tool. It outlines the steps to create an Android application, including setting up the environment, designing the UI, and writing application logic. Additionally, it explains the structure of an Android application and the significance of the AndroidManifest.xml file in defining app metadata and permissions.

Uploaded by

mojanabi84
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/ 4

MOBILE APPLICATION DEVELOPEMENT

UNIT 1-The Android Platform

Android is a popular operating system based on Linux, designed for mobile devices such as
smartphones, tablets, wearables, and even TVs. It was developed by Google and offers a vast
ecosystem of applications and services.
Features:

1. Open Source: Anyone can modify Android's source code, making it adaptable for
custom devices.
2. Multi-tasking: Run multiple apps simultaneously.
3. Robust App Ecosystem: Millions of apps are available through Google Play.
4. Hardware Compatibility: Designed to work with devices like cameras, GPS, and
sensors.
5. Regular Updates: Improvements in UI, security, and performance.

Android SDK (Software Development Kit)

The Android SDK is a set of tools, libraries, and resources needed to develop Android
applications. It is integrated into IDEs like Android Studio.

Key Components of the Android SDK:

1. Libraries: Prebuilt code for tasks like UI design, networking, and data handling.
2. Android Debug Bridge (ADB): A command-line tool to manage devices/emulators
during development.
3. Android Emulator: A virtual device to test applications.
4. Build Tools: Tools to compile code and generate APK files (installable Android
apps).
5. Documentation & Samples: Code examples and API guides for developers.

Eclipse Installation (Historical Context)

Eclipse IDE was once the primary tool for Android development. However, Google has since
replaced it with Android Studio for better features and integration. For historical
understanding:

1. Download Eclipse IDE and install the Android Development Tools (ADT) Plugin
to enable Android development.
2. Configure SDK: Link the Android SDK to Eclipse.
3. Build Projects: Create Android apps using the same project structure as modern
development tools.
Android Studio Installation (Current Development Tool)

Steps to Install Android Studio:

1. Download Android Studio: Get it from the official website.


2. Install Required SDKs: Android Studio automatically installs the latest Android
SDK during setup.
3. Set Up Emulator: Use the AVD (Android Virtual Device) Manager to create a
virtual Android device.
4. Create Projects: Start building applications with features like drag-and-drop UI,
code auto-completion, and real-time error checks.

Building Your First Android Application

Creating your first Android app involves basic steps in Android Studio:

1. Create a New Project:


o Select File > New > New Project in Android Studio.
o Choose an activity template (e.g., Empty Activity).
o Provide details like application name, package name, and programming
language (Java/Kotlin).
2. Design the UI:
o Open the activity_main.xml file to design the app's interface using XML.
o Add widgets like buttons, text fields, etc.
3. Write Logic in Kotlin/Java:
o Use the MainActivity.kt file to add functionality to your app.
4. Run the Application:
o Use the Run button to deploy the app on an emulator or connected device.

Example: Building a simple "Hello, World!" app:

<!-- activity_main.xml -->

<TextView

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:text="Hello, World!" />

// MainActivity.kt

class MainActivity : AppCompatActivity() {

override fun onCreate(savedInstanceState: Bundle?) {

super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)

Understanding the Anatomy of an Android Application

An Android application is structured into several components, each playing a unique role:

1. Activities: Represent individual screens (e.g., Login, Dashboard).


2. Fragments: Reusable portions of an Activity's UI.
3. Services: Background tasks without a user interface (e.g., music playback).
4. Broadcast Receivers: Handle system-wide broadcasts (e.g., incoming SMS).
5. Content Providers: Facilitate data sharing between applications.
6. Resources: Separate folders for strings, layouts, drawables (images), and more.

Directory Structure:

 src: Contains Java/Kotlin source code.


 res: Stores UI layouts, images, and strings.
 AndroidManifest.xml: Describes the app's metadata.

Android Manifest File

The AndroidManifest.xml file is a crucial part of every Android application. It tells the
Android system how to execute the app.

Key Information Defined in the Manifest:

1. Application Details:
o App name, version, and permissions (e.g., accessing the camera).
2. Activity Declarations:
o Specify all activities and their configurations (e.g., orientation).
3. Permissions:
o Request user or system-level permissions (e.g., INTERNET, READ_CONTACTS).
4. Intent Filters:
o Define how the app interacts with other apps or system events.

Example of a simple AndroidManifest.xml file:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"

package="com.example.myfirstapp">

<application
android:allowBackup="true"

android:icon="@mipmap/ic_launcher"

android:label="@string/app_name"

android:theme="@style/Theme.App">

<activity android:name=".MainActivity">

<intent-filter>

<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />

</intent-filter>

</activity>

</application>

</manifest>

You might also like