Android Programming
Mr. M. Ragunathan [Link]., [Link].
Assistant Professor, Department o
IT
[Link], Virudhunagar.
Basic needs
• Android Studio: Official IDE or Eclipse
• Java/Kotlin: Kotlin is Google’s preferred language
• SDK (Software Development Kit )
• JDK (Java Development Kit)
• XML (For UI design)
• AVD (Android virtual device) Emulator for testing
Introduction to Android
• Open software platform for mobile development
• Created by Andy Rubin, Acquired by Google in 2005.
• A complete stack – OS, Middleware, Applications
• An Open Handset Alliance (OHA) project
• Powered by Linux operating system
• Fast application development in Java/Kotlin
Manufacturers: Designing Android
Devices
• Samsung
• Motorola
• Dell
• Sony Ericsson
• HTC
• LG
• Amazon
• Intel
• Texas Instruments
• ARM
• NVIDIA
• Qualcomm
1. Set Up Your Android Environment
•
Install Android Studio with Android SDK or
•
Install Eclipse
•
Configure SDK
•
Install JDK
•
Create AVD (Android virtual device)
Android Components
Activities: Represent a single screen with a UI.
Fragments: Reusable parts of the UI.
Intents: Navigation between Activities.
Services: Run in the background.
Broadcast Receivers: communication b/w the OS and apps.
Content Providers: Share data between applications.
[Link]: App "ID card" (permissions, components)
2. Create an Android Project
File → New → Project
Select “Android Project”
Fill in Project details...
Source
code
Auto-generated
code
String
constants
UI
layout
Configuration
3. Run the Android Application
Run → Run (or click the “Run” button)
Select “Android Application”
The emulator may take a few minutes to start, so be patient!
You don't need to restart the emulator when you have a new version of
your application
U .
n k
h a
T