Skip to content

Feature/samsung routine bluetooth autostart#9

Merged
ganzvu merged 2 commits into
mainfrom
feature/samsung-routine-bluetooth-autostart
Jun 2, 2026
Merged

Feature/samsung routine bluetooth autostart#9
ganzvu merged 2 commits into
mainfrom
feature/samsung-routine-bluetooth-autostart

Conversation

@ganzvu

@ganzvu ganzvu commented Jun 2, 2026

Copy link
Copy Markdown
Owner

No description provided.

ganzvu and others added 2 commits June 1, 2026 19:15
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Copilot AI review requested due to automatic review settings June 2, 2026 00:31
@ganzvu ganzvu merged commit e7bd193 into main Jun 2, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a Samsung Modes & Routines-friendly entry point to start/stop GestureService via app shortcuts / app actions, and refactors service start/stop logic into a reusable controller to support “autostart on car Bluetooth connect” workflows.

Changes:

  • Add static app shortcuts and a new RoutineTriggerActivity to start/stop the gesture listening service from external automation tools (e.g., Samsung Routines).
  • Introduce GestureServiceController and refactor MainActivity to use it for starting/stopping and checking running state.
  • Update build configuration (AGP bump; packaging JNI libs config) and add Settings UI guidance for Samsung Routine setup.

Reviewed changes

Copilot reviewed 9 out of 10 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
build.gradle.kts Bumps Android Gradle Plugin version.
app/build.gradle.kts Adjusts packaging configuration for JNI libs.
app/src/main/AndroidManifest.xml Registers static shortcuts metadata and new exported routine trigger activity.
app/src/main/res/xml/shortcuts.xml Adds static shortcuts for “Start/Stop DriveSwipe”.
app/src/main/res/values/strings.xml Adds shortcut labels.
app/src/main/java/com/example/driveswipe/ServiceContract.kt Adds routine start/stop action constants.
app/src/main/java/com/example/driveswipe/RoutineTriggerActivity.kt New activity that starts/stops the service based on incoming action.
app/src/main/java/com/example/driveswipe/MainActivity.kt Uses GestureServiceController and syncs service-running UI state.
app/src/main/java/com/example/driveswipe/GestureServiceController.kt New controller for intent building, permission checks, start/stop, and running-state query.
app/src/main/java/com/example/driveswipe/DriveSwipeApp.kt Adds Settings UI instructions for Samsung Routine autostart.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +48 to +55
<intent-filter>
<action android:name="com.example.driveswipe.action.ROUTINE_START" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
<intent-filter>
<action android:name="com.example.driveswipe.action.ROUTINE_STOP" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
Comment on lines +62 to +66
fun isRunning(context: Context): Boolean {
val activityManager = context.getSystemService(Context.ACTIVITY_SERVICE) as ActivityManager
return activityManager.getRunningServices(Int.MAX_VALUE).any { serviceInfo ->
serviceInfo.service.className == GestureService::class.java.name
}
} else {
registerReceiver(serviceEventReceiver, filter)
}
viewModel.setServiceRunning(GestureServiceController.isRunning(this))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants