How to set music files which are not in Media Store as ringtone
Before Jelly Bean level 18 I can use music files which are not in Media
store (for example, a private .mp3 file in a folder contains .nomedia
file, so Media Scanner does not scan this folder and does not know about
this file) but from Android 4.3 (tested on Nexus 4) I can not do that, it
only works for music files which are already scanned by Media Scanner.
The real reason of this problem is I cannot insert ContentValues with
MediaColumns.DATA is a absolute path of a file not scanned by Media
Scanner, insert method always return null.
Uri newUri = getCR().insert(uri, contentValues); // returns null in
Android 4.3
Does anyone have a workaround to use a private file (not scanned and not
recognized by Media Scanner) as ringtone?
No comments:
Post a Comment