Advertisement
Guest User

Untitled

a guest
Jun 10th, 2015
374
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. public String[] getRingTones() {
  2. RingtoneManager manager = new RingtoneManager(AddAlarm.this);
  3. manager.setType(RingtoneManager.TYPE_ALARM);
  4. Cursor cursor = manager.getCursor();
  5. ringNames = new String[cursor.getCount()];
  6. int i = 0;
  7. while (cursor.moveToNext()) {
  8. String title = cursor.getString(RingtoneManager.TITLE_COLUMN_INDEX);
  9. String uri = cursor.getString(RingtoneManager.URI_COLUMN_INDEX);
  10. ringNames[i] = title;
  11. i += 1;
  12. }
  13. return ringNames;
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement