Android Social & Messaging Samples
A selection of code samples for you to use to accelerate your app development. Browse samples to learn how to build different components for your apps.
Featured
SociaLite: A sample social network app
See the following Jetpack APIs in action for implementing social networking and communications features: Core, for notifications; Compose, for generating declarative UI; Media3 for displaying and editing photos and videos; CameraX for capturing photos and videos; Room, for persisting messages in a SQLite database; and Window, for detecting foldable device states.
Camera
CameraX Basic
How to use CameraX APIs written in Kotlin.
CameraX Video
How to use the CameraX Video Capture (Recorder) API with Capture + Preview for the MediaStore format.
CameraX Advanced
How to perform real-time object detection on the live camera frames with TensorFlow Lite.
CameraX-MLKit
How to use CameraX's MlKitAnalyzer to perform QR Code scanning. For QR Codes that encode Urls, this app prompts the user to open the URL in a browser.
CameraX Extensions
How to use Camera Extensions with CameraX API to capture a JPEG, display the camera preview, query for supported extensions, select an extension, and capture a still image.
Available extensions include Auto, Bokeh, Face Retouch, HDR (High Dynamic Range), and Night.
Hdr Viewfinder (Camera2)
How to implement a real-time high-dynamic-range camera viewfinder, by alternating the sensor's exposure time between two exposure values on even and odd frames, and then compositing together the latest two frames whenever a new frame is captured