Back to Blog

Building Photos Widget for home screen photo viewing

Emmanouil Athanasopoulos2 min read254 words
React NativeAndroid WidgetGoogle PhotosBackground Tasks

The Motivation Behind the Project

Photos Widget is meant to put images directly on the home screen in a form that feels light and useful. Instead of making the user open a gallery app, the widget keeps photos visible with as little friction as possible.

Core Features and Design Goals

  • Google Photos and local sources: the widget can show photos from cloud or device storage.
  • Slideshow mode: a passive viewing option that makes the widget feel alive.
  • Background auto-rotation: content changes without the user needing to step into the app.
  • Photo management: controls that keep the widget practical instead of purely decorative.

Technical Implementation

  • Built native Android home screen widgets using react-native-android-widget, rendering React Native components into RemoteViews that update independently of the app process, with a dedicated WidgetConfigurationScreen for per-widget photo source selection.
  • Implemented Google Photos OAuth integration via @react-native-google-signin/google-signin and expo-auth-session, with token persistence in expo-secure-store and automatic album/photo fetching from the Google Photos API.
  • Designed a background auto-rotation system using expo-background-fetch and expo-task-manager that periodically cycles the displayed photo even when the app is killed, downloading and caching new images from the selected source to the local filesystem via expo-file-system.

The Technology Stack

Built with Expo SDK 54, Expo Router, and TypeScript. Uses react-native-android-widget for native widget rendering, @react-native-google-signin for OAuth, expo-secure-store for token persistence, and expo-background-fetch for scheduled widget updates. The photo picker supports both Google Photos API albums and local device media.

Final Reflections

Widgets are a good reminder that good UX can be about seeing less, not more.