diff --git a/PRIVACY_POLICY.md b/PRIVACY_POLICY.md
index ebad921..d56e12d 100644
--- a/PRIVACY_POLICY.md
+++ b/PRIVACY_POLICY.md
@@ -4,22 +4,34 @@ Welcome to the RecentApps app for Android!
This is a utility app designed to add a custom shortcut to your device. As the developer, I take your privacy very seriously. I have not programmed this app to collect any personally identifiable information.
+---
+
+### 🚨 Prominent Disclosure Regarding Accessibility Services
+
+To provide its core functionality (shortcut for recent apps), RecentApps uses the **Android Accessibility API**.
+
+**What this means for you:**
+* **Purpose:** RecentApps uses the Accessibility Service solely to detect a **long-press gesture** on the system's Home button or Gesture Navigation Bar.
+* **Action:** When this gesture is detected, the app performs a system action to open the "Recent Applications" screen.
+* **Data Collection & Sharing:** RecentApps **does not collect, store, or share** any personal or sensitive data through the Accessibility API. We do not monitor your screen content, log your keystrokes, or track your notifications.
+* **User Consent:** This service is only activated if you explicitly grant permission in your device's Accessibility settings. You can revoke this permission at any time.
+
+---
+
### Data Collected by the App
I hereby state that RecentApps **does not collect, store, or transmit any personally identifiable information**. All data created by the app, such as user preferences, is stored locally in your device's private storage. This data can be erased at any time by clearing the app's data or uninstalling it. No analytics or tracking software is present in the app.
### Explanation of Permissions Requested in the App
-The list of permissions required by the app can be found in the `AndroidManifest.xml` file. Below is an explanation for why each permission is necessary for the app to function.
-
| Permission | Why it is required |
| :---: | --- |
-| `android.permission.BIND_ACCESSIBILITY_SERVICE` | This is the core permission that enables the app's main feature. The Accessibility Service is used to listen for `AccessibilityEvent`s of type `TYPE_VIEW_LONG_CLICKED` on the system's home button or gesture navigation bar. **The service does not monitor, log, or store any text you type, your notifications, or any other content on your screen.** Its sole purpose is to provide the long-press shortcut. |
-| `android.permission.VIBRATE` | This permission is used to provide brief haptic feedback (a small vibration) when a valid long-press gesture is successfully detected. This confirms to the user that the action was registered. |
+| `android.permission.BIND_ACCESSIBILITY_SERVICE` | Required to detect the long-press gesture on system navigation elements. |
+| `android.permission.VIBRATE` | Used to provide brief haptic feedback (a small vibration) when a valid gesture is detected. |
-If you have any questions or concerns regarding how the app protects your privacy, please feel free to send me an email.
+If you have any questions or concerns regarding how the app protects your privacy, please feel free to contact me.
Yours sincerely,
Crispim.
\ No newline at end of file
diff --git a/app/build.gradle.kts b/app/build.gradle.kts
index 1b7e69c..24e98fc 100644
--- a/app/build.gradle.kts
+++ b/app/build.gradle.kts
@@ -23,12 +23,13 @@ android {
buildTypes {
release {
isMinifyEnabled = true
+ isShrinkResources = true
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
ndk {
- debugSymbolLevel = "SYMBOL_TABLE"
+ debugSymbolLevel = "FULL"
}
}
}
diff --git a/app/src/main/java/com/crispim/recentapps/MainActivity.kt b/app/src/main/java/com/crispim/recentapps/MainActivity.kt
index c2dcedb..242adb7 100644
--- a/app/src/main/java/com/crispim/recentapps/MainActivity.kt
+++ b/app/src/main/java/com/crispim/recentapps/MainActivity.kt
@@ -27,6 +27,7 @@ import androidx.compose.foundation.verticalScroll
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.rounded.Info
import androidx.compose.material.icons.rounded.ScreenRotation
+import androidx.compose.material3.AlertDialog
import androidx.compose.material3.Button
import androidx.compose.material3.ButtonDefaults
import androidx.compose.material3.Card
@@ -36,6 +37,7 @@ import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.OutlinedButton
import androidx.compose.material3.Surface
import androidx.compose.material3.Text
+import androidx.compose.material3.TextButton
import androidx.compose.material3.lightColorScheme
import androidx.compose.runtime.Composable
import androidx.compose.runtime.DisposableEffect
@@ -97,6 +99,7 @@ class MainActivity : ComponentActivity() {
@Composable
fun SettingsScreen() {
val context = LocalContext.current
+ var showDisclosureDialog by remember { mutableStateOf(false) }
var hasAccessibilityPermission by remember {
mutableStateOf(isAccessibilityServiceEnabled(context, MainService::class.java))
}
@@ -114,6 +117,17 @@ class MainActivity : ComponentActivity() {
}
}
+ if (showDisclosureDialog) {
+ AccessibilityDisclosureDialog(
+ onConfirm = {
+ showDisclosureDialog = false
+ val intent = Intent(Settings.ACTION_ACCESSIBILITY_SETTINGS)
+ context.startActivity(intent)
+ },
+ onDismiss = { showDisclosureDialog = false }
+ )
+ }
+
Column(
modifier = Modifier
.fillMaxSize()
@@ -170,8 +184,7 @@ class MainActivity : ComponentActivity() {
ConfigButton(
text = "Enable Accessibility Service",
onClick = {
- val intent = Intent(Settings.ACTION_ACCESSIBILITY_SETTINGS)
- context.startActivity(intent)
+ showDisclosureDialog = true
}
)
}
@@ -193,7 +206,7 @@ class MainActivity : ComponentActivity() {
fontWeight = FontWeight.SemiBold
)
Text(
- text = if (hasAccessibilityPermission) "Service is ready. Hold the home button to use" else "Service needs permission",
+ text = if (hasAccessibilityPermission) "Service is active. Long-press the Home button to open Recent Apps. (Note: Gesture navigation is not supported yet)" else "Service needs permission",
style = MaterialTheme.typography.bodySmall,
color = Color.Gray
)
@@ -301,6 +314,37 @@ class MainActivity : ComponentActivity() {
}
}
+ @Composable
+ fun AccessibilityDisclosureDialog(onConfirm: () -> Unit, onDismiss: () -> Unit) {
+ AlertDialog(
+ onDismissRequest = onDismiss,
+ title = {
+ Text(
+ text = "Accessibility API Usage",
+ fontWeight = FontWeight.Bold
+ )
+ },
+ text = {
+ Text(
+ text = "This app requires the Accessibility Service API to provide its core functionality: Long-press the Home button to open Recent Apps.\n\n" +
+ "• We DO NOT collect, store, or share any personal or sensitive data from your screen.\n" +
+ "• You can disable this permission at any time in the system settings."
+ )
+ },
+ confirmButton = {
+ Button(onClick = onConfirm) {
+ Text("Accept and Enable")
+ }
+ },
+ dismissButton = {
+ TextButton(onClick = onDismiss) {
+ Text("Decline")
+ }
+ },
+ shape = RoundedCornerShape(24.dp)
+ )
+ }
+
private fun isAccessibilityServiceEnabled(context: Context, service: Class<*>): Boolean {
val enabledServices = Settings.Secure.getString(
context.contentResolver,
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index b02416c..dbed50a 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -1,5 +1,4 @@
RecentApps
- Overlay para controle de rotação em telas dobráveis
- O CoverSpin precisa deste serviço para manter a rotação ativa e executar gestos na tela de capa.
+ RecentApps uses this service to detect user commands and quickly switch between recently opened applications.
\ No newline at end of file
diff --git a/app/src/main/res/xml/accessibility_service_config.xml b/app/src/main/res/xml/accessibility_service_config.xml
index 2ee948b..9b1c8a0 100644
--- a/app/src/main/res/xml/accessibility_service_config.xml
+++ b/app/src/main/res/xml/accessibility_service_config.xml
@@ -1,7 +1,6 @@