update
This commit is contained in:
@@ -3,6 +3,10 @@ package com.tianrun.sipcall;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.database.Cursor;
|
||||
import android.media.Ringtone;
|
||||
import android.media.RingtoneManager;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
|
||||
@@ -325,5 +329,21 @@ public class SipEngine implements BluetelInterface {
|
||||
return myBluetelEngine.Holder(isHolder, callid);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 播放系统默认来电铃声
|
||||
*
|
||||
* @return MediaPlayer对象
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
public void PlaydefaultCallMediaPlayer(Context context) {
|
||||
Uri notification = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_RINGTONE);
|
||||
Ringtone r = RingtoneManager.getRingtone(context, notification);
|
||||
r.play();
|
||||
}
|
||||
public void StopdefaultCallMediaPlayer(Context context) {
|
||||
Uri notification = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_RINGTONE);
|
||||
Ringtone r = RingtoneManager.getRingtone(context, notification);
|
||||
r.stop();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user