Nemesis
Nemesis

Reputation: 5

Set default ringtone from private internal storage

Is it possible to set a default ringtone from private internal storage? I did set the default ringtone from private internal storage but it's not playing.

file.getAbsolutePath = data/data/<package>/files/audio.mp3.

Upvotes: 0

Views: 422

Answers (1)

Weston
Weston

Reputation: 1992

In my testing (Android v.19), I can use RingtoneManager.setActualDefaultRingtoneUri() to point to a ringtone on private, internal app storage without exception.

However, attempting to play this Ringtone simply plays the default sound. I'm betting the system application that plays Ringtones doesn't have access to your apps internal storage. Bad for this scenario, but good for security!

Upvotes: 1

Related Questions