ringtone

Access built-in iOS alarm clock sound in my app

落爺英雄遲暮 提交于 2019-11-28 06:00:23
问题 I'm building a countdown timer app, and wondering if I can access the list of sound clips in the built-in clock app, or do I have to create my own sound clip? 回答1: Your app runs in a sandboxed environment, so accessing anything outside that sandbox is not possible. You will need to include your own sounds in your application bundle and access them that way. 回答2: If you're using the sound in a notifications try : notification.soundName = UILocalNotificationDefaultSoundName; 来源: https:/

Access iPhone's built-in ringtones

久未见 提交于 2019-11-28 01:53:17
I have a task to access the system ringtones in my iPhone application. I want to know if it is possible to access them? If not, please explain the reason. No it's not possible via the official SDK. No, it is not Possible in iPhone , If you want to submit your app in app store. 来源: https://stackoverflow.com/questions/8269982/access-iphones-built-in-ringtones

How to programmatically silence the ringer or change the ringer tone on iOS5

和自甴很熟 提交于 2019-11-28 01:12:35
问题 Is there a way to reduce the volume of the ringer or change the ringer tone on iOS5? I checked out the Celestial framework, but can't instantiate AVSystemController. :-( I don't care if this get's the app rejected in the AppStore as it will never be submitted. 回答1: Yes. Use AVSystemController . You don't instantiate it. It's a singleton. http://code.google.com/p/iphone-dev/source/browse/trunk/include/include/Celestial/AVSystemController.h?r=136 [[AVSystemController sharedAVSystemController]

Setting Ringtone notification from SD card file

泄露秘密 提交于 2019-11-28 00:33:32
My goal is to set the users notification sound from a file that is stored onto the SD card from with in the application. I am using this code: if(path != null){ File k = new File(path, "moment.mp3"); ContentValues values = new ContentValues(); values.put(MediaStore.MediaColumns.DATA, k.getAbsolutePath()); values.put(MediaStore.MediaColumns.TITLE, "My Song title"); values.put(MediaStore.MediaColumns.SIZE, 215454); values.put(MediaStore.MediaColumns.MIME_TYPE, "audio/mp3"); values.put(MediaStore.Audio.Media.ARTIST, "Some Artist"); values.put(MediaStore.Audio.Media.DURATION, 230); values.put

How can I change the ringtone in android programmatically?

老子叫甜甜 提交于 2019-11-27 21:14:07
I'm trying to write an app that (among other things) will change the user's ringtone based on their location. However, I'm having difficulty setting the ringtone of my phone from within my app. I've been able to display a list of the phone's ringtones, and have been using the following code to try and set the ringtone: RingtoneManager.setActualDefaultRingtoneUri(applicationContext, RingtoneManager.TYPE_RINGTONE, MediaStore.Audio.Media.getContentUriForPath(settings.getRingtoneURI())); Settings.System.putString(c.getContentResolver(), Settings.System.RINGTONE, settings.getRingtoneURI()); where

How can I set a ringtone for an individual contact on Android?

可紊 提交于 2019-11-27 20:18:54
How can I apply a ringtone to only the selected contact? I have found a way to set the default ringtone that applies to all contacts, but that is not my goal. I want an application to have a button ("Apply ringtone to contact") that, when clicked, starts an activityForResult displaying a list of all contacts on the phone. When a contact is selected, the contact activity closes and returns with a URI to the contact. Then the app needs to apply the selected ringtone to that specific contact. The code for displaying and selecting contacts by an activity is already implemented and seems to work on

Setting contact custom ringtone, how?

ε祈祈猫儿з 提交于 2019-11-27 14:13:23
I know how to change phone ringtone, also how to get contacts, but how can I set a ringtone for a specific contact? So how do I use the method: ContactsContract.Contacts.CUSTOM_RINGTONE ? I have tried it like this: Uri contactUri = ContactsContract.Contacts.CONTENT_URI; String[] PROJECTION = new String[] { ContactsContract.Contacts._ID, ContactsContract.Contacts.DISPLAY_NAME, ContactsContract.Contacts.HAS_PHONE_NUMBER, }; String SELECTION = ContactsContract.Contacts.HAS_PHONE_NUMBER + "='1'"; Cursor contacts = managedQuery(contactUri, PROJECTION, SELECTION, null, null ); while (contacts

Incoming call dynamically override default ringtone

帅比萌擦擦* 提交于 2019-11-27 11:59:10
问题 My app allows you to specify a different ringtone for different incoming events. EG: incoming call, incoming SMS, etc. What I am trying to accomplish is when I receive for example an incoming call, I check my apps database if a specific option is selected and if there is a ringtone option set play that ringtone. However the problem I am having is I am unable to override / stop the default phone ringtone from playing. I have tried several different ways, but from the docs most of those methods

setting audio file as Ringtone

烈酒焚心 提交于 2019-11-27 06:42:11
I have save file in sdcard/media/audio/ringtone s folder. That file will appear in list of ringtone selection from settings/sound/phone Ringtone. But I want to set that file as a ringtone from my code. Here is my code. File k = new File(path, filename); ContentValues values = new ContentValues(); values.put(MediaStore.MediaColumns.DATA, k.getAbsolutePath()); values.put(MediaStore.MediaColumns.TITLE, "TwiAppclip"); values.put(MediaStore.MediaColumns.MIME_TYPE, "audio/*"); values.put(MediaStore.Audio.Media.ARTIST, "cssounds "); values.put(MediaStore.Audio.Media.IS_RINGTONE, true); values.put

How to set ringtone with RingtoneManager.ACTION_RINGTONE_PICKER?

大憨熊 提交于 2019-11-27 03:46:37
I try to find solution here, but there are only solution for own/selected file, not for code when I call picker. I use following code when user press button: Intent intent = new Intent(RingtoneManager.ACTION_RINGTONE_PICKER); intent.putExtra(RingtoneManager.EXTRA_RINGTONE_TITLE, "Select ringtone for notifications:"); intent.putExtra(RingtoneManager.EXTRA_RINGTONE_SHOW_SILENT, false); intent.putExtra(RingtoneManager.EXTRA_RINGTONE_SHOW_DEFAULT, true); intent.putExtra(RingtoneManager.EXTRA_RINGTONE_TYPE,RingtoneManager.TYPE_NOTIFICATION); ActivityCurrent.this.startActivityForResult(intent,999);