Mobile Application Development — Android Notes
What is Android?
Definition: Android is an open-source mobile operating system developed by Google.
Example: Apps like WhatsApp, Facebook.
Installing Android SDK
Steps:
1. Install Android Studio
2. Setup SDK Manager
3. Create Emulator
1. Install Android Studio
2. Setup SDK Manager
3. Create Emulator
Anatomy of Android App
Components:
Activity, Service, Broadcast Receiver, Content Provider
Activity, Service, Broadcast Receiver, Content Provider
Example: Login Screen = Activity
User Interface
Views: Button, TextView, EditText
Java Example:
Button btn = findViewById(R.id.btn);
btn.setOnClickListener(v -> {
Toast.makeText(this,"Clicked",Toast.LENGTH_SHORT).show();
});
Kotlin Example:
val btn = findViewById
Intents
Definition: Used to move between activities.
Java:
Intent i = new Intent(this, SecondActivity.class);
startActivity(i);
Kotlin:
val i = Intent(this, SecondActivity::class.java)
startActivity(i)
Persisting Data
Definition: Save data using SharedPreferences or SQLite
Java:
SharedPreferences sp = getSharedPreferences("data",MODE_PRIVATE);
sp.edit().putString("name","Ali").apply();
Kotlin:
val sp = getSharedPreferences("data",MODE_PRIVATE)
sp.edit().putString("name","Ali").apply()
Services & Threads
Definition: Background processing without UI.
Example: Music app running in background.
Networking
Definition: Access APIs using HTTP.
Example: Fetch data from server.
Google Maps
Definition: Show map inside app.
Example: Show current location.
Publishing App
Steps:
1. Generate APK
2. Upload to Play Store
3. Release App
1. Generate APK
2. Upload to Play Store
3. Release App

0 Comments