Skip to content

Conversation

@FlynnD273
Copy link
Contributor

Android doesn't really do per-notification vibration patterns anymore as far as I can tell. This PR pulls the vibration pattern from the Notification Channel, and from the extra field in Tasker's AutoNotification plugin. The Notification Channel code adds a 0 at the beginning of the pattern to match Android's vibration pattern syntax, and the Autonotification code doesn't, to match with Pebble's vibration pattern syntax. This replaces #71.

val id: String,
val name: String,
val muteState: MuteState,
val vibrationPattern: List<UInt>? = null,
Copy link
Member

Choose a reason for hiding this comment

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

This won't work unless you bump the database version and add a migration to create the column - see e.g. https://github.com/coredevices/CoreApp/commit/d1e34ef7116aa69170ff47ba9561a144a8bd9873#diff-4bbbd39fe1ff5faa4ceef66355eb272f66db7ac0e0e462a95647c1b6c4272ea7 (otherwiswe it will crash, unless you're running a fresh install of the app)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Huh. It was crashing before I added the default value, but it was working fine for me after I set the default value. Maybe it just ignores that column in the db right now?

Copy link
Member

Choose a reason for hiding this comment

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

Oh my bad - got confused with db fields vs this object which is serialized into a db field (so adding the default value fixing it makes sense)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sounds good. So I think I can just leave it, right? The vibration pattern just won't get added to the db as a column?

@sjp4 sjp4 merged commit 47f3779 into coredevices:master Dec 23, 2025
2 checks passed
@FlynnD273 FlynnD273 deleted the channel-vibration-patterns branch December 23, 2025 17:51
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