Surface Duo Blog

2023 year in review

Hello Android developers, 2023 was the year that machine learning and artificial intelligence really became mainstream, and we covered both topics with a focus on Android implementations. We published series on using the ONNX machine learning runtime, building Android apps with Microsoft Graph, and tutorials for Jetpack Compose ...

Use ONNX Runtime in Flutter

Hello Flutter developers! After recently reading about how Pieces.app uses ONNX runtime inside a Flutter app, I was determined to try it myself. This article shows a summary of the journey I took and provides a few tips for you if you want to do the same. Since we have FFI in Dart for calling C code and ONNX Runtime offers a C ...

JetchatAI gets smarter with embeddings

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 ...

Microsoft Build 2023 recap

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 ...

ChatGPT on Android with OpenAI

Hello prompt engineers, OpenAI has been in the news a lot recently, with the release of ChatGPT 4 and the integration of Large Language Model (LLM)-driven features into a variety of products and services including Bing, GitHub, and Microsoft 365 applications. Inspired by Syncfusion’s blog post on adding ChatGPT to their ....

OpenAI Android developer assistance

Hello budding prompt engineers, Many developers are already getting assistance from GitHub Copilot completing code and more recently the conversational additions to GitHub pull requests, documentation, and the CLI. In this post we’ll look at some of the ways that Android developers can take advantage of OpenAI- and ChatGPT-powered...

Built-in model pre-processing with ONNX

Hello Android developers, Previously we looked at how to pre-process image inputs for an ONNX model using Kotlin. It’s useful to understand this process because the principles apply to any model that you wish to use. On the other hand, having to write boilerplate code for input processing can be tedious – it also means there’s...

Bringing ONNX models to Android

Hello Android developers, One of the advantages of the ONNX runtime is the ability to run locally on a variety of devices, including mobile devices. This means that your users get fast response times, but also comes with the need to respect mobile device limitations such as app size and the ability to support performance ...

ONNX runtime inputs and outputs

Hello Android developers, Last week we got an ONNX runtime demo running on Android, which classified the subject of images being streamed from the device’s camera. Setup required downloading a pre-trained model and adding it to the sample app on GitHub. This week we’re going to look into the details of preparing inputs for the ...

On-device machine learning with ONNX

Hello Android developers, This week we’re going to get started with on-device machine learning using the ONNX Runtime and check out an Android sample that identifies the objects using the camera video stream. What is ONNX? ONNX stands for Open Neural Network eXchange and is an open-source format for AI models. ONNX supports...