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.
This commit is contained in:
6
modules/wallpaper-android/expo-module.config.json
Normal file
6
modules/wallpaper-android/expo-module.config.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"platforms": ["android"],
|
||||
"android": {
|
||||
"modules": ["com.lively.wallpaper.WallpaperAndroidModule"]
|
||||
}
|
||||
}
|
||||
11
modules/wallpaper-android/src/WallpaperAndroidModule.ts
Normal file
11
modules/wallpaper-android/src/WallpaperAndroidModule.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import { requireNativeModule } from "expo-modules-core";
|
||||
|
||||
interface WallpaperAndroidInterface {
|
||||
saveConfig(configJson: string): Promise<void>;
|
||||
setLiveWallpaper(): Promise<void>;
|
||||
isLiveWallpaperSupported(): boolean;
|
||||
getCurrentConfig(): string | null;
|
||||
}
|
||||
|
||||
export const WallpaperAndroid =
|
||||
requireNativeModule<WallpaperAndroidInterface>("WallpaperAndroid");
|
||||
Reference in New Issue
Block a user