Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(options.isWithoutSound()) {
- channel.setSound(null, null);
- } else {
- AudioAttributes audioAttributes = new AudioAttributes.Builder()
- .setContentType(AudioAttributes.CONTENT_TYPE_SONIFICATION)
- .setUsage(AudioAttributes.USAGE_NOTIFICATION).build();
- if(options.isWithDefaultSound()) {
- channel.setSound(RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION), audioAttributes);
- } else {
- channel.setSound(options.getSound(), audioAttributes);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement