-
Notifications
You must be signed in to change notification settings - Fork 25
Setting up the config json
You can use Config JSON to control some parts of your dashboard remotely. Note that you have to store your Config JSON in cloud, like you do for wallpaper's JSON.
There are two parts of Config JSON. The parts are - App Updater and Disable Request.
App Updater is used to check if an update is available for your app. You have to configure it manually.
First enable check for update button.
- Open
app/src/main/res/values/dashboard_configuration.xml
- Search for this line
<bool name="enable_check_update">false</bool>
- Set its value to
true
<bool name="enable_check_update">true</bool>
Now create a JSON file. We will edit the JSON file.
The properties required in JSON to support App Updater -
{
"latestVersion": "1.1",
"latestVersionCode": 1,
"url": "https://github.com/zixpo/candybar",
"releaseNotes": [
"This is the text which will be shown on update changelog",
"Another release note",
"You can use <b>text</b> <i>formatting</i> <u>here</u>"
]
}
In the above JSON -
-
latestVersion
is the name of your latest version, you can think of it likeversionName
of your app'sbuild.gradle
. -
latestVersionCode
is latest version's code which is available for your app, you can think of it likeversionCode
ofbuild.gradle
. -
url
is the URL which will be opened when your users tap the "Update" button. -
releaseNotes
will be shown in the update's changelog.
Remember to update your Config JSON's latestVersionCode
with your app's versionCode
when updating your app.
You can even disable icon request remotely using Config JSON. Sometimes you update your app and many people (who did not update the app), use the old version of your icon pack and they make icon requests. It's possible that you have already added those requested icons but the same icons get requested again because the users are using an old version of your icon pack. To prevent this, you can use the Config JSON. Let's see how to set this up.
First enable check for json before requesting icons
- Open
app/src/main/res/values/dashboard_configuration.xml
. - Search for this line
<bool name="json_check_before_request">false/bool>
- Set its value to
true
<bool name="json_check_before_request">true</bool>
In Config JSON these are the properties required for enabling disable request -
{
"url": "https://github.com/zixpo/candybar",
"disableRequest": {
"below": 10,
"on": "40 20 353"
}
}
In Above JSON -
-
url
is a string of URL which will be opened when users tap "Update" Button. -
disableRequest
is a JSON Object which contains two properties-
below
is a number. If an user's app'sversionCode
is lower than the fields value, the user will not be able to make icon requests. -
on
is a string ofversionCode
numbers in which the icon request will be blocked. Separate the version codes using space,
. Ex: if you want to disable icon request in app with version codes10
,23
,75
you will seton
's value to either"10,23,75"
or"10 23 75"
.
-
You can use both features, just combine those JSONs, Like this -
{
"latestVersion": "1.1",
"latestVersionCode": 1,
"disableRequest": {
"below": 10,
"on": "40 20 353"
},
"url": "https://github.com/zixpo/candybar",
"releaseNotes": [
"This is the text which will be shown on Update",
"Another Release Note"
"You can Use <b>Text</b> <i>Formatting</i> <u>Too</u>"
]
}
Now save this JSON and upload it to any hosting service (like GitHub).
Then retrieve the raw link of the JSON file and add it to dashboard_configuration.xml
.
To do that -
- Open
app/src/main/res/values/dashboard_configuration.xml
- Search for this line
<string name="config_json"></string>
- Set its value to the JSON's link
<string name="config_json">https://yourwebsite.com/link/to/config.json</string>
Now App Updater
and Disable Request
will work on your app
If you want more help then join Our Telegram Group.
- Wallpaper JSON
- Setting up the Config JSON
- Advanced Dashboard configurations
- Changing fonts
- Changing navigation drawer icons
- Changing icons of the apply section
- Replacing icon names in icon preview
- Enabling OneSignal notifications
- Enabling InApp purchases (donations and premium requests)
- Customizing the analog clock widget
- Enabling Kustom presets