Skip to content

Commit

Permalink
Update for v3.20.0
Browse files Browse the repository at this point in the history
  • Loading branch information
sarsamurmu committed Jul 1, 2024
1 parent 08c6aee commit 04caa6c
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 23 deletions.
16 changes: 2 additions & 14 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,15 +1,3 @@
// TODO: Remove `/*` and `*/` below to enable OneSignal
/*
buildscript {
repositories {
maven { url 'https://plugins.gradle.org/m2/' }
}
dependencies {
classpath 'gradle.plugin.com.onesignal:onesignal-gradle-plugin:0.14.0'
}
}
apply plugin: 'com.onesignal.androidsdk.onesignal-gradle-plugin'
*/
apply plugin: 'com.android.application'

android {
Expand Down Expand Up @@ -62,10 +50,10 @@ dependencies {
* If you've missed some versions you've to also follow update guide for those versions
*/

implementation 'com.github.zixpo:candybar:3.19.0'
implementation 'com.github.zixpo:candybar:3.20.0'

// TODO: Remove `//` below to enable OneSignal
//implementation 'com.onesignal:OneSignal:[4.0.0, 4.99.99]'
//implementation 'com.onesignal:OneSignal:[5.0.0, 5.99.99]'
}

// Code for automatically copying appfilter.xml and drawable.xml
Expand Down
3 changes: 3 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
<!-- If you are not using license checker, you need to remove CHECK_LICENSE permission -->
<uses-permission android:name="com.android.vending.CHECK_LICENSE" />

<!-- If you are using OneSignal then you need to uncomment this line -->
<!--<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />-->

<supports-screens
android:smallScreens="true"
android:normalScreens="true"
Expand Down
16 changes: 12 additions & 4 deletions app/src/main/java/com/candybar/sample/applications/CandyBar.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,8 @@ public class CandyBar extends CandyBarApplication {
@Override
public void onCreate() {
super.onCreate();
// OneSignal Initialization
OneSignal.initWithContext(this);
OneSignal.setAppId("YOUR_ONESIGNAL_APP_ID_HERE");
OneSignal.initWithContext(this, "YOUR_ONESIGNAL_APP_ID");
}
*/

Expand All @@ -32,9 +30,19 @@ public Class<?> getDrawableClass() {
@NonNull
@Override
public Configuration onInit() {
// Sample configuration
Configuration configuration = new Configuration();

// TODO: Remove `/*` and `*/` below to enable OneSignal
/*
configuration.setNotificationEnabled(true, (isEnable) -> {
if (isEnable) {
OneSignal.getUser().getPushSubscription().optIn();
} else {
OneSignal.getUser().getPushSubscription().optOut();
}
});
*/

configuration.setGenerateAppFilter(true);
configuration.setGenerateAppMap(true);
configuration.setGenerateThemeResources(true);
Expand Down
9 changes: 6 additions & 3 deletions app/src/main/res/values/dashboard_configurations.xml
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,12 @@
The number of icon a user can request should be specified in the "icon_request_limit" section -->
<bool name="enable_icon_request_limit">false</bool>

<!-- Enable multiple requests for same icon
When enabled, users will be able to request the same icon twice. This can be useful if you
offer free and premium requests, so a free request doesn't prevent the user from submitting
a premium request for the same icon. Can also be useful for a voting system. -->
<bool name="enable_icon_request_multiple">false</bool>

<!-- Limit the numbers of icon a user can request
IGNORE if "enable_icon_request_limit" option is disabled
ex: If you set icon request limit to 10, a user will able to request only 10 icons in total
Expand All @@ -185,9 +191,6 @@
It's something like, paying a sum of money for getting requested icons faster. -->
<bool name="enable_premium_request">true</bool>

<!-- Add support for re-requesting icons -->
<bool name="enable_icon_request_multiple">false</bool>

<!-- Enable the option to "Restore Purchases" in Settings section of the app.
It would be best if you set it to `false`, because it's known that some
people misuse this feature and make **more** premium icon request than the amount
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values/launchers.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
<item>lg_home</item>
<item>lucid</item>
<item>microsoft</item>
<item>moto</item>
<item>niagara</item>
<item>nougat</item>
<item>nova</item>
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ buildscript {
}

dependencies {
classpath 'com.android.tools.build:gradle:8.2.1'
classpath 'com.android.tools.build:gradle:8.5.0'
}
}

Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip

0 comments on commit 04caa6c

Please sign in to comment.