Mobile Application Developement (1) - Notes
Mobile Application Developement (1) - Notes
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.
The Android SDK is a set of tools, libraries, and resources needed to develop Android
applications. It is integrated into IDEs like Android Studio.
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 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)
Creating your first Android app involves basic steps in Android Studio:
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
// MainActivity.kt
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
An Android application is structured into several components, each playing a unique role:
Directory Structure:
The AndroidManifest.xml file is a crucial part of every Android application. It tells the
Android system how to execute the app.
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.
<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>
</intent-filter>
</activity>
</application>
</manifest>