diff options
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/de/pixart/messenger/services/NotificationService.java | 2 | ||||
-rw-r--r-- | src/main/java/de/pixart/messenger/ui/XmppActivity.java | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/de/pixart/messenger/services/NotificationService.java b/src/main/java/de/pixart/messenger/services/NotificationService.java index 6e93145b8..de7ace3fd 100644 --- a/src/main/java/de/pixart/messenger/services/NotificationService.java +++ b/src/main/java/de/pixart/messenger/services/NotificationService.java @@ -159,7 +159,7 @@ public class NotificationService { messagesChannel.setShowBadge(true); messagesChannel.setSound(RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION), new AudioAttributes.Builder() .setContentType(AudioAttributes.CONTENT_TYPE_SONIFICATION) - .setUsage(AudioAttributes.USAGE_NOTIFICATION_RINGTONE) + .setUsage(AudioAttributes.USAGE_NOTIFICATION_COMMUNICATION_INSTANT) .build()); messagesChannel.setLightColor(LED_COLOR); final int dat = 70; diff --git a/src/main/java/de/pixart/messenger/ui/XmppActivity.java b/src/main/java/de/pixart/messenger/ui/XmppActivity.java index 06ee2692d..aded90a30 100644 --- a/src/main/java/de/pixart/messenger/ui/XmppActivity.java +++ b/src/main/java/de/pixart/messenger/ui/XmppActivity.java @@ -25,6 +25,7 @@ import android.graphics.Color; import android.graphics.Point; import android.graphics.drawable.BitmapDrawable; import android.graphics.drawable.Drawable; +import android.media.AudioManager; import android.net.ConnectivityManager; import android.net.Uri; import android.os.AsyncTask; @@ -385,6 +386,7 @@ public abstract class XmppActivity extends ActionBarActivity { super.onCreate(savedInstanceState); this.mTheme = findTheme(); setTheme(this.mTheme); + setVolumeControlStream(AudioManager.STREAM_NOTIFICATION); metrics = getResources().getDisplayMetrics(); ExceptionHelper.init(getApplicationContext()); this.isCameraFeatureAvailable = getPackageManager().hasSystemFeature(PackageManager.FEATURE_CAMERA); |