Is it possible to make a song from the raw folder starts when i receive a notification? I tried this code to make the song "alert" starts but nothing happen.
NotificationManager notificationManager = (NotificationManager) context
.getSystemService(Context.NOTIFICATION_SERVICE);
Notification notification = new Notification(R.drawable.beatdanger,
"Your friend is in danger!!!", System.currentTimeMillis());
// Hide the notification after its selected
notification.flags |= Notification.FLAG_AUTO_CANCEL;
notification.sound = Uri.parse("R.raw.alert");
Intent intent1 = new Intent("wael.ilahi.pfe.SMSRECEIVERESULT");
intent1.putExtra("coordination", str);
PendingIntent pendingIntent = PendingIntent.getActivity(context, 0,
intent1, 0);
notification.setLatestEventInfo(context, "Help your friend !!",
str, pendingIntent);
notificationManager.notify(0, notification);