Questions tagged [ringtonemanager]
77 questions
6
votes
2 answers
Setting a custom ringtone without explicit permission of WRITE_SETTINGS
I simple want to set the ringtone.
I don't want to give permission of WRITE_SETTINGS,
i can find most of the answer to give permission of WRITE_SETTINGS
but there is an app i am using that app has not any WRITE_SETTINGS permission to set the…

Himanshu itmca
- 395
- 5
- 22
6
votes
1 answer
does RingtoneManager.setActualDefaultRingtoneUri() work in API 23?
This is a simple question, and probably a simple answer but there is a huge amount of context.
The Question: does setActualDefaultRingtoneUri() still work in API 23? because I can't get it to function
The Context:
I've set up AndroidManifest.xml…

Mr Heelis
- 2,370
- 4
- 24
- 34
5
votes
0 answers
Android set custom ringtone for each SIM
I am trying to set custom ringtone using below code:
private void registerRingtone(String ringtoneFilePath) {
// Create File object for the specified ring tone path
File ringtoneFile = new File(ringtoneFilePath);
// Insert the ringtone…

Sanjay Panchal
- 540
- 2
- 8
- 20
4
votes
2 answers
RingtonePreference fails to add new ringtones on android 8.1
In xml file i have following code. I am able to select mp3 sound by clicking on ad ringtone button in ringtonepref screen, but when i do so i see following exception. This used to work before but after updating to android 8 its not working.
How can…

user93796
- 18,749
- 31
- 94
- 150
4
votes
1 answer
ringtone picker: check 'none' or 'default notification sound' when they're picked
I want the user to be able to select a notification ringtone for my app. I have a custom sound file (an .mp3 file placed in /raw) that I want to be the default notification ringtone. I save/get the chosen ringtones uris in/from the Shared…

bernardo.g
- 826
- 1
- 12
- 27
3
votes
2 answers
How to access all ringtones list in Android phone?
I want to access the ringtones list. How can I do that?
At later I want to add/ remove ring tones to library? Is it possible?

Jim
- 4,639
- 5
- 27
- 31
2
votes
1 answer
java.io.FileNotFoundException when playing ringtone
I want to play Ringtone for Incoming Call. I do like below for that,
Uri defaultRingToneUri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_RINGTONE);
if(currentRingtonePlayer != null ){
stopRingTonePlayer();
…

Kousalya
- 700
- 10
- 29
2
votes
0 answers
Difference between using RingtoneManager in Service and Activity
For making my example handy, you can picture the default Android Alarm Clock.
This is how me a beginner would solve it. This happens in the activity that gets called by BroadcastReceiver when the alarm needs to start.
Ringtone ringtone;
…

Thomas R
- 21
- 3
2
votes
1 answer
Android alarm clock sound using the alarm volume setting?
I am trying to build a custom type of alarm clock for Android, and I have set up a settings page to allow the users to choose which alarm sound they would like to use. After they select it, it is placed into SharedPreferences, easy enough.
The…

ZWis212
- 132
- 1
- 13
2
votes
1 answer
How to make Notification Silent using RingtoneManager
I have added a checkbox preference in preferences.xml. There is a settings.java file which has defined all the preferences.
Now There is a seperate java file which displays a notification when a message comes in.
If the checkbox is true, I would…

ugola
- 300
- 3
- 18
2
votes
1 answer
Change ringtone picker dialog style
I am developing an application that has a notification at some point. I implemented a couple of methods to make possible for the user to change the notification sound. How do I change the style of the Ringtone Picker Dialog?
This is my code for the…

Marcos Guimaraes
- 1,243
- 4
- 27
- 50
2
votes
1 answer
android.media.Ringtone.play() stops working after a 28 plays
I have an app that is open for hours and uses a background service with foreground notification attached to it. Every once in a while a sound is played using:
try {
Ringtone r = RingtoneManager.getRingtone(context, uri);
r.play();
} catch…

Tom Bevelander
- 1,686
- 1
- 22
- 31
2
votes
1 answer
How to get Ringtone from system sounds
I'm using AlarmManager to display alarms in my android app, I want to display a sound from the system available sounds as an alarm but the only availability for me is to choose between the already set sounds like ringtone, alarm, notification :
Uri…

Muhammed Refaat
- 8,914
- 14
- 83
- 118
1
vote
0 answers
Unable to set Ringtone/Notification Tone Programmatically in Android-11
I already know this question has been asked many times and answered, But this is something different. I am trying to set a Tone in android-11 and tried all the possible solutions over the internet and SO.
The most helpful question and answer which I…

user3686177
- 43
- 9
1
vote
0 answers
RingtoneManager android 11
I used below code for set Ringtone
But has error For android 11
ContentValues contentValues = new ContentValues();
contentValues.put(MediaStore.MediaColumns.DATA, outputfile.getAbsolutePath());
…

nasser
- 337
- 2
- 3