Advanced Android Features
Beyond basics, Android provides powerful components for complex applications.
Fragments
Reusable UI components within Activities. Own lifecycle. Adaptive layouts for tablets vs phones. Navigation component manages transitions.
RecyclerView
Efficient scrollable lists. Adapter, ViewHolder, LayoutManager (linear, grid, staggered). Recycles off-screen views.
Data Persistence
SharedPreferences (key-value), SQLite/Room (relational), DataStore (modern prefs), file storage (internal/external).
Networking
Retrofit (REST client), Volley, Gson/Moshi (JSON). Off main thread: coroutines, RxJava. OkHttp client.
Services and Background
Foreground services (notifications), WorkManager (deferrable tasks with constraints). Android restricts background execution.
Sensors and Location
Accelerometer, gyroscope, GPS. Fused Location Provider. Runtime permissions for sensitive resources (Android 6+).
Summary
Advanced Android: fragments, RecyclerView, persistence, networking, background work, and sensors.