| | |
| | | package com.example.hdllinphonesdkdemo; |
| | | |
| | | import android.app.Activity; |
| | | import android.content.Context; |
| | | import android.content.Intent; |
| | | import android.graphics.Bitmap; |
| | | import android.media.AudioManager; |
| | | import android.media.MediaPlayer; |
| | | import android.os.Bundle; |
| | | import android.util.Log; |
| | |
| | | |
| | | public class LinphoneTestActivity extends Activity { |
| | | |
| | | private static final String password = "Wc7SeYXb0oyGOXVvtUYtju2Dy"; |
| | | private static final String password = "675982"; |
| | | private static final String serverIP = "47.96.88.250:25060";//""116.62.26.215:35060";// proxy "sip:47.96.88.250:25060" |
| | | private String account = ""; |
| | | // mHDLSipInfo.sipAccount "1833327986738167809" string |
| | | // uPqYE1vzBuggtUc2QfZlfsjDv |
| | | // realm "47.96.88.250:25060" string |
| | | |
| | | // sipAccount "A932332998811174" string |
| | | // sipPasswd "675982" string |
| | | // sip:D31-11-1@139.159.157.75:47000 |
| | | // 登录 |
| | | private EditText accountEdit; |
| | | private Button loginBtn; |
| | |
| | | btn.setOnClickListener(new View.OnClickListener() { |
| | | @Override |
| | | public void onClick(View v) { |
| | | HDLLinphoneKit.getInstance().setMediaPlayerLooping(true); |
| | | HDLLinphoneKit.getInstance().playRingtone(); |
| | | |
| | | // HDLLinphoneKit.getInstance().setMediaPlayerLooping(true); |
| | | // HDLLinphoneKit.getInstance().playRingtone(); |
| | | HDLLinphoneKit.getInstance().audioManager =(AudioManager) getSystemService(Context.AUDIO_SERVICE); |
| | | Log.i("HDLLinphoneKit.getInstance().audioManager", |
| | | HDLLinphoneKit.getInstance().audioManager.getRingerMode()+""); |
| | | } |
| | | }); |
| | | Button btn2 = findViewById(R.id.test1_btn); |