Query widget and wallpaper info via ContentProvider#
Starting from v3.82 Kustom exposes a ContentProvider to query information about configured widgets and wallpapers.
Content URI Format#
content://org.kustom.{app}.content/{variant}/{id}/info
| App | Authority | Example |
|---|---|---|
| KLWP | org.kustom.klwp.content | content://org.kustom.klwp.content/klwp/0/info |
| KWGT | org.kustom.kwgt.content | content://org.kustom.kwgt.content/kwgt/123/info |
| KLCK | org.kustom.klck.content | content://org.kustom.klck.content/klck/0/info |
Returned Columns#
| Column | Type | Description |
|---|---|---|
configured | Integer | 1 if preset is configured, 0 otherwise |
title | String | Preset title |
screen_count_x | Integer | Horizontal screen count (KLWP only) |
screen_count_y | Integer | Vertical screen count (KLWP only) |
Preview Image#
To get a preview thumbnail, use the png endpoint:
content://org.kustom.kwgt.content/kwgt/123/png
Android Code Example#
Uri uri = Uri.parse("content://org.kustom.kwgt.content/kwgt/123/info");
Cursor cursor = getContentResolver().query(uri, null, null, null, null);
if (cursor != null && cursor.moveToFirst()) {
boolean configured = cursor.getInt(0) == 1;
String title = cursor.getString(1);
cursor.close();
}