This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Retrieve a list of Music files currently listed in the Media store DB via URI. | |
//Some audio may be explicitly marked as not being music | |
String selection = MediaStore.Audio.Media.IS_MUSIC + " != 0"; | |
String[] projection = { | |
MediaStore.Audio.Media._ID, | |
MediaStore.Audio.Media.ARTIST, | |
MediaStore.Audio.Media.TITLE, | |
MediaStore.Audio.Media.DATA, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private class FetchContacts extends AsyncTask<Void, Void, ArrayList<Contact>> { | |
private final String DISPLAY_NAME = Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB ? | |
ContactsContract.Contacts.DISPLAY_NAME_PRIMARY : ContactsContract.Contacts.DISPLAY_NAME; | |
private final String FILTER = DISPLAY_NAME + " NOT LIKE '%@%'"; | |
private final String ORDER = String.format("%1$s COLLATE NOCASE", DISPLAY_NAME); | |
@SuppressLint("InlinedApi") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Retrieve a list of Music files currently listed in the Media store DB via URI. | |
//Some audio may be explicitly marked as not being music | |
String selection = MediaStore.Audio.Media.IS_MUSIC + " != 0"; | |
String[] projection = { | |
MediaStore.Audio.Media._ID, | |
MediaStore.Audio.Media.ARTIST, | |
MediaStore.Audio.Media.TITLE, | |
MediaStore.Audio.Media.DATA, |