10.6 KiB · text History 5b1fbaa
<?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.ACCESS_NETWORK_STATE" />
    <!-- The Ankyra subscription is a socket held open while nothing else in
         this app is running, which on modern Android is a foreground service. -->
    <uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
    <uses-permission android:name="android.permission.FOREGROUND_SERVICE_DATA_SYNC" />
    <uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />

    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:label="@string/app_name"
        android:supportsRtl="true"
        android:theme="@style/Theme.ApollosCrib">

        <activity
            android:name=".ui.MainActivity"
            android:exported="true"
            android:launchMode="singleTop"
            android:label="@string/app_name">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
            <!-- Pairing: the Ankyra page draws its connection as a QR holding
                 an apolloscrib://ankyra link. The phone's own camera resolves
                 it, so there is no scanner in here to maintain. -->
            <intent-filter>
                <action android:name="android.intent.action.VIEW" />
                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE" />
                <data android:scheme="apolloscrib" android:host="ankyra" />
            </intent-filter>
        </activity>

        <!-- Opened by Smartspacer as both the setup and the config activity for
             every one of the Targets below; which query it binds comes in as an
             extra. Exported because Smartspacer is the one launching it. -->
        <activity
            android:name=".ui.ConfigurationActivity"
            android:exported="true"
            android:label="@string/configure" />

        <service
            android:name=".mqtt.AnkyraService"
            android:exported="false"
            android:foregroundServiceType="dataSync" />

        <!-- The board on the home screen, a card at a time. -->
        <receiver
            android:name=".widget.BoardWidget"
            android:exported="false">
            <intent-filter>
                <action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
            </intent-filter>
            <meta-data
                android:name="android.appwidget.provider"
                android:resource="@xml/board_widget_info" />
        </receiver>

        <!-- The cards themselves. Bound by the launcher's widget host, so it
             needs the permission the host holds. -->
        <service
            android:name=".widget.BoardWidgetService"
            android:permission="android.permission.BIND_REMOTEVIEWS"
            android:exported="false" />

        <!-- The board as a launcher's page to the left of the home screen.
             Launchers implementing Google's "minus one" gesture look for this
             action and this scheme; the api version tells the client which
             attach call to use. -->
        <service
            android:name=".feed.FeedOverlayService"
            android:exported="true"
            android:enabled="true">
            <intent-filter>
                <action android:name="com.android.launcher3.WINDOW_OVERLAY" />
                <data android:scheme="app" />
            </intent-filter>
            <meta-data
                android:name="service.api.version"
                android:value="7" />
        </service>

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

        <!-- One provider per source type. Smartspacer keys everything off the
             authority, so separate authorities are what let a user add transit
             and bikeshare independently. All three must be exported, with this
             action and this permission, or Smartspacer will not see them. -->
        <provider
            android:name=".targets.GtfsTargetProvider"
            android:authorities="${applicationId}.target.gtfs"
            android:permission="com.kieronquinn.app.smartspacer.permission.ACCESS_SMARTSPACER_TARGETS"
            android:exported="true">
            <intent-filter>
                <action android:name="com.kieronquinn.app.smartspacer.TARGET" />
            </intent-filter>
        </provider>

        <provider
            android:name=".targets.GbfsTargetProvider"
            android:authorities="${applicationId}.target.gbfs"
            android:permission="com.kieronquinn.app.smartspacer.permission.ACCESS_SMARTSPACER_TARGETS"
            android:exported="true">
            <intent-filter>
                <action android:name="com.kieronquinn.app.smartspacer.TARGET" />
            </intent-filter>
        </provider>

        <provider
            android:name=".targets.WeatherTargetProvider"
            android:authorities="${applicationId}.target.weather"
            android:permission="com.kieronquinn.app.smartspacer.permission.ACCESS_SMARTSPACER_TARGETS"
            android:exported="true">
            <intent-filter>
                <action android:name="com.kieronquinn.app.smartspacer.TARGET" />
            </intent-filter>
        </provider>

        <provider
            android:name=".targets.TidalTargetProvider"
            android:authorities="${applicationId}.target.tidal"
            android:permission="com.kieronquinn.app.smartspacer.permission.ACCESS_SMARTSPACER_TARGETS"
            android:exported="true">
            <intent-filter>
                <action android:name="com.kieronquinn.app.smartspacer.TARGET" />
            </intent-filter>
        </provider>

        <provider
            android:name=".targets.AqiTargetProvider"
            android:authorities="${applicationId}.target.aqi"
            android:permission="com.kieronquinn.app.smartspacer.permission.ACCESS_SMARTSPACER_TARGETS"
            android:exported="true">
            <intent-filter>
                <action android:name="com.kieronquinn.app.smartspacer.TARGET" />
            </intent-filter>
        </provider>

        <provider
            android:name=".targets.EphemTargetProvider"
            android:authorities="${applicationId}.target.ephem"
            android:permission="com.kieronquinn.app.smartspacer.permission.ACCESS_SMARTSPACER_TARGETS"
            android:exported="true">
            <intent-filter>
                <action android:name="com.kieronquinn.app.smartspacer.TARGET" />
            </intent-filter>
        </provider>

        <provider
            android:name=".targets.CalendarTargetProvider"
            android:authorities="${applicationId}.target.calendar"
            android:permission="com.kieronquinn.app.smartspacer.permission.ACCESS_SMARTSPACER_TARGETS"
            android:exported="true">
            <intent-filter>
                <action android:name="com.kieronquinn.app.smartspacer.TARGET" />
            </intent-filter>
        </provider>

        <provider
            android:name=".targets.PollenTargetProvider"
            android:authorities="${applicationId}.target.pollen"
            android:permission="com.kieronquinn.app.smartspacer.permission.ACCESS_SMARTSPACER_TARGETS"
            android:exported="true">
            <intent-filter>
                <action android:name="com.kieronquinn.app.smartspacer.TARGET" />
            </intent-filter>
        </provider>

        <provider
            android:name=".targets.DroughtTargetProvider"
            android:authorities="${applicationId}.target.drought"
            android:permission="com.kieronquinn.app.smartspacer.permission.ACCESS_SMARTSPACER_TARGETS"
            android:exported="true">
            <intent-filter>
                <action android:name="com.kieronquinn.app.smartspacer.TARGET" />
            </intent-filter>
        </provider>

        <provider
            android:name=".targets.GitlabTargetProvider"
            android:authorities="${applicationId}.target.gitlab"
            android:permission="com.kieronquinn.app.smartspacer.permission.ACCESS_SMARTSPACER_TARGETS"
            android:exported="true">
            <intent-filter>
                <action android:name="com.kieronquinn.app.smartspacer.TARGET" />
            </intent-filter>
        </provider>

        <provider
            android:name=".targets.GithubTargetProvider"
            android:authorities="${applicationId}.target.github"
            android:permission="com.kieronquinn.app.smartspacer.permission.ACCESS_SMARTSPACER_TARGETS"
            android:exported="true">
            <intent-filter>
                <action android:name="com.kieronquinn.app.smartspacer.TARGET" />
            </intent-filter>
        </provider>

        <provider
            android:name=".targets.CronosTargetProvider"
            android:authorities="${applicationId}.target.cronos"
            android:permission="com.kieronquinn.app.smartspacer.permission.ACCESS_SMARTSPACER_TARGETS"
            android:exported="true">
            <intent-filter>
                <action android:name="com.kieronquinn.app.smartspacer.TARGET" />
            </intent-filter>
        </provider>

        <provider
            android:name=".targets.PackagesTargetProvider"
            android:authorities="${applicationId}.target.packages"
            android:permission="com.kieronquinn.app.smartspacer.permission.ACCESS_SMARTSPACER_TARGETS"
            android:exported="true">
            <intent-filter>
                <action android:name="com.kieronquinn.app.smartspacer.TARGET" />
            </intent-filter>
        </provider>

        <provider
            android:name=".targets.ConstTargetProvider"
            android:authorities="${applicationId}.target.const"
            android:permission="com.kieronquinn.app.smartspacer.permission.ACCESS_SMARTSPACER_TARGETS"
            android:exported="true">
            <intent-filter>
                <action android:name="com.kieronquinn.app.smartspacer.TARGET" />
            </intent-filter>
        </provider>

    </application>
</manifest>