Skip to content

Appfunctions media attachments#27

Open
calebareeveso wants to merge 7 commits into
android:mainfrom
calebareeveso:appfunctions-media-attachments
Open

Appfunctions media attachments#27
calebareeveso wants to merge 7 commits into
android:mainfrom
calebareeveso:appfunctions-media-attachments

Conversation

@calebareeveso

Copy link
Copy Markdown
Contributor

Screenshots

s-1 s-2 s-3 s-4

What I have done and why

Added support for sending image attachments and changing chat wallpapers across the Agent and ChatApp, and updated all code to work with appfunctions 1.0.0-alpha10 .

Summary of Changes

ChatApp:

  • Added imageUris to send(...) so users can attach images to chat messages.
  • Added updateChatWallpaper(...) so users can change a conversation's wallpaper.
  • Updated chat AppFunctions to the new 1.0.0-alpha10 AppFunctionService format.

Agent App:

  • Automatically grants temporary read permission (FLAG_GRANT_READ_URI_PERMISSION ) whenever sending local content:// image URIs to another app
  • Displays image preview cards in the chat window for AI-generated images
  • Fixed an API crash (HTTP 400 Duplicate function declaration) that happened when both phone and Wear OS companion apps were installed

Caleb Areeveso added 6 commits July 8, 2026 20:22
Change-Id: Ie5a3a97c4dc2eefe349f0df22313f2bc12fcfe01
Change-Id: Ie3fbb88ae72223cc9b1fb29ca226fdc045200104
Change-Id: Id88dc93971c3c21a8044d125070785dd3c879fb9
… Gemini tool names

Change-Id: Id2ff4aadfceddbc3b2a4b720eb882323f0cad7d8
…rt wallpaper support

Change-Id: Ie24524f68e30243682a31d3b99701aae760fff20
Change-Id: I5f3f8d62d3be770e5035fc1c785b346ca74695e1

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request introduces support for custom chat wallpapers in the ChatApp and adds image generation capabilities to the AI agent using the Gemini API. Key changes include the creation of a WallpaperRepository to manage chat backgrounds, updates to the UI to render wallpapers, and enhancements to the agent's orchestrator to handle remote file references, download them to local cache, and grant URI permissions. Feedback on these changes highlights three main areas for improvement: adding connection and read timeouts to the HttpURLConnection used for downloading files, offloading blocking disk I/O operations in the wallpaper flow to Dispatchers.IO to prevent UI stutters, and wrapping contentResolver.openInputStream in a try-catch block to gracefully handle potential security or file-not-found exceptions.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread ChatApp/shared/src/main/kotlin/com/example/chatapp/data/WallpaperRepository.kt Outdated
Change-Id: I7d56a269f7965e54ce98f84595a12f3035891056
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.

1 participant