summaryrefslogtreecommitdiff
path: root/android/app/src/main/AndroidManifest.xml
blob: db97b1b9b916b5e02018a668c622136776c16e42 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
          package="org.terst.doot.widget">

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />

    <application
        android:label="Doot Widget"
        android:theme="@android:style/Theme.DeviceDefault.DayNight"
        android:allowBackup="false">

        <!--
          Each popup activity below gets its own distinct taskAffinity, separate from the
          app's default (shared with SettingsActivity). Without this, FLAG_ACTIVITY_NEW_TASK
          reuses an existing task with matching affinity instead of creating a fresh one,
          so if SettingsActivity's task was still alive in recents, these translucent popups
          would render on top of it instead of the home screen behind them.
        -->

        <!-- Task detail bottom sheet (opened by widget task taps) -->
        <activity
            android:name=".ui.TaskDetailActivity"
            android:theme="@style/Theme.TaskDetail"
            android:taskAffinity="${applicationId}.taskdetail"
            android:exported="false" />

        <!-- Quick-add bottom sheet (opened by widget "+" button) -->
        <activity
            android:name=".ui.QuickAddActivity"
            android:theme="@style/Theme.TaskDetail"
            android:taskAffinity="${applicationId}.quickadd"
            android:exported="false"
            android:windowSoftInputMode="adjustResize|stateVisible" />

        <!-- Full dashboard, wrapped in a WebView (see DashboardActivity's doc comment).
             Now the app's single launcher entry point; Settings is reached from its
             toolbar gear button instead of its own home-screen icon. -->
        <activity
            android:name=".ui.DashboardActivity"
            android:exported="true"
            android:label="Doot">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>

        <!-- Settings activity (also the widget config screen, which is why it must
             stay exported=true: the launcher/home-screen process starts it directly
             during widget placement, regardless of the app's own launcher entry). -->
        <activity
            android:name=".ui.SettingsActivity"
            android:exported="true">
            <intent-filter>
                <action android:name="android.appwidget.action.APPWIDGET_CONFIGURE" />
            </intent-filter>
        </activity>

        <!-- Widget receiver (filled in Task 10) -->
        <receiver
            android:name=".DootWidgetReceiver"
            android:exported="true">
            <intent-filter>
                <action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
            </intent-filter>
            <meta-data
                android:name="android.appwidget.provider"
                android:resource="@xml/widget_info" />
        </receiver>

        <!-- WorkManager initialization -->
        <provider
            android:name="androidx.startup.InitializationProvider"
            android:authorities="${applicationId}.androidx-startup"
            android:exported="false">
            <meta-data
                android:name="androidx.work.WorkManagerInitializer"
                android:value="androidx.startup" />
        </provider>

    </application>
</manifest>