Skip to content

Integrate with Assistant#88

Merged
pawcoding merged 4 commits into
stagingfrom
feat/assistant
Apr 12, 2026
Merged

Integrate with Assistant#88
pawcoding merged 4 commits into
stagingfrom
feat/assistant

Conversation

@pawcoding
Copy link
Copy Markdown
Owner

Add shortcuts.xml with capabilities to integrate the app with Assistant.

Also bump max shortcuts from 3 to the max amount that the users device allows.

This is currently in internal testing and not yet available to the public

@pawcoding pawcoding self-assigned this Apr 5, 2026
@pawcoding pawcoding marked this pull request as ready for review April 12, 2026 17:32
Copilot AI review requested due to automatic review settings April 12, 2026 17:32
@pawcoding pawcoding merged commit 4c4531b into staging Apr 12, 2026
2 checks passed
@pawcoding pawcoding deleted the feat/assistant branch April 12, 2026 17:32
@pawcoding pawcoding mentioned this pull request Apr 12, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds initial Google Assistant / App Actions integration by declaring an OPEN_APP_FEATURE capability and binding dynamic shortcuts to that capability, while also expanding the number of generated shortcuts to the device-supported maximum.

Changes:

  • Add res/xml/shortcuts.xml declaring an actions.intent.OPEN_APP_FEATURE capability and fulfillment intent.
  • Update dynamic shortcut generation to use ShortcutManagerCompat.getMaxShortcutCountPerActivity() and bind each shortcut to the capability/parameter.
  • Reference @xml/shortcuts from the manifest; update .gitignore for docs folders.

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 2 comments.

File Description
app/src/main/res/xml/shortcuts.xml Declares Assistant capability + fulfillment intent for opening a card feature.
app/src/main/java/de/pawcode/cardstore/data/utils/ShortcutUpdater.kt Uses device max shortcut count and adds capability binding to generated shortcuts.
app/src/main/AndroidManifest.xml Adds android.app.shortcuts meta-data pointing at @xml/shortcuts.
.gitignore Ignores additional docs directories.

Comment on lines +47 to +49
<meta-data
android:name="android.app.shortcuts"
android:resource="@xml/shortcuts" />
Copy link

Copilot AI Apr 12, 2026

Choose a reason for hiding this comment

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

android.app.shortcuts meta-data is declared inside the MainActivity element. The platform reads the android.app.shortcuts resource from the <application> meta-data, so placing it on an <activity> can prevent the shortcuts/capabilities from being discovered. Move this <meta-data> to the <application> element (and remove it from the activity).

Copilot uses AI. Check for mistakes.
Comment on lines +3 to +10
<capability android:name="actions.intent.OPEN_APP_FEATURE">
<shortcut-fulfillment>
<parameter android:name="feature.name" />
</shortcut-fulfillment>
<intent
android:action="de.pawcode.cardstore.ACTION_VIEW_CARD"
android:targetClass="de.pawcode.cardstore.CardOverlayActivity" />
</capability>
Copy link

Copilot AI Apr 12, 2026

Choose a reason for hiding this comment

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

The capability intent launches CardOverlayActivity without providing CardOverlayActivity.EXTRA_CARD_ID. As implemented, CardOverlayActivity immediately calls finish() when the extra is missing, so this fulfillment intent can never successfully display a card. Either target an activity/route that can handle the feature.name parameter, or update the launched activity to gracefully handle missing card_id (e.g., resolve by store name and show a selector).

Suggested change
<capability android:name="actions.intent.OPEN_APP_FEATURE">
<shortcut-fulfillment>
<parameter android:name="feature.name" />
</shortcut-fulfillment>
<intent
android:action="de.pawcode.cardstore.ACTION_VIEW_CARD"
android:targetClass="de.pawcode.cardstore.CardOverlayActivity" />
</capability>

Copilot uses AI. Check for mistakes.
@pawcode-development-releaser
Copy link
Copy Markdown

🎉 This PR is included in version 1.6.0-staging.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@pawcode-development-releaser
Copy link
Copy Markdown

🎉 This PR is included in version 1.6.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants