How to set Alarm Tone from My Application using AlarmManager?
<p>How to set Alarm Tone from My Application using AlarmManager?</p>

<p>My RingTonePicker Method:-</p>

<pre><code>private void startRing()
{
   Intent i = new Intent(RingtoneManager.ACTION_RINGTONE_PICKER);
   startActivityForResult(i, ACTIVITY_SET_RINGTONE);
}

@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data )
{
    switch (resultCode) {
        case RESULT_OK:
            Uri uri = data.getParcelableExtra(RingtoneManager.EXTRA_RINGTONE_PICKED_URI);
            Log.i("Sample", "uri " + uri);
            RingtoneManager.setActualDefaultRingtoneUri(this,RingtoneManager.TYPE_NOTIFICATION, uri);
                 break;
           }
    super.onActivityResult(requestCode, resultCode, data);
}
</code></pre>

<p>My BroadCast Receiver Method:- </p>

<pre><code>public void onReceive(Context context, Intent intent) {
    Toast.makeText(context, "matched", Toast.LENGTH_LONG).show();
    // Vibrate the mobile phone
    Vibrator vibrator = (Vibrator) context
            .getSystemService(Context.VIBRATOR_SERVICE);
    vibrator.vibrate(2000);
}
</code></pre>

<p>The Problem is Only Vibrator is vibrating no Ringtone is Playing.</p>

<p>Please Help Me.</p>

<p>Thanks in Advance. </p>
