https://github.com/karn/prism
A wallpaper manager for API33+ built to allow wallpaper retrieval by allowlisted third-party apps.
https://github.com/karn/prism
android androidwallpaper wallpaper-app wallpapermanager
Last synced: 7 months ago
JSON representation
A wallpaper manager for API33+ built to allow wallpaper retrieval by allowlisted third-party apps.
- Host: GitHub
- URL: https://github.com/karn/prism
- Owner: Karn
- Created: 2025-01-04T10:30:14.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2025-03-01T07:23:20.000Z (7 months ago)
- Last Synced: 2025-03-01T08:19:05.446Z (7 months ago)
- Topics: android, androidwallpaper, wallpaper-app, wallpapermanager
- Language: Kotlin
- Homepage:
- Size: 2.38 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README

## Prism
A wallpaper manager for API33+ built to allow wallpaper retrieval by allowlisted third-party apps.
![]()
![]()
![]()
#### 3rd Party Usage
Enable third-party access in the app, then in your own app implement the following contentResolver:
```kotlin
contentResolver.query(
/* uri = */ Uri.parse("content://io.karn.prism.WallpaperContentProvider/wallpapers"),
/* projection = */ arrayOf(BaseColumns._ID, "type", "uri"),
/* selection = */ null,
/* selectionArgs = */ null,
/* sortOrder = */ null
)?.use { cursor ->
try {
while (cursor.moveToNext()) {
val id = cursor.getLong(cursor.getColumnIndexOrThrow(BaseColumns._ID))
val type = cursor.getString(cursor.getColumnIndexOrThrow("type"))
val uri = cursor.getStringOrNull(cursor.getColumnIndexOrThrow("uri"))Log.w("WallpaperContentResolver", "Resolved wallpaper: $id, $type, $uri")
}
} catch (e: Exception) {
Log.e("TAG", "Error loading wallpapers", e)
}
}
```#### Limitations
- The contentResolver can be used to subscribe to changes but it is not always accurate due to
variations in OEM implementations of the Settings.Secure.THEME_CUSTOMIZATION_OVERLAY_PACKAGES
setting. Applications can subscribe to the deprecated but still functioning
Intent.ACTION_WALLPAPER_CHANGED broadcasts and combine it with the ContentResolver above.