Surface Duo Blog

Build great Android experiences, from AI to foldable and large-screens.

Latest posts

Announcing FoldAwareColumn in Accompanist Adaptive
Jun 22, 2023
Post comments count 0
Post likes count 0

Announcing FoldAwareColumn in Accompanist Adaptive

Kristen Halper Jossi Wolf
Kristen,
Jossi

Hello Jetpack Compose developers, This week, we’re super excited to announce the release of ! This new component is part of Accompanist, Google’s “sandbox” for experimental Jetpack Compose APIs. The Accompanist Adaptive library already contains the component, which we tested out late last year, so will be the second component to join the library. Figure 1. lays out children like a typical (left) unless a separating fold is present, in which case it places children around the fold to ensure that visuals and controls are accessible (right). Component inspiration We first started talking ...

JetchatAI gets smarter with embeddings
Jun 15, 2023
Post comments count 0
Post likes count 1

JetchatAI gets smarter with embeddings

Craig Dunn
Craig Dunn

Hello prompt engineers, A few weeks ago we finished a series of posts building an AI chatbot using the Jetchat sample with OpenAI. The sample uses the chat and image endpoints, but has the same limitation as many LLMs, which is that its knowledge is limited to the training data (for example, anything after September 2021 is not included). A common requirement for extending these models is to respond with newer data, or internal corporate data, that isn’t part of the model. Re-training isn’t an option, so other patterns have emerged to incorporate additional datasets into chat conversations. I pr...

Improved navigation support in TwoPaneLayout
Jun 8, 2023
Post comments count 0
Post likes count 0

Improved navigation support in TwoPaneLayout

Kristen Halper
Kristen Halper

Hello Jetpack Compose developers, This week, we’re excited to announce an update to our TwoPaneLayout library! You can now use with destinations that accept navigation arguments. This new feature was originally suggested by two developers in our feedback forum, so special thanks to @tscholze and @Papes96 for staying involved in our developer community and helping improve the SDK for everyone. Add TwoPaneLayout to your project To import the new version of TwoPaneLayout, follow these steps: Navigate with arguments With this new update, you can continue using in the sam...

Microsoft Build 2023 recap
Jun 1, 2023
Post comments count 0
Post likes count 1

Microsoft Build 2023 recap

Guy Merin
Guy Merin

Hello mobile developers, Microsoft Build 2023 took place last week, with a big focus on AI technologies. You can find the complete catalog of sessions on the Build website, but we’ve selected a few sessions below that cover topics of interest for mobile developers. The age of AI These sessions cover some of the high-level concepts and big announcements. Keynote – Satya Nadella reviews the recent history of Microsoft’s recent AI releases, like GitHub Copilot, Bing, Power Platform, Microsoft 365, Dynamics 365, and more. He also highlights five of the 50+ product announcements planned for Build...

Blossoming love for Compose animation
May 25, 2023
Post comments count 0
Post likes count 1

Blossoming love for Compose animation

Kristen Halper
Kristen Halper

Hello Jetpack Compose developers, Today we’ll be finishing up our blog series on animations in Jetpack Compose! This content was inspired by Nicole Terc’s Composable Sheep talk from droidcon NYC. Over the past two weeks, we covered some basics graphics, animation canvases, and basic animations. This week, we’ll polish up our garden with some more complex animation combos and background shaders. Creating more complex animations We’ll be continuing to use our method and composable to build animations in this post, so if you haven’t already, check out the previous blog posts to see how ...

Blooming love for Compose animation
May 18, 2023
Post comments count 0
Post likes count 1

Blooming love for Compose animation

Kristen Halper
Kristen Halper

Hello Jetpack Compose developers, Today we’ll be continuing our blog series on animations in Jetpack Compose! This content was inspired by Nicole Terc’s Composable Sheep talk from droidcon NYC. More basic animations We’ll be continuing to use our method and composable to build animations in this post, so if you haven’t already, check out last week’s blog post to see how we built those functions! Last week, we took a look at implementing a basic size animation for our sunflower garden. Today, we’ll learn how to do animations with two other properties: angle and color. Rotation a...

Budding love for compose animation
May 11, 2023
Post comments count 0
Post likes count 2

Budding love for compose animation

Kristen Halper
Kristen Halper

Hello Jetpack Compose developers, Last week, we did some Compose animation work to build a typing indicator in a chat app. For our next blog series, I’ll be diving into more animation topics with a project inspired by Nicole Terc’s Composable Sheep talk from droidcon NYC. Her composable sheep talk series inspired me to work on my own colorful and playful animated garden project while learning Compose Multiplatform! Inspiration For those of you who haven’t had a chance yet, I’d highly recommend watching the original Compose Sheep talk. There’s also a Composable Sheep sequel from droidcon London,...

JetchatGPT improvements: error handling and animations
May 4, 2023
Post comments count 0
Post likes count 1

JetchatGPT improvements: error handling and animations

Kristen Halper
Kristen Halper

Hello prompt engineers and Jetpack Compose developers, Last week, we introduced the JetchatGPT sample to show you how to integrate the OpenAI chat API into an Android app. Instead of building requests manually like in previous blog posts, we showed you how to use the openai-kotlin client library to make it easier to interact with the chat endpoint. This week, we’ll show you how to improve the JetchatGPT user experience by adding error handling when using the client library and building some cool animations! JetchatGPT overview As a reminder, the JetchatGPT sample is a forked version of...

Jetchat with OpenAI on Android
Apr 27, 2023
Post comments count 0
Post likes count 1

Jetchat with OpenAI on Android

Craig Dunn Kristen Halper Parker Schroeder
Craig,
Kristen,
Parker

Hello prompt engineers, The last three blogs have been about exploring the OpenAI API completion, edit, and image endpoints from Android, using HttpClient and crafting JSON requests and responses. This post is about implementing the chat API in an Android app, using the open-source client library openai-kotlin on GitHub. The library makes it easier to interact with the chat endpoint because the JSON schema for the request and response is more complicated than the other endpoints which have just one or two parameters and a single response field. “Chatting” is a common way for people to experience...