Sound System Ringtone

0 views
Skip to first unread message

Toney Talbot

unread,
Aug 5, 2024, 4:49:31 AM8/5/24
to engiconwe
Iwas wondering how I could play a notification sound without playing it over the media stream. Right now I can do this via the media player, however I don't want it to play as a media file, I want it to play as a notification or alert or ringtone. heres an example of what my code looks like right now:

I had pretty much the same question. After some research, I think that if you want to play the default system "notification sound", you pretty much have to display a notification and tell it to use the default sound. And there's something to be said for the argument in some of the other answers that if you're playing a notification sound, you should be presenting some notification message as well.


However, a little tweaking of the notification API and you can get close to what you want. You can display a blank notification and then remove it automatically after a few seconds. I think this will work for me; maybe it will work for you.


There are many other convenience methods in this class. You can download the whole library from its Subversion repository and build it with Maven. It depends on the globalmentor-core library, which can also be built and installed with Maven.


The Android expected behaviour is to use the standard Notification to alert the user. If you play a notification sound without the status bar icon, you get the user confused ("what was that sound? there is no icon here, maybe I have hearing problems?").


I press a button and I want to play a ringtone/alarm sound. I could not find an easy, straightforward sample. Yes, I already looked at Alarm clock source code... but it is not straightforward and I cannot compile it.


Your example is basically what I'm using. It never works on the emulator, however, because the emulator doesn't have any ringtones by default, and content://settings/system/ringtone doesn't resolve to anything playable. It works fine on my actual phone.


For the future googlers: use RingtoneManager.getActualDefaultRingtoneUri() instead of RingtoneManager.getDefaultUri(). According to its name, it would return the actual uri, so you can freely use it. From documentation of getActualDefaultRingtoneUri():


Returns the Uri for the default ringtone of a particular type. Rather than returning the actual ringtone's sound Uri, this will return the symbolic Uri which will resolved to the actual sound when played.


I've just purchased and set up my new Galaxy S9. Seems to have mostly gone smoothly however found I'm unable to configure my ringtone or notification sound. In settings they are set to over the horizon and skyline respectively. However when I select either menu option, no system sounds appear, just 3 audio files, 2 of which I think came from using smart switch. When I try to select one of these files, I get an error "unable to set as ringtone". Anybody any ideas??


I have a similar problem as described in this old post from a year ago: incoming call are not indicated via ring-tone. The pop-up window appears, but I do miss this window regularly. So I really would appreciate an audible notification.


No matter what adjustments to standard apps or sound devices settings i make, not ring-tone. It used to work but stopped all of a sudden some month ago. I have no indication whatsoever what could have cause this behavior.


I'm currently on 1909.1833.110, no update on 2004 is currently available for my system, otherwise I'd have tried this, too. I also removed all other devices to avoid interdependence issues, did not help either.


To my knoweldge not, I'm still tyring out different scenarios. but I'm slow in doing so because of my project work.

Next step will be the setup of a clean profile, which is not that easy with my corprate managed notebook.


I had the same problem and it was based on a permission not been met. I moved the AppData folder outside user/my_user folder to another drive and setting a symbolic link for apps to reach the app data.


To get the ringing tone for incoming calls, I had to set 'play sound for notifications; to on (under profile picture//settings///notifications) - this mean syou get all the annoying pings everytime someone messages you BUT, you can turn these off for channels within specific teams (one by one) although apparently not on any chat threads. Kind of annoying that they don't let you distinguish between incoming calls and new messages - another one for the wish list.


Thanks, that certainly didn't fix it for me, but it does identify why I was not getting a ring tone for incoming calls.

Here we are another year later and there's still a ridiculously stupid option: "Play sound for incoming calls and notifications". No thank you, if it's all the same to you I'd rather have a sound for incoming calls when someone is trying to speak to me, while at the same time actually concentrate on my work without pings for all other Teams messages.

So that is not a fix for me, and for now I'll have to miss some calls for the sake of my sanity. I'll try to follow this up with Microsoft through my company.


I completely agree with you OceanMan-8994. Microsoft did many things right with Teams but completely missed the boat with others and they stubbornly refused to fix their mistakes for years. For example,


1) This thread's main issue, as they completely fail to understand that voice calls have a much higher priority on our attention than written messages. Let's face it, when people have something urgent they will call by voice, because they know that answering text messages is something most people do "at their own convenience". They even missed the boat with recognizing that we might want to be notified when we receive messages from certain people (like our own immediate team) but not from anybody else or worse... some of those extremely spammy group chats. They need to give us the ability to choose whether to be notified by text chat, and regardless of choice give us the ability to flip the choice for specific people or group chats.


2) Another big (but unrelated) miss that they just won't let us have a SMALL window for team, like old IM apps used to do. Just show a list of names of recent chats, an icon to show if there are messages pending (or a call missed), and the text of the selected chat. It would be so simple to implement such a compact interface, but nope, although they've promised it... years have passed and nothing.


I have my headset set as the audio device for Teams. Before, this didn't affect whether my laptop speakers would play the ringtone when I got a call, but since a few weeks ago it would stay silent and I would only be able to see I was getting a call from the pop up notification.


So in Settings > Devices, there is a section to set your Audio device, which I still have as my headset. But if you scroll down, there is a section called "Secondary Ringer" and I have set that to my laptop speakers.


This was the solution for me too - the "secondary ringer" option is there and should be for everyone. I'd just add that the settings referred to in this answer are those within MS teams desktop application itself as opposed to your PC/laptop's settings and you have to scroll down a little to find the secondary ringer option,


Note: Microsoft is providing this information as a convenience to you. The sites are not controlled by Microsoft. Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. Please make sure that you completely understand the risk before retrieving any suggestions from the above link.


Sorry, I was on vacation and didn't have time to try it yet. It's a little bit difficult to create a new profile as this is a company managed system with quite some restrictions regarding users/profiles. I've to find a way to test this on my system.


Hi Steve, I'm very sorry but I have significant trouble to investigate this further as my sound completely died on me with a driver update from HP :-( This does not impact any USB connected audio device. Status is: still no ring tone an any (external) device, I'm looking into fixing the internal sound driver issue first to avoid any side effects from this. But again, that might take a while as I'm doing this in parallel to my normal work.


I just encountered the same issue.

Teams is working just fine, except for no ringtone in my speakers when receiving calls or any dial tone when calling someone. just silence and then all of the sudden they answer.


My problem was in the Windows audio mixer.

That was somehow set up to play through the Targus external Jack plug audio port.

When I told Windows to not use that device, it defaulted to my Logitech speakers and everything was working fine again.


One final wrinkle - the Alert Info handling in FreePBX/Asterisk was changed rather significantly about 18 months ago, which screwed up a s-ton of working phone systems. If the articles you are using for information are older than that, this could be biting you as well.


Thanks for your reply. I appreciate the extra details to make sure my head is around the way FreePBX handles the calls. I think I understand it the proper way, but I am still learning the system.

To clarify, I am simply trying to get the alerts on the handsets to sound like an incoming call alerts the recipient at their desk with a sound one would expect. Currently, the incoming alert sounds like the handset suddenly has the speakerphone activated and is now making an outgoing call.

I think I have adjusted all the alert settings that I can find, but I will dig back through just to make sure.

Thanks also for the note about the major changes over the past 18 months. This will help me eliminate false leads as I work through it again.


I am building a new application for android and ios platforms.But I dont now if there is a way to change ringtone,notification sound,background image or like that things can we change and control with godot?

(I am newer in godot.I did one platformer game and now I am trying to do a mobil application.)

3a8082e126
Reply all
Reply to author
Forward
0 new messages