### 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. [![](http://android.devsite.corp.google.com/static/images/social-and-messaging/samples/socialite.png)](https://github.com/android/socialite)  
Featured

### [SociaLite: A sample social network app](https://github.com/android/socialite)

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.  
[View on GitHub](https://github.com/android/socialite)

## Camera

[![](http://android.devsite.corp.google.com/static/images/social-and-messaging/samples/camerax-basic.png)](https://github.com/android/camera-samples/tree/main/CameraXBasic)  

### [CameraX Basic](https://github.com/android/camera-samples/tree/main/CameraXBasic)

How to use CameraX APIs written in Kotlin.  
[![](http://android.devsite.corp.google.com/static/images/social-and-messaging/samples/camerax-video.png)](https://github.com/android/camera-samples/tree/main/CameraXVideo)  

### [CameraX Video](https://github.com/android/camera-samples/tree/main/CameraXVideo)

How to use the CameraX Video Capture (Recorder) API with Capture + Preview for the MediaStore format.  
[![](http://android.devsite.corp.google.com/static/images/social-and-messaging/samples/camerax-advanced.png)](https://github.com/android/camera-samples/tree/main/CameraXAdvanced)  

### [CameraX Advanced](https://github.com/android/camera-samples/tree/main/CameraXAdvanced)

How to perform real-time object detection on the live camera frames with TensorFlow Lite.  
[![](http://android.devsite.corp.google.com/static/images/social-and-messaging/samples/camerax-mlkit.png)](https://github.com/android/camera-samples/tree/main/CameraX-MLKit)  

### [CameraX-MLKit](https://github.com/android/camera-samples/tree/main/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.  
[![](http://android.devsite.corp.google.com/static/images/social-and-messaging/samples/camerax-extensions.png)](https://github.com/android/camera-samples/tree/main/CameraXExtensions)  

### [CameraX Extensions](https://github.com/android/camera-samples/tree/main/CameraXExtensions)

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.  
[![](http://android.devsite.corp.google.com/static/images/social-and-messaging/samples/hdr-viewfinder.png)](https://github.com/android/camera-samples/tree/main/HdrViewfinder)  

### [Hdr Viewfinder (Camera2)](https://github.com/android/camera-samples/tree/main/HdrViewfinder)

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