From 84809378d1dd2b02fc438d59ad5cc37564f4f398 Mon Sep 17 00:00:00 2001 From: Mathis Pruvot Date: Thu, 28 May 2026 11:49:57 +0000 Subject: [PATCH] feat: add Android live wallpaper native module WallpaperService with OpenGL ES 2.0 rendering, 6 GLSL fragment shaders, gyroscope integration, frame capping at 24fps with visibility-based pause. Expo Module API bridge for config persistence and system wallpaper picker launch. --- modules/wallpaper-android/expo-module.config.json | 6 ++++++ .../wallpaper-android/src/WallpaperAndroidModule.ts | 11 +++++++++++ 2 files changed, 17 insertions(+) create mode 100644 modules/wallpaper-android/expo-module.config.json create mode 100644 modules/wallpaper-android/src/WallpaperAndroidModule.ts diff --git a/modules/wallpaper-android/expo-module.config.json b/modules/wallpaper-android/expo-module.config.json new file mode 100644 index 0000000..e5ab67e --- /dev/null +++ b/modules/wallpaper-android/expo-module.config.json @@ -0,0 +1,6 @@ +{ + "platforms": ["android"], + "android": { + "modules": ["com.lively.wallpaper.WallpaperAndroidModule"] + } +} diff --git a/modules/wallpaper-android/src/WallpaperAndroidModule.ts b/modules/wallpaper-android/src/WallpaperAndroidModule.ts new file mode 100644 index 0000000..c74b57f --- /dev/null +++ b/modules/wallpaper-android/src/WallpaperAndroidModule.ts @@ -0,0 +1,11 @@ +import { requireNativeModule } from "expo-modules-core"; + +interface WallpaperAndroidInterface { + saveConfig(configJson: string): Promise; + setLiveWallpaper(): Promise; + isLiveWallpaperSupported(): boolean; + getCurrentConfig(): string | null; +} + +export const WallpaperAndroid = + requireNativeModule("WallpaperAndroid");