tDataSource(context, soundUri) įinal AudioManager audioManager = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE) MediaPlayer mMediaPlayer = new MediaPlayer()
Uri soundUri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION) Public void playSound(Context context) throws IllegalArgumentException,
Funny sounds Step 1: Download the NCH Tone Generator (free to try) Sound module for. Sounds all wrong: tg.startTone(ToneGenerator.TONE_CDMA_KEYPAD_VOLUME_KEY_LITE) Just fill out the account information below 2 days ago TikTok user. Double beeps: tg.startTone(ToneGenerator.TONE_PROP_BEEP2) You can click to vote up the examples that are useful to you. Here are some other likely ToneGenerator sounds I tried that were not a match (the first two might be useful as alternates to the volume beep): // Double beeps: tg.startTone(ToneGenerator.TONE_PROP_ACK) The following code examples are extracted from open source projects.
You seem to be asking for an alternative to ToneGenerator, but I think it gives you exactly what you want in two lines. Other Android examples (source code examples) Here is a short list of links related to this Android ToneGenerator. Example 2: using