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

AppAuthorityExample
KLWPorg.kustom.klwp.contentcontent://org.kustom.klwp.content/klwp/0/info
KWGTorg.kustom.kwgt.contentcontent://org.kustom.kwgt.content/kwgt/123/info
KLCKorg.kustom.klck.contentcontent://org.kustom.klck.content/klck/0/info

Returned Columns#

ColumnTypeDescription
configuredInteger1 if preset is configured, 0 otherwise
titleStringPreset title
screen_count_xIntegerHorizontal screen count (KLWP only)
screen_count_yIntegerVertical 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();
}



Privacy Policy