How giorgosneokleous93/fullscreenintentexample works
Project type and purpose
• Type: Native Android application demo.
• Purpose: Showcase how to schedule and display full‐screen intent notifications (e.g., an incoming‑call UI) on the lock screen.
File structure
• Single Gradle module under app/ with standard Android subfolders:
– src/main/java/... contains Kotlin classes: MainActivity, FullScreenActivity, LockScreenActivity, NotificationReceiver, ActivityUtils, ScheduleUtils, Utils
– src/main/res holds layouts (activity_main.xml, activity_full_screen.xml, activity_lock_screen.xml), drawables, mipmaps, values.
• build.gradle scripts configure the Android build, ProGuard rules, and dependencies.
• androidTest/ and test/ for instrumentation and unit tests.
README
• Confirms it’s a companion demo for a blog post about full‑screen intent notifications.
• No external backend or third‑party services—interaction with Android OS services only.
Main components & relationships
– Android OS services:
• AlarmManager (schedules alarms)
• NotificationManager (posts notifications)
• KeyguardManager / WindowManager (manages lock‑screen display)
– App components:
• MainActivity
• ScheduleUtils (helper to set alarms via AlarmManager)
• NotificationReceiver (BroadcastReceiver triggered by AlarmManager)
• Utils & ActivityUtils (helper functions for building notifications and setting window flags)
• FullScreenActivity (the activity launched by the full‑screen intent)
• LockScreenActivity (optional activity to handle lock‑screen UI)
– User (end‐user interacting with the UI)
b. Interactions / data flow:
1. User opens MainActivity → taps “Schedule Notification.”
2. MainActivity calls ScheduleUtils → schedules an alarm in AlarmManager.
3. AlarmManager fires at the scheduled time → broadcasts an intent.
4. NotificationReceiver receives the broadcast → uses NotificationManager to post a notification with a full‑screen PendingIntent.
5. Android’s Notification Service displays the notification. If the device is locked (or high‑priority), the full‑screen intent automatically launches FullScreenActivity.
6. FullScreenActivity (and potentially LockScreenActivity) uses ActivityUtils/Utils to set window flags, show over lock screen, and handle user interaction.
c. Architectural patterns / principles:
– Separation of concerns via helper classes (ScheduleUtils, ActivityUtils).
– Android component-based architecture (Activities + BroadcastReceiver).
– Loose coupling between scheduling logic and notification presentation.
d. Key technologies & frameworks:
– Kotlin language
– Android SDK (AlarmManager, NotificationManager, PendingIntent, BroadcastReceiver)
– Gradle build system
– AndroidX (if used via build.gradle – check dependencies)
Key points to capture
• All Android components and OS services involved.
• Sequence of events from user action to UI display.
• Window‐flag usage for lock‐screen override.
• Helper utilities as separate modules to highlight modularity.