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

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

  <application
    android:allowBackup="true"
    android:largeHeap="true"
    android:extractNativeLibs="true"
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppThemeRedRC"
    android:usesCleartextTraffic="true">

    <!-- Indicates to the ControlHubUpdater what the latest version of the Control Hub is that this app supports -->
    <meta-data
        android:name="org.firstinspires.latestSupportedControlHubVersion"
        android:value="1" />

    <!-- The main robot controller activity -->
    <activity android:name="org.firstinspires.ftc.robotcontroller.internal.PermissionValidatorWrapper"
              android:screenOrientation="fullUser"
              android:configChanges="orientation|screenSize"
              android:label="@string/app_name"
              android:launchMode="singleTask" >

      <intent-filter>
        <category android:name="android.intent.category.LAUNCHER" />
        <action android:name="android.intent.action.MAIN" />
      </intent-filter>

    </activity>

    <activity
      android:name="org.firstinspires.ftc.robotcontroller.internal.FtcRobotControllerActivity"
      android:screenOrientation="fullUser"
      android:configChanges="orientation|screenSize"
      android:label="@string/app_name"
      android:launchMode="singleTask" >

      <intent-filter>
        <action android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED" />
      </intent-filter>

      <meta-data
        android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED"
        android:resource="@xml/device_filter" />

      <!--org.firstinspires.main.entry indicates that this app is compatible with the Dragonboard Control Hub-->
      <meta-data
          android:name="org.firstinspires.main.entry"
          android:value="true" />
    </activity>

    <!-- The robot controller service in which most of the robot functionality is managed -->
    <service
      android:name="com.qualcomm.ftccommon.FtcRobotControllerService"
      android:enabled="true" />


    <!-- Assistant that autostarts the robot controller on android boot (if it's supposed to) -->
    <receiver
      android:enabled="true"
      android:exported="true"
      android:name="org.firstinspires.ftc.ftccommon.internal.RunOnBoot"
      android:permission="android.permission.RECEIVE_BOOT_COMPLETED">

      <intent-filter>
        <category android:name="android.intent.category.DEFAULT" />
        <action android:name="android.intent.action.BOOT_COMPLETED" />
        <action android:name="android.intent.action.QUICKBOOT_POWERON" />
      </intent-filter>
    </receiver>

  </application>

</manifest>
