diff --git a/python-for-android/dists/kolibri/src/main/java/org/learningequality/notification/Builder.java b/python-for-android/dists/kolibri/src/main/java/org/learningequality/notification/Builder.java index c4d6ca49..3bcf81ca 100644 --- a/python-for-android/dists/kolibri/src/main/java/org/learningequality/notification/Builder.java +++ b/python-for-android/dists/kolibri/src/main/java/org/learningequality/notification/Builder.java @@ -14,7 +14,12 @@ public Builder(Context context, String channelId) { super(context, channelId); setSmallIcon(R.drawable.ic_stat_kolibri_notification); setPriority(NotificationCompat.PRIORITY_LOW); - setColor(context.getColor(R.color.primary)); + try { + setColor(context.getColor(R.color.primary)); + } catch (NullPointerException e) { + // This seems to happen on Android 7 + // when this method is invoked from Python. + } setSilent(true); // Default title