Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
741c09b1e4
|
|||
0c0d7d181f
|
|||
9304da9422
|
|||
![]() |
d7afdd00f2 |
@@ -98,5 +98,3 @@ public class SCNApp extends Application implements LifecycleObserver
|
|||||||
isBackground = false;
|
isBackground = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO TabLayout indicator does not corretly animate when directly clicking on tabs
|
|
@@ -65,7 +65,8 @@ public class NotificationService
|
|||||||
channel0.setDescription("Push notifications from the server with low priority.\nGo to the in-app settings to configure ringtone, volume and vibrations");
|
channel0.setDescription("Push notifications from the server with low priority.\nGo to the in-app settings to configure ringtone, volume and vibrations");
|
||||||
channel0.setSound(null, null);
|
channel0.setSound(null, null);
|
||||||
channel0.setVibrationPattern(null);
|
channel0.setVibrationPattern(null);
|
||||||
channel0.setLightColor(Color.BLUE);
|
channel0.setLightColor(Color.CYAN);
|
||||||
|
channel0.enableLights(true);
|
||||||
notifman.createNotificationChannel(channel0);
|
notifman.createNotificationChannel(channel0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -77,7 +78,8 @@ public class NotificationService
|
|||||||
channel1.setDescription("Push notifications from the server with low priority.\nGo to the in-app settings to configure ringtone, volume and vibrations");
|
channel1.setDescription("Push notifications from the server with low priority.\nGo to the in-app settings to configure ringtone, volume and vibrations");
|
||||||
channel1.setSound(null, null);
|
channel1.setSound(null, null);
|
||||||
channel1.setVibrationPattern(null);
|
channel1.setVibrationPattern(null);
|
||||||
channel1.setLightColor(Color.BLUE);
|
channel1.setLightColor(Color.CYAN);
|
||||||
|
channel1.enableLights(true);
|
||||||
notifman.createNotificationChannel(channel1);
|
notifman.createNotificationChannel(channel1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -89,7 +91,9 @@ public class NotificationService
|
|||||||
channel2.setDescription("Push notifications from the server with low priority.\nGo to the in-app settings to configure ringtone, volume and vibrations");
|
channel2.setDescription("Push notifications from the server with low priority.\nGo to the in-app settings to configure ringtone, volume and vibrations");
|
||||||
channel2.setSound(null, null);
|
channel2.setSound(null, null);
|
||||||
channel2.setVibrationPattern(null);
|
channel2.setVibrationPattern(null);
|
||||||
channel2.setLightColor(Color.BLUE);
|
channel2.setLockscreenVisibility(Notification.VISIBILITY_PRIVATE);
|
||||||
|
channel2.setLightColor(Color.CYAN);
|
||||||
|
channel2.enableLights(true);
|
||||||
notifman.createNotificationChannel(channel2);
|
notifman.createNotificationChannel(channel2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -115,9 +119,9 @@ public class NotificationService
|
|||||||
{
|
{
|
||||||
Vibrator v = (Vibrator) SCNApp.getContext().getSystemService(Context.VIBRATOR_SERVICE);
|
Vibrator v = (Vibrator) SCNApp.getContext().getSystemService(Context.VIBRATOR_SERVICE);
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||||
v.vibrate(VibrationEffect.createOneShot(1500, VibrationEffect.DEFAULT_AMPLITUDE));
|
v.vibrate(VibrationEffect.createOneShot(500, VibrationEffect.DEFAULT_AMPLITUDE));
|
||||||
} else {
|
} else {
|
||||||
v.vibrate(1500);
|
v.vibrate(500);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -254,7 +258,7 @@ public class NotificationService
|
|||||||
if (ns.EnableVibration)
|
if (ns.EnableVibration)
|
||||||
{
|
{
|
||||||
Vibrator v = (Vibrator) SCNApp.getContext().getSystemService(Context.VIBRATOR_SERVICE);
|
Vibrator v = (Vibrator) SCNApp.getContext().getSystemService(Context.VIBRATOR_SERVICE);
|
||||||
v.vibrate(VibrationEffect.createOneShot(1500, VibrationEffect.DEFAULT_AMPLITUDE));
|
v.vibrate(VibrationEffect.createOneShot(500, VibrationEffect.DEFAULT_AMPLITUDE));
|
||||||
}
|
}
|
||||||
|
|
||||||
//if (ns.EnableLED) { } // no LED in Android-O -- configure via Channel
|
//if (ns.EnableLED) { } // no LED in Android-O -- configure via Channel
|
||||||
|
@@ -77,4 +77,9 @@ public class NotificationsFragment extends Fragment implements MessageAdapterTou
|
|||||||
snackbar.show();
|
snackbar.show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void updateDeleteSwipeEnabled()
|
||||||
|
{
|
||||||
|
if (touchHelper != null) touchHelper.updateEnabled();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -153,6 +153,10 @@ public class SettingsFragment extends Fragment implements MusicPickerListener
|
|||||||
prefMsgHighForceVolume = v.findViewById(R.id.prefMsgHighForceVolume);
|
prefMsgHighForceVolume = v.findViewById(R.id.prefMsgHighForceVolume);
|
||||||
prefMsgHighVolume = v.findViewById(R.id.prefMsgHighVolume);
|
prefMsgHighVolume = v.findViewById(R.id.prefMsgHighVolume);
|
||||||
prefMsgHighVolumeTest = v.findViewById(R.id.btnHighVolumeTest);
|
prefMsgHighVolumeTest = v.findViewById(R.id.btnHighVolumeTest);
|
||||||
|
|
||||||
|
ArrayAdapter<Integer> plcsa = new ArrayAdapter<>(v.getContext(), android.R.layout.simple_spinner_item, SCNSettings.CHOOSABLE_CACHE_SIZES);
|
||||||
|
plcsa.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
|
||||||
|
prefLocalCacheSize.setAdapter(plcsa);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateUI()
|
private void updateUI()
|
||||||
@@ -168,10 +172,7 @@ public class SettingsFragment extends Fragment implements MusicPickerListener
|
|||||||
prefUpgradeAccount_info.setVisibility(SCNSettings.inst().promode_local ? View.GONE : View.VISIBLE);
|
prefUpgradeAccount_info.setVisibility(SCNSettings.inst().promode_local ? View.GONE : View.VISIBLE);
|
||||||
prefUpgradeAccount_msg.setVisibility( SCNSettings.inst().promode_local ? View.VISIBLE : View.GONE );
|
prefUpgradeAccount_msg.setVisibility( SCNSettings.inst().promode_local ? View.VISIBLE : View.GONE );
|
||||||
|
|
||||||
ArrayAdapter<Integer> plcsa = new ArrayAdapter<>(c, android.R.layout.simple_spinner_item, SCNSettings.CHOOSABLE_CACHE_SIZES);
|
if (prefLocalCacheSize.getSelectedItemPosition() != getCacheSizeIndex(s.LocalCacheSize)) prefLocalCacheSize.setSelection(getCacheSizeIndex(s.LocalCacheSize));
|
||||||
plcsa.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
|
|
||||||
prefLocalCacheSize.setAdapter(plcsa);
|
|
||||||
prefLocalCacheSize.setSelection(getCacheSizeIndex(s.LocalCacheSize));
|
|
||||||
|
|
||||||
if (prefMsgLowEnableSound.isChecked() != s.PriorityLow.EnableSound) prefMsgLowEnableSound.setChecked(s.PriorityLow.EnableSound);
|
if (prefMsgLowEnableSound.isChecked() != s.PriorityLow.EnableSound) prefMsgLowEnableSound.setChecked(s.PriorityLow.EnableSound);
|
||||||
if (!prefMsgLowRingtone_value.getText().equals(s.PriorityLow.SoundName)) prefMsgLowRingtone_value.setText(s.PriorityLow.SoundName);
|
if (!prefMsgLowRingtone_value.getText().equals(s.PriorityLow.SoundName)) prefMsgLowRingtone_value.setText(s.PriorityLow.SoundName);
|
||||||
@@ -341,7 +342,7 @@ public class SettingsFragment extends Fragment implements MusicPickerListener
|
|||||||
{
|
{
|
||||||
SCNSettings.inst().save();
|
SCNSettings.inst().save();
|
||||||
updateUI();
|
updateUI();
|
||||||
SCNApp.getMainActivity().adpTabs.tab1.touchHelper.updateEnabled();
|
SCNApp.getMainActivity().adpTabs.tab1.updateDeleteSwipeEnabled();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void onUpgradeAccount()
|
private void onUpgradeAccount()
|
||||||
|
@@ -1,3 +1,3 @@
|
|||||||
#Mon Nov 19 12:30:54 CET 2018
|
#Mon Nov 19 18:43:09 CET 2018
|
||||||
VERSION_NAME=1.0.0
|
VERSION_NAME=1.1.0
|
||||||
VERSION_CODE=14
|
VERSION_CODE=15
|
||||||
|
Reference in New Issue
Block a user