<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.VIBRATE" />
    <uses-permission android:name="android.permission.WAKE_LOCK" />
    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
    
    <!-- Alarm & Full Screen -->
    <uses-permission android:name="android.permission.SCHEDULE_EXACT_ALARM" />
    <uses-permission android:name="android.permission.USE_FULL_SCREEN_INTENT" />

    <!-- Service & Notification -->
    <uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
    <uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
    <uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PLAYBACK" />

    <application
        android:allowBackup="true"
        android:icon="@drawable/ic_alarm_blue"
        android:label="@string/app_name"
        android:roundIcon="@drawable/ic_alarm_blue"
        android:supportsRtl="true"
        android:theme="@style/Theme.ShiftAlarm">
        
        <activity android:name=".SettingsActivity" android:exported="false" android:configChanges="uiMode"/>
        <activity
            android:name=".NoticeActivity"
            android:exported="false"
            android:parentActivityName=".SettingsActivity"
            android:label="변경사항"/>
        <activity
            android:name=".ManualActivity"
            android:exported="false"
            android:parentActivityName=".SettingsActivity"
            android:label="사용설명서"
            android:configChanges="uiMode"/>
        <activity 
            android:name=".AlarmActivity" 
            android:exported="false"
            android:excludeFromRecents="true"
            android:theme="@style/Theme.AppCompat.NoActionBar"
            android:showWhenLocked="true"
            android:turnScreenOn="true"
            android:screenOrientation="portrait"
            android:launchMode="singleInstance"
            android:documentLaunchMode="never"
            android:configChanges="orientation|screenSize|keyboardHidden"
            android:allowEmbedded="false"
            android:resizeableActivity="false" />

        <activity
            android:name=".MainActivity"
            android:exported="true"
            android:configChanges="uiMode">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>

        <receiver
            android:name=".AlarmReceiver"
            android:enabled="true"
            android:exported="false">
            <intent-filter>
                <action android:name="com.example.shiftalarm.ALARM_TRIGGER" />
                <action android:name="com.example.shiftalarm.SNOOZE" />
            </intent-filter>
        </receiver>

        <receiver
            android:name=".BootReceiver"
            android:enabled="true"
            android:exported="true">
            <intent-filter>
                <action android:name="android.intent.action.BOOT_COMPLETED" />
            </intent-filter>
        </receiver>

        <receiver
            android:name=".UpcomingAlarmReceiver"
            android:enabled="true"
            android:exported="false" />

        <receiver
            android:name=".CancelAlarmReceiver"
            android:enabled="true"
            android:exported="false" />

        <service
            android:name=".AlarmForegroundService"
            android:foregroundServiceType="mediaPlayback"
            android:exported="false" />

    </application>

</manifest>
