3.7 KiB · text History 04f2bcb
<?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:label="@string/app_name"
        android:supportsRtl="true"
        android:theme="@style/Theme.ApollosCrib">

        <activity
            android:name=".ui.MainActivity"
            android:exported="true"
            android:label="@string/app_name">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </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" />

        <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>

    </application>
</manifest>