Setup test app for App Actions Interaction.
Test: n/a
Bug: 278142696
Change-Id: I89adc5891c61fa392933b7d201c9467458397499
diff --git a/appactions/interaction/integration-tests/testapp/build.gradle b/appactions/interaction/integration-tests/testapp/build.gradle
new file mode 100644
index 0000000..eb817cc
--- /dev/null
+++ b/appactions/interaction/integration-tests/testapp/build.gradle
@@ -0,0 +1,39 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import androidx.build.Publish
+
+plugins {
+ id("AndroidXPlugin")
+ id("com.android.application")
+ id("kotlin-android")
+}
+
+android {
+ defaultConfig {
+ applicationId "androidx.appactions.interaction.testapp"
+ minSdkVersion 26
+ }
+ namespace "androidx.appactions.interaction.testapp"
+}
+
+dependencies {
+ implementation(project(":appactions:interaction:interaction-service"))
+ implementation("androidx.core:core-ktx:1.7.0")
+ implementation("androidx.appcompat:appcompat:1.6.1")
+ implementation("com.google.android.material:material:1.6.0")
+ implementation("androidx.constraintlayout:constraintlayout:2.0.1")
+}
\ No newline at end of file
diff --git a/appactions/interaction/integration-tests/testapp/src/main/AndroidManifest.xml b/appactions/interaction/integration-tests/testapp/src/main/AndroidManifest.xml
new file mode 100644
index 0000000..0ad13f3
--- /dev/null
+++ b/appactions/interaction/integration-tests/testapp/src/main/AndroidManifest.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright 2023 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:tools="http://schemas.android.com/tools">
+
+ <application
+ android:allowBackup="true"
+ android:dataExtractionRules="@xml/data_extraction_rules"
+ android:fullBackupContent="@xml/backup_rules"
+ android:icon="@mipmap/ic_launcher"
+ android:label="@string/app_name"
+ android:roundIcon="@mipmap/ic_launcher_round"
+ android:supportsRtl="true"
+ android:theme="@style/Theme.AppInteractionTest"
+ tools:targetApi="31">
+ <activity
+ android:name=".MainActivity"
+ android:exported="true">
+ <intent-filter>
+ <action android:name="android.intent.action.MAIN"/>
+
+ <category android:name="android.intent.category.LAUNCHER"/>
+ </intent-filter>
+
+ <meta-data
+ android:name="android.app.lib_name"
+ android:value=""/>
+ </activity>
+ </application>
+
+</manifest>
\ No newline at end of file
diff --git a/appactions/interaction/integration-tests/testapp/src/main/java/androidx/appactions/interaction/testapp/MainActivity.kt b/appactions/interaction/integration-tests/testapp/src/main/java/androidx/appactions/interaction/testapp/MainActivity.kt
new file mode 100644
index 0000000..9f21059
--- /dev/null
+++ b/appactions/interaction/integration-tests/testapp/src/main/java/androidx/appactions/interaction/testapp/MainActivity.kt
@@ -0,0 +1,60 @@
+package androidx.appactions.interaction.testapp
+
+import android.os.Bundle
+import android.os.CountDownTimer
+import android.widget.TextView
+import android.widget.Toast
+import androidx.appcompat.app.AppCompatActivity
+import androidx.appcompat.widget.AppCompatButton
+import java.util.Locale
+import java.util.concurrent.TimeUnit
+
+class MainActivity : AppCompatActivity() {
+ private var duration = 59
+ private var hasRunningTimer = false
+
+ override fun onCreate(savedInstanceState: Bundle?) {
+ super.onCreate(savedInstanceState)
+ setContentView(R.layout.activity_main)
+
+ val hours: TextView = findViewById(R.id.hour)
+ val mins: TextView = findViewById(R.id.minute)
+ val seconds: TextView = findViewById(R.id.second)
+ val startButton: AppCompatButton = findViewById(R.id.startButton)
+
+ startButton.setOnClickListener {
+ if (!hasRunningTimer) {
+ hasRunningTimer = true
+ object : CountDownTimer((duration * 1000).toLong(), 1000) {
+ override fun onTick(millisUntilFinished: Long) {
+ runOnUiThread {
+ val time = String.format(
+ Locale.getDefault(),
+ "%02d:%02d:%02d",
+ TimeUnit.MILLISECONDS.toHours(millisUntilFinished),
+ TimeUnit.MILLISECONDS.toMinutes(millisUntilFinished) - TimeUnit.HOURS.toMinutes(
+ TimeUnit.MILLISECONDS.toHours(millisUntilFinished)
+ ),
+ TimeUnit.MILLISECONDS.toSeconds(millisUntilFinished) - TimeUnit.MINUTES.toSeconds(
+ TimeUnit.MILLISECONDS.toHours(millisUntilFinished)
+ )
+ )
+ val hourMinSecArray = time.split(":")
+ hours.text = hourMinSecArray[0]
+ mins.text = hourMinSecArray[1]
+ seconds.text = hourMinSecArray[2]
+ }
+ }
+
+ override fun onFinish() {
+ // Reset timer duration
+ duration = 59
+ hasRunningTimer = false
+ }
+ }.start()
+ } else {
+ Toast.makeText(this@MainActivity, "Timer is already running", Toast.LENGTH_SHORT).show()
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/appactions/interaction/integration-tests/testapp/src/main/res/drawable/ic_launcher_background.xml b/appactions/interaction/integration-tests/testapp/src/main/res/drawable/ic_launcher_background.xml
new file mode 100644
index 0000000..2be47c2
--- /dev/null
+++ b/appactions/interaction/integration-tests/testapp/src/main/res/drawable/ic_launcher_background.xml
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="utf-8"?>
+<vector
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="108dp"
+ android:height="108dp"
+ android:viewportHeight="108"
+ android:viewportWidth="108">
+ <path android:fillColor="#3DDC84"
+ android:pathData="M0,0h108v108h-108z"/>
+ <path android:fillColor="#00000000" android:pathData="M9,0L9,108"
+ android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
+ <path android:fillColor="#00000000" android:pathData="M19,0L19,108"
+ android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
+ <path android:fillColor="#00000000" android:pathData="M29,0L29,108"
+ android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
+ <path android:fillColor="#00000000" android:pathData="M39,0L39,108"
+ android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
+ <path android:fillColor="#00000000" android:pathData="M49,0L49,108"
+ android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
+ <path android:fillColor="#00000000" android:pathData="M59,0L59,108"
+ android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
+ <path android:fillColor="#00000000" android:pathData="M69,0L69,108"
+ android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
+ <path android:fillColor="#00000000" android:pathData="M79,0L79,108"
+ android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
+ <path android:fillColor="#00000000" android:pathData="M89,0L89,108"
+ android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
+ <path android:fillColor="#00000000" android:pathData="M99,0L99,108"
+ android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
+ <path android:fillColor="#00000000" android:pathData="M0,9L108,9"
+ android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
+ <path android:fillColor="#00000000" android:pathData="M0,19L108,19"
+ android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
+ <path android:fillColor="#00000000" android:pathData="M0,29L108,29"
+ android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
+ <path android:fillColor="#00000000" android:pathData="M0,39L108,39"
+ android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
+ <path android:fillColor="#00000000" android:pathData="M0,49L108,49"
+ android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
+ <path android:fillColor="#00000000" android:pathData="M0,59L108,59"
+ android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
+ <path android:fillColor="#00000000" android:pathData="M0,69L108,69"
+ android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
+ <path android:fillColor="#00000000" android:pathData="M0,79L108,79"
+ android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
+ <path android:fillColor="#00000000" android:pathData="M0,89L108,89"
+ android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
+ <path android:fillColor="#00000000" android:pathData="M0,99L108,99"
+ android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
+ <path android:fillColor="#00000000" android:pathData="M19,29L89,29"
+ android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
+ <path android:fillColor="#00000000" android:pathData="M19,39L89,39"
+ android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
+ <path android:fillColor="#00000000" android:pathData="M19,49L89,49"
+ android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
+ <path android:fillColor="#00000000" android:pathData="M19,59L89,59"
+ android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
+ <path android:fillColor="#00000000" android:pathData="M19,69L89,69"
+ android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
+ <path android:fillColor="#00000000" android:pathData="M19,79L89,79"
+ android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
+ <path android:fillColor="#00000000" android:pathData="M29,19L29,89"
+ android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
+ <path android:fillColor="#00000000" android:pathData="M39,19L39,89"
+ android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
+ <path android:fillColor="#00000000" android:pathData="M49,19L49,89"
+ android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
+ <path android:fillColor="#00000000" android:pathData="M59,19L59,89"
+ android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
+ <path android:fillColor="#00000000" android:pathData="M69,19L69,89"
+ android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
+ <path android:fillColor="#00000000" android:pathData="M79,19L79,89"
+ android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
+</vector>
diff --git a/appactions/interaction/integration-tests/testapp/src/main/res/drawable/round_back_black10_10.xml b/appactions/interaction/integration-tests/testapp/src/main/res/drawable/round_back_black10_10.xml
new file mode 100644
index 0000000..0d05958
--- /dev/null
+++ b/appactions/interaction/integration-tests/testapp/src/main/res/drawable/round_back_black10_10.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+ android:shape="rectangle">
+ <solid android:color="@color/cardview_dark_background"/>
+ <corners android:radius="10dp"/>
+</shape>
\ No newline at end of file
diff --git a/appactions/interaction/integration-tests/testapp/src/main/res/layout/activity_main.xml b/appactions/interaction/integration-tests/testapp/src/main/res/layout/activity_main.xml
new file mode 100644
index 0000000..305819b
--- /dev/null
+++ b/appactions/interaction/integration-tests/testapp/src/main/res/layout/activity_main.xml
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
+ xmlns:tools="http://schemas.android.com/tools"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:background="@color/primary"
+ tools:context=".MainActivity">
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="200dp"
+ android:gravity="center"
+ android:orientation="horizontal">
+ <TextView
+ android:id="@+id/hour"
+ android:layout_width="50dp"
+ android:layout_height="50dp"
+ android:background="@drawable/round_back_black10_10"
+ android:text="00"
+ android:textColor="#FFFFFF"
+ android:textStyle="bold"
+ android:textSize="30sp"
+ android:gravity="center"/>
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text=":"
+ android:textColor="#FFFFFF"
+ android:layout_marginStart="10dp"
+ android:layout_marginEnd="10dp"
+ android:textSize="30sp"
+ android:textStyle="bold"/>
+ <TextView
+ android:id="@+id/minute"
+ android:layout_width="50dp"
+ android:layout_height="50dp"
+ android:background="@drawable/round_back_black10_10"
+ android:text="00"
+ android:textColor="#FFFFFF"
+ android:textStyle="bold"
+ android:textSize="30sp"
+ android:gravity="center"/>
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text=":"
+ android:textColor="#FFFFFF"
+ android:layout_marginStart="10dp"
+ android:layout_marginEnd="10dp"
+ android:textSize="30sp"
+ android:textStyle="bold"/>
+ <TextView
+ android:id="@+id/second"
+ android:layout_width="50dp"
+ android:layout_height="50dp"
+ android:background="@drawable/round_back_black10_10"
+ android:text="00"
+ android:textColor="#FFFFFF"
+ android:textStyle="bold"
+ android:textSize="30sp"
+ android:gravity="center"/>
+ </LinearLayout>
+ <androidx.appcompat.widget.AppCompatButton
+ android:id="@+id/startButton"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:background="@color/secondary"
+ android:text="Start"
+ android:textColor="@color/white"
+ android:textAllCaps="true"
+ android:layout_alignParentBottom="true"
+ android:layout_centerHorizontal="true"
+ android:layout_marginBottom="100dp"/>
+</RelativeLayout>
\ No newline at end of file
diff --git a/appactions/interaction/integration-tests/testapp/src/main/res/mipmap-hdpi/ic_launcher.webp b/appactions/interaction/integration-tests/testapp/src/main/res/mipmap-hdpi/ic_launcher.webp
new file mode 100644
index 0000000..c209e78
--- /dev/null
+++ b/appactions/interaction/integration-tests/testapp/src/main/res/mipmap-hdpi/ic_launcher.webp
Binary files differ
diff --git a/appactions/interaction/integration-tests/testapp/src/main/res/mipmap-hdpi/ic_launcher_round.webp b/appactions/interaction/integration-tests/testapp/src/main/res/mipmap-hdpi/ic_launcher_round.webp
new file mode 100644
index 0000000..b2dfe3d
--- /dev/null
+++ b/appactions/interaction/integration-tests/testapp/src/main/res/mipmap-hdpi/ic_launcher_round.webp
Binary files differ
diff --git a/appactions/interaction/integration-tests/testapp/src/main/res/mipmap-mdpi/ic_launcher.webp b/appactions/interaction/integration-tests/testapp/src/main/res/mipmap-mdpi/ic_launcher.webp
new file mode 100644
index 0000000..4f0f1d6
--- /dev/null
+++ b/appactions/interaction/integration-tests/testapp/src/main/res/mipmap-mdpi/ic_launcher.webp
Binary files differ
diff --git a/appactions/interaction/integration-tests/testapp/src/main/res/mipmap-mdpi/ic_launcher_round.webp b/appactions/interaction/integration-tests/testapp/src/main/res/mipmap-mdpi/ic_launcher_round.webp
new file mode 100644
index 0000000..62b611d
--- /dev/null
+++ b/appactions/interaction/integration-tests/testapp/src/main/res/mipmap-mdpi/ic_launcher_round.webp
Binary files differ
diff --git a/appactions/interaction/integration-tests/testapp/src/main/res/mipmap-xhdpi/ic_launcher.webp b/appactions/interaction/integration-tests/testapp/src/main/res/mipmap-xhdpi/ic_launcher.webp
new file mode 100644
index 0000000..948a307
--- /dev/null
+++ b/appactions/interaction/integration-tests/testapp/src/main/res/mipmap-xhdpi/ic_launcher.webp
Binary files differ
diff --git a/appactions/interaction/integration-tests/testapp/src/main/res/mipmap-xhdpi/ic_launcher_round.webp b/appactions/interaction/integration-tests/testapp/src/main/res/mipmap-xhdpi/ic_launcher_round.webp
new file mode 100644
index 0000000..1b9a695
--- /dev/null
+++ b/appactions/interaction/integration-tests/testapp/src/main/res/mipmap-xhdpi/ic_launcher_round.webp
Binary files differ
diff --git a/appactions/interaction/integration-tests/testapp/src/main/res/mipmap-xxhdpi/ic_launcher.webp b/appactions/interaction/integration-tests/testapp/src/main/res/mipmap-xxhdpi/ic_launcher.webp
new file mode 100644
index 0000000..28d4b77
--- /dev/null
+++ b/appactions/interaction/integration-tests/testapp/src/main/res/mipmap-xxhdpi/ic_launcher.webp
Binary files differ
diff --git a/appactions/interaction/integration-tests/testapp/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp b/appactions/interaction/integration-tests/testapp/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp
new file mode 100644
index 0000000..9287f50
--- /dev/null
+++ b/appactions/interaction/integration-tests/testapp/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp
Binary files differ
diff --git a/appactions/interaction/integration-tests/testapp/src/main/res/mipmap-xxxhdpi/ic_launcher.webp b/appactions/interaction/integration-tests/testapp/src/main/res/mipmap-xxxhdpi/ic_launcher.webp
new file mode 100644
index 0000000..aa7d642
--- /dev/null
+++ b/appactions/interaction/integration-tests/testapp/src/main/res/mipmap-xxxhdpi/ic_launcher.webp
Binary files differ
diff --git a/appactions/interaction/integration-tests/testapp/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp b/appactions/interaction/integration-tests/testapp/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp
new file mode 100644
index 0000000..9126ae3
--- /dev/null
+++ b/appactions/interaction/integration-tests/testapp/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp
Binary files differ
diff --git a/appactions/interaction/integration-tests/testapp/src/main/res/values-night/themes.xml b/appactions/interaction/integration-tests/testapp/src/main/res/values-night/themes.xml
new file mode 100644
index 0000000..cf79c9e
--- /dev/null
+++ b/appactions/interaction/integration-tests/testapp/src/main/res/values-night/themes.xml
@@ -0,0 +1,17 @@
+<resources xmlns:tools="http://schemas.android.com/tools">
+ <!-- Base application theme. -->
+ <style name="Theme.AppInteractionTest"
+ parent="Theme.MaterialComponents.DayNight.DarkActionBar">
+ <!-- Primary brand color. -->
+ <item name="colorPrimary">@color/purple_200</item>
+ <item name="colorPrimaryVariant">@color/purple_700</item>
+ <item name="colorOnPrimary">@color/black</item>
+ <!-- Secondary brand color. -->
+ <item name="colorSecondary">@color/teal_200</item>
+ <item name="colorSecondaryVariant">@color/teal_200</item>
+ <item name="colorOnSecondary">@color/black</item>
+ <!-- Status bar color. -->
+ <item name="android:statusBarColor">?attr/colorPrimaryVariant</item>
+ <!-- Customize your theme here. -->
+ </style>
+</resources>
\ No newline at end of file
diff --git a/appactions/interaction/integration-tests/testapp/src/main/res/values/colors.xml b/appactions/interaction/integration-tests/testapp/src/main/res/values/colors.xml
new file mode 100644
index 0000000..fc67530
--- /dev/null
+++ b/appactions/interaction/integration-tests/testapp/src/main/res/values/colors.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <color name="purple_200">#FFBB86FC</color>
+ <color name="purple_500">#FF6200EE</color>
+ <color name="purple_700">#FF3700B3</color>
+ <color name="teal_200">#FF03DAC5</color>
+ <color name="teal_700">#FF018786</color>
+ <color name="black">#FF000000</color>
+ <color name="white">#FFFFFFFF</color>
+
+ <color name="primary">#1E1B1C</color>
+ <color name="secondary">@color/teal_700</color>
+</resources>
\ No newline at end of file
diff --git a/appactions/interaction/integration-tests/testapp/src/main/res/values/donottranslate-strings.xml b/appactions/interaction/integration-tests/testapp/src/main/res/values/donottranslate-strings.xml
new file mode 100644
index 0000000..37ed16e7
--- /dev/null
+++ b/appactions/interaction/integration-tests/testapp/src/main/res/values/donottranslate-strings.xml
@@ -0,0 +1,3 @@
+<resources>
+ <string name="app_name">App Interaction Test</string>
+</resources>
\ No newline at end of file
diff --git a/appactions/interaction/integration-tests/testapp/src/main/res/values/themes.xml b/appactions/interaction/integration-tests/testapp/src/main/res/values/themes.xml
new file mode 100644
index 0000000..22e6872
--- /dev/null
+++ b/appactions/interaction/integration-tests/testapp/src/main/res/values/themes.xml
@@ -0,0 +1,17 @@
+<resources xmlns:tools="http://schemas.android.com/tools">
+ <!-- Base application theme. -->
+ <style name="Theme.AppInteractionTest"
+ parent="Theme.MaterialComponents.DayNight.NoActionBar">
+ <!-- Primary brand color. -->
+ <item name="colorPrimary">@color/purple_500</item>
+ <item name="colorPrimaryVariant">@color/purple_700</item>
+ <item name="colorOnPrimary">@color/white</item>
+ <!-- Secondary brand color. -->
+ <item name="colorSecondary">@color/teal_200</item>
+ <item name="colorSecondaryVariant">@color/teal_700</item>
+ <item name="colorOnSecondary">@color/black</item>
+ <!-- Status bar color. -->
+ <item name="android:statusBarColor">?attr/colorPrimaryVariant</item>
+ <!-- Customize your theme here. -->
+ </style>
+</resources>
\ No newline at end of file
diff --git a/appactions/interaction/integration-tests/testapp/src/main/res/xml/backup_rules.xml b/appactions/interaction/integration-tests/testapp/src/main/res/xml/backup_rules.xml
new file mode 100644
index 0000000..7a180f4
--- /dev/null
+++ b/appactions/interaction/integration-tests/testapp/src/main/res/xml/backup_rules.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Sample backup rules file; uncomment and customize as necessary.
+ See https://developer.android.com/guide/topics/data/autobackup
+ for details.
+ Note: This file is ignored for devices older that API 31
+ See https://developer.android.com/about/versions/12/backup-restore
+-->
+<full-backup-content>
+ <!--
+ <include domain="sharedpref" path="."/>
+ <exclude domain="sharedpref" path="device.xml"/>
+-->
+</full-backup-content>
\ No newline at end of file
diff --git a/appactions/interaction/integration-tests/testapp/src/main/res/xml/data_extraction_rules.xml b/appactions/interaction/integration-tests/testapp/src/main/res/xml/data_extraction_rules.xml
new file mode 100644
index 0000000..84910a7
--- /dev/null
+++ b/appactions/interaction/integration-tests/testapp/src/main/res/xml/data_extraction_rules.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Sample data extraction rules file; uncomment and customize as necessary.
+ See https://developer.android.com/about/versions/12/backup-restore#xml-changes
+ for details.
+-->
+<data-extraction-rules>
+ <cloud-backup>
+ <!-- TODO: Use <include> and <exclude> to control what is backed up.
+ <include .../>
+ <exclude .../>
+ -->
+ </cloud-backup>
+ <!--
+ <device-transfer>
+ <include .../>
+ <exclude .../>
+ </device-transfer>
+ -->
+</data-extraction-rules>
\ No newline at end of file
diff --git a/settings.gradle b/settings.gradle
index ce5f1f94..7316d0f 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -424,6 +424,7 @@
includeProject(":appactions:interaction:interaction-proto", [BuildType.MAIN])
includeProject(":appactions:interaction:interaction-service", [BuildType.MAIN])
includeProject(":appactions:interaction:interaction-service-proto", [BuildType.MAIN])
+includeProject(":appactions:interaction:integration-tests:testapp", [BuildType.MAIN])
includeProject(":appcompat:appcompat", [BuildType.MAIN])
includeProject(":appcompat:appcompat-benchmark", [BuildType.MAIN])
includeProject(":appcompat:appcompat-lint", [BuildType.MAIN])