Custom Contact Ringtone Not Working on Some devices
问题 I'm developing music player, in that i have to set audio file as ringtone for contacts. Below code is working for some phones and some phones not. public static int setContactRingtone(@NonNull Context context, @NonNull Song song, String number) { int value = 0; if (context == null) { value = 0; } File f = new File(song.getmSongPath()); final Uri lookupUri = Uri.withAppendedPath(ContactsContract.PhoneLookup.CONTENT_FILTER_URI, number); final String[] projection = new String[] {