2011-12-03 3 views
1

특정 사운드 파일에 대한 URI 인 기본 벨소리 contents://settings/system/ringtone이 있습니다. 그 노래의 제목과 기타 세부 사항을 어떻게 얻을 수 있습니까?기본 벨소리에서 메타 데이터 가져 오기

+0

니스 편집, @Craigy! user1078570, Craigy의 사례를 통해 배워야합니다. 명확하게 편집하지 않은 경우이 질문은 다른 질문처럼 빠르게 닫 혔을 것입니다. – Shog9

+0

이 질문은 편집이 취소되면 다시 열어야합니다! –

답변

5

기본 벨소리 메타 데이터를 가져 오는 것은 생각했던 것보다 조금 복잡합니다.

시작하기에 좋은 곳은 RingtoneManager입니다. 나는 그것을 얻을 수 있는지 확실하지 않다

Uri ringtoneUri = RingtoneManager 
     .getDefaultUri(RingtoneManager.TYPE_RINGTONE); 
Ringtone ringtone = RingtoneManager.getRingtone(this, ringtoneUri); 
String title = ringtone.getTitle(this); 

: 기본 벨소리의 제목을 얻을하는 것이 간단이 클래스를 사용

int TYPE_ALARM   Type that refers to sounds that are used for the alarm. 
int TYPE_ALL    All types of sounds. 
int TYPE_NOTIFICATION Type that refers to sounds that are used for notifications. 
int TYPE_RINGTONE  Type that refers to sounds that are used for the phone ringer. 

: 그것은 네 가지 영역에서 기본 Ringtone를 얻기위한 방법을 제공 벨소리에 관한 다른 데이터.

관련 문제