Search Results

Search found 29 results on 2 pages for 'ringtone'.

Page 1/2 | 1 2  | Next Page >

  • Setting Ringtone notification from SD card file

    - by sgarman
    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(MediaStore.Audio.Media.IS_RINGTONE, false); values.put(MediaStore.Audio.Media.IS_NOTIFICATION, true); values.put(MediaStore.Audio.Media.IS_ALARM, false); values.put(MediaStore.Audio.Media.IS_MUSIC, false); values.put(MediaStore.MediaColumns.DISPLAY_NAME, "Some Name"); //Insert it into the database Uri uri = MediaStore.Audio.Media.getContentUriForPath(k.getAbsolutePath()); Uri newUri = MainActivity.this.getContentResolver().insert(uri, values); RingtoneManager.setActualDefaultRingtoneUri( MainActivity.this, RingtoneManager.TYPE_NOTIFICATION, newUri ); //RingtoneManager.setActualDefaultRingtoneUri(this, RingtoneManager.TYPE_NOTIFICATION, newUri); Toast.makeText(this, "Notification Ringtone Set", Toast.LENGTH_SHORT).show(); } When I run this on the device I keep getting the error: 06-12 15:19:36.741: ERROR/Database(2847): Error inserting is_alarm=false is_ringtone=false artist_id=35 is_music=false album_id=-1 title=My Song title duration=230 is_notification=true title_key=%D%\%%P%H%F%8%%R%<%R%B%4% mime_type=audio/mp3 date_added=1276370376 _display_name=moment.mp3 _size=215454 _data=/mnt/sdcard/Android/data/_MY APP PATH_/files/moment.mp3 06-12 15:19:36.741: ERROR/Database(2847): android.database.sqlite.SQLiteConstraintException: error code 19: constraint failed I have seen others using this technique and I can't find any documentation on which values actually need to be passed in to successfully add the file into the Android system so that it can be set as a notification.

    Read the article

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

    - by PHP_Jedi
    How can I set a ringtone for an individual contact on Android ? I have found a way to set the default ringtone that applies to all contacts without an individual ringtone. But that is not what i'm trying to accomplish. I want the application to have a button "Apply ringtone to contact". When i click, I start 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. Now all the app needs to do is to apply the selected ringtone to that spesific contact. The code for displaying and selecting contacts by an activity is already implemented and seems to work on with the app. Its only the last part left, and I have no clue about how to solve this. Any help would be usefull.

    Read the article

  • Set a OGG in raw folder as Ringtone/Notification?

    - by YaW
    Hi, I have some ogg audios in my raw folder and I'm trying to set one of them as a Ringtone (or Notification, Alarm... whatever). I've been looking at the source code of RingDroid and I can see how is this done using the ContentValues and MediaStore, but in all the examples I've seen, the audio files is in the SDCard. Is it possible to set the ringtone directly from the raw folder? If not, how can I make a copy of the raw file to a folder in the SD? Thanks in advance.

    Read the article

  • How to play ringtone/alarm sound in Android

    - by Federico
    I have been looking everywhere how to play a ringtone/alarm sound in android. I press a button and I want to play a ringtone/alarm sound. I could not find a easy, straightforward sample. Yes, I already looked at Alarm clock source code... but it is not straightforward and I cannot compile it. I cannot make this work: Uri alert = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_ALARM); mMediaPlayer = new MediaPlayer(); mMediaPlayer.setDataSource(this, alert); final AudioManager audioManager = (AudioManager)getSystemService(Context.AUDIO_SERVICE); if (audioManager.getStreamVolume(AudioManager.STREAM_ALARM) != 0) { player.setAudioStreamType(AudioManager.STREAM_ALARM); player.setLooping(true); player.prepare(); player.start(); } I get this error: 04-11 17:15:27.638: ERROR/MediaPlayerService(30): Couldn't open fd for content://settings/system/ringtone So.. please if somebody knows how to play a default ringtone/alarm let me know. I prefer not to upload any file. Just play a default ringtone.

    Read the article

  • How do I use this code to modify contact ringtone in android?

    - by masterkapu
    I found that with code/function I can change the contacts ringtone, but I couldn't find how to use it. Can someone help me, How do I do it? context.getContentResolver().update(contactUri, values, where, args); ContactsContract.Contacts.CUSTOM_RINGTONE One more question. when I call from one android simulator to another I don't hear the ringing sound, what could be the problem?

    Read the article

  • Make Sure to Use a ‘Dog Friendly’ Ringtone Next Time [Humorous Image]

    - by Asian Angel
    Apparently the dog found your taste in ringtones on the new Blackberry to be lacking… Gave this guy a new Blackberry last week. He brought it back in today… [via Reddit Tech Support Gore] Why Does 64-Bit Windows Need a Separate “Program Files (x86)” Folder? Why Your Android Phone Isn’t Getting Operating System Updates and What You Can Do About It How To Delete, Move, or Rename Locked Files in Windows

    Read the article

  • Save as Ringtone from ContextMenu

    - by kostas_menu
    I have created a button that onClick plays a mp3 file.I have also create a context menu that when you press the button for 2 secs it prompts you to save it as ringtone.How can i save it somewhere in my sd?this is my code: public void onCreate(Bundle icicle) { super.onCreate(icicle); setContentView(R.layout.main); Toast.makeText(a.this, "Touch and listen", Toast.LENGTH_SHORT).show(); Button button = (Button) findViewById(R.id.btn1); registerForContextMenu(button); button.setOnClickListener(new View.OnClickListener() { public void onClick(View v){ MediaPlayer mp = MediaPlayer.create(a.this, R.raw.myalo); mp.start(); Toast.makeText(a.this, "Eisai sto myalo", Toast.LENGTH_SHORT).show(); } }); @Override public void onCreateContextMenu(ContextMenu menu, View v,ContextMenuInfo menuInfo) { super.onCreateContextMenu(menu, v, menuInfo); menu.setHeaderTitle("Save As:"); menu.add(0, v.getId(), 0, "Ringtone"); } @Override public boolean onContextItemSelected(MenuItem item) { if(item.getTitle()=="Ringtone"){function1(item.getItemId());} else {return false;} return true; } public void function1(int id){ Toast.makeText(this, "Ringtone Saved", Toast.LENGTH_SHORT).show(); } }

    Read the article

  • setting ringtone for a specific application only.

    - by Umesh
    I want to be able to set a ringtone which is associated to a particular application only. If the message with a special prefix arrives, my application intercepts it and does whatever it has to do. On message arriving, i want to be able to tell the user that the 'special' message has arrived, through a ringtone( which exclusively plays upon that kind of msg). anyone with a lead, please help.

    Read the article

  • Can't update contact details in android using code

    - by masterkapu
    I'm trying to update/change contact ringtone using this code: ContentValues values = new ContentValues(); values.put(ContactsContract.Data.CUSTOM_RINGTONE, "D:/TempDownloads/BurpSounds/Alex.wav"); getContentResolver().update(ContactsContract.Contacts.CONTENT_URI, values , "DISPLAY_NAME = 'Ani'", null); I get the message: " the application has stopped unexpectedly" what is wrong with my code and how do I do it? thanks

    Read the article

  • How to add a midi ringtone to my Nokia E65?

    - by Palantir
    Hi! Once upon a time, my pc suite had a function to prepare ringtones and upload them to the E65. Now I find myself with the all-new Nokia PC Suite 7.1 and I cannot find anything which resembles that function. I used to select a midi file, add some options, listen to a preview, and then upload it. It would appear among the ringing tones when customizing profiles. I tried this "Nokia Music" which is linked from the PC Suite, but it won't recognize the headset. What can I do?

    Read the article

  • File formats to download ringtones

    - by Osvaldo
    What file formats and other specifications must be used to give ringtones (to download) in a website? I'm interested in giving away just one ringtone. The target audience uses smartphones with Android, iOS and Windows Phones launched in the last 2/3 years. Is it necessary to include instructions or is it something relatively easy to do? Or can't be done for some reason? The ringtone has to be downloaded to a desktop first? Or has to be downloaded from the mobile phone while accessing the web page with the download?

    Read the article

  • UITableView, having problems changing accessory when selected

    - by zpasternack
    I'm using a UITableView to allow selection of one (of many) items. Similar to the UI when selecting a ringtone, I want the selected item to be checked, and the others not. I would like to have the cell selected when touched, then animated back to the normal color (again, like the ringtone selection UI). A UIViewController subclass is my table's delegate and datasource (not UITableViewController, because I also have a toolbar in there). I'm setting the accessoryType of the cells in cellForRowAtIndexPath:, and updating my model when cells are selected in didSelectRowAtIndexPath:. The only way I can think of to set the selected cell to checkmark (and clear the previous one) is to call [tableView reloadData] in didSelectRowAtIndexPath:. However, when I do this, the animating of the cell deselection is weird (a white box appears where the cell's label should be). If I don't call reloadData, of course, the accessoryType won't change, so the checkmarks won't appear. I suppose I could turn the animation off, but that seems lame. I also toyed with getting and altering the cells in didSelectRowAtIndexPath:, but that's a big pain. Any ideas? Abbreviated code follows... - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { UITableViewCell* aCell = [tableView dequeueReusableCellWithIdentifier:kImageCell]; if( aCell == nil ) { aCell = [[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:kImageCell]; } aCell.text = [imageNames objectAtIndex:[indexPath row]]; if( [indexPath row] == selectedImage ) { aCell.accessoryType = UITableViewCellAccessoryCheckmark; } else { aCell.accessoryType = UITableViewCellAccessoryNone; } return aCell; } - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { [tableView deselectRowAtIndexPath:indexPath animated:YES]; selectedImage = [indexPath row] [tableView reloadData]; }

    Read the article

  • Android Video Layout and backbutton to activity

    - by Marcjc
    I have an application where you can click on a button, this takes you to a new activity with four new buttons, listen, bio, ringtone, and watch. My watch button kicks off the following code: Button cmd_watchme = (Button)this.findViewById(R.id.watch); cmd_watchme.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { setContentView(R.layout.tvvideo); VideoView video=(VideoView)findViewById(R.id.VideoView); MediaController mediaController = new MediaController(andy.this); mediaController.setAnchorView(video); video.setMediaController(mediaController); video.setVideoURI(videopath); video.start(); } }); After the video is displayed I am trying to get the backbutton on the phone itself to take the user back to the four button selection activity, listen, bio, ringtone, and watch. Question is, how do i do this? I was figuring if there was a way to change the ContentView after the video is displayed back to the main one for the four button page but could not figure it out. When I press the backbutton on the device, it takes me two levels up to the main selection activity not the four button activity. I hope this was somewhat clear. Thanks for any help.

    Read the article

  • for a blog with posts and categories what are all the best ways to create user friendly and seo friendly urls

    - by Jayapal Chandran
    I am creating a module in my website which displays ringtones. it is like creating blog posts and categories It will have categories(tags) and posts. (i am using category and tag interchangeably) i am using the following linking for this module sitename.com/blog sitename.com/blog/category/category-name-slug/ - will list all ringtones of that category/tag sitename.com/blog/title/name-slug-of-the-ringtone/ - this will display the details and a download link in all page at the left i display the category/tag . This is how i have formed the url structure. it will be user friendly i hope yet will it be seo friendly? Please hint if i am missing something or other ways to improve. meanwhile i am browsing the net to get more information on linking content (categorizing) and to find best ways for the user and search engine.

    Read the article

  • Visit the Museum of Endangered Sounds for a Bit of Nostalgic Sound-Based Fun

    - by Asian Angel
    Are you ready for a trip down memory lane? Then you will definitely want to visit the Museum of Endangered Sounds where you can have fun listening to the classic sounds of yesteryear! Enjoy listening to the sound of dial-up, the login sound of Windows 95, that classic Nokia ringtone, and more at the Museum. Click on a picture to play the sound, then click on the picture again to stop it. The sounds will continue to play until you click on the chosen picture… Museum of Endangered Sounds [via Neatorama] Browse on over to another of our ETC posts for more nostalgic sound fun: Hack Your Kindle for Easy Font Customization HTG Explains: What Is RSS and How Can I Benefit From Using It? HTG Explains: Why You Only Have to Wipe a Disk Once to Erase It

    Read the article

  • The How-To Geek Guide to Audio Editing: Cutting, Trimming & Arranging

    - by YatriTrivedi
    Audacity novices often start with lofty project ideas, but sometimes they lack the basics. Knowing how to cut and trim tracks is basic audio editing and is a fundamental starting point for making more elaborate arrangements. For this exercise, I’ll be making a ringtone from a Castlevania: Symphony of the Night track. I have the original CD and used that so I started with better quality audio than an MP3. You can follow along with any file you like, just so you get a feel for cutting, trimming, and arranging sound clips for yourself. I know which parts I want to edit in the track, but a quick play-through will help me look for those areas visually. How to Enable Google Chrome’s Secret Gold IconHTG Explains: What’s the Difference Between the Windows 7 HomeGroups and XP-style Networking?Internet Explorer 9 Released: Here’s What You Need To Know

    Read the article

  • Android - Volume Buttons used in my application

    - by Iuliu Atudosiei
    Hi, I need to use volume buttons to control a variable parameter in my application. I use Activity.onKeyDown to get notified when the button is pressed but the media volume is also increased. Android is doing something like below when I press the volume key: 1. increase media / ringtone volume 2. pass the event to my application Is there a way to avoid increasing the system volume and use volume key only for my application ? Thanks

    Read the article

  • Silverlight Cream for November 27, 2011 -- #1176

    - by Dave Campbell
    In this Issue: Matt Eland, Parag Joshi, Jerrel Blankenship, and Joost van Schaik. Above the Fold: WP7: "Safe event detachment base class for Windows Phone 7 behaviors" Joost van Schaik Shoutouts: Michael Palermo's latest Desert Mountain Developers is up Michael Washington's latest Visual Studio #LightSwitch Daily is up From SilverlightCream.com:31 Days of Mango | Day #22: App ConnectMatt Eland takes the reigns of Jeff's blog for Day 22 and is talking about App Connect... App Connect allows apps to be listed on Quick Cards relative to an app's subject matter, and Quick Cards are items that appear in searches to let users find out more info... check out the blog post if you're not familiar with this31 Days of Mango | Day #21: SocketsJeff's Day 21 is written by Parag Joshi, and is on sockets... and is building a WP7 app for posting restaurant orders to a Silverlight OOB app running on a host machine... good sized tutorial and discussion, plus a project to download and play with31 Days of Mango | Day #20: Creating RingtonesJerrel Blankenship has Day 20 for Jeff Blankenburg's 31 Days of Mango and is discussing Ringtones... how to create and save a custom ringtone for your userSafe event detachment base class for Windows Phone 7 behaviorsJoost van Schaik revisits his Safe Event Detachment pattern for WP7 and built a base class to take care of the initialization involved to be kind to us, the developers... code includedStay in the 'Light!Twitter SilverlightNews | Twitter WynApse | WynApse.com | Tagged Posts | SilverlightCreamJoin me @ SilverlightCream | Phoenix Silverlight User GroupTechnorati Tags:Silverlight    Silverlight 3    Silverlight 4    Windows PhoneMIX10

    Read the article

  • How to set notification sound volume programatically?

    - by Vitalii Korsakov
    I have this method in my main activity private void beep() { AudioManager manager = (AudioManager) getSystemService(Context.AUDIO_SERVICE); manager.setStreamVolume(AudioManager.STREAM_NOTIFICATION, 0, AudioManager.FLAG_SHOW_UI + AudioManager.FLAG_PLAY_SOUND); Uri notification = RingtoneManager .getDefaultUri(RingtoneManager.TYPE_NOTIFICATION); Ringtone r = RingtoneManager.getRingtone(getApplicationContext(), notification); r.play(); } As I understand, notification sound volume should be regulated by STREAM_NOTIFICATION. But notification always plays with the same volume despite that volume number in setStreamVolume method. Why is that?

    Read the article

1 2  | Next Page >