Assuming you have an ad ...
NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(this) .setAutoCancel(true) .setLargeIcon(BitmapFactory.decodeResource(getResources(), R.drawable.ic_launcher)) .setTicker(title) .setWhen(ts) .setContentTitle(title) .setStyle(new NotificationCompat.BigTextStyle() .bigText(message)) .setContentText(message);
... built somewhere in your code, try the following:
final String ringTone = "default ringtone"; // or store in preferences, and fallback to this mBuilder.setSound(Uri.parse(ringTone));
source share