2012-11-11 41 views
0

我對Eclipse和Android的一般活動比較陌生。我正在製作一個處理傳入呼叫的​​Android應用程序。但是當我模擬通話時,它不會播放任何聲音,並且在聲音設置中,唯一的選項是「無聲」。我想爲模擬器設置鈴聲。有人能幫助我嗎?如果有幫助,我將使用Eclipse Juno和4.1平臺。Eclipse中的鈴聲幫助?

回答

0

如果你可以用廣播的服務,瞭解電話的狀態:環,掛機等

基本上發揮鈴聲例子:

{ 

Context context = this; //or getBaseContext() depend where you execute the code 
Uri notification = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_RINGTONE); 
Ringtone r = RingtoneManager.getRingtone(context, notification); 
r.play(); 

}