upgrade
This commit is contained in:
@@ -117,6 +117,7 @@ public class SipEngine implements BluetelInterface {
|
|||||||
this.ip = ip;
|
this.ip = ip;
|
||||||
this.port = port;
|
this.port = port;
|
||||||
myBluetelEngine.Register(name, pw, ip, port);
|
myBluetelEngine.Register(name, pw, ip, port);
|
||||||
|
isRelogin = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -132,6 +133,7 @@ public class SipEngine implements BluetelInterface {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void AccountState(String uri, boolean state) {
|
public void AccountState(String uri, boolean state) {
|
||||||
|
if(isRelogin) return;
|
||||||
logmy.e(uri + "-->" + state);
|
logmy.e(uri + "-->" + state);
|
||||||
if (state) {
|
if (state) {
|
||||||
if (!onLine) {
|
if (!onLine) {
|
||||||
@@ -150,12 +152,11 @@ public class SipEngine implements BluetelInterface {
|
|||||||
}, null);
|
}, null);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if(!onLine && !isRelogin) {
|
if(!onLine) {
|
||||||
UIUtl.toastI("Sip登陆失败");
|
UIUtl.toastI("Sip登陆失败");
|
||||||
ActivityMgr.sendMsg(CONS.LOGINFAILED, null);
|
ActivityMgr.sendMsg(CONS.LOGINFAILED, null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
isRelogin = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isMeetingCall(String phoneNo) {
|
public boolean isMeetingCall(String phoneNo) {
|
||||||
|
|||||||
@@ -56,6 +56,7 @@ public class CreateGroupActivity extends TrBaseActivity {
|
|||||||
DBUser u = new DBUser("", "添加分机号", "");
|
DBUser u = new DBUser("", "添加分机号", "");
|
||||||
u.isAddFlag = true;
|
u.isAddFlag = true;
|
||||||
users.add(u);
|
users.add(u);
|
||||||
|
users.add(DBUser.mySelf);
|
||||||
|
|
||||||
setList(null);
|
setList(null);
|
||||||
}
|
}
|
||||||
@@ -219,6 +220,11 @@ public class CreateGroupActivity extends TrBaseActivity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void createGroup(View view) {
|
public void createGroup(View view) {
|
||||||
|
String name = meetingTopic.getText().toString();
|
||||||
|
if(name == null || name.isEmpty()) {
|
||||||
|
UIUtl.toastI("分组名不能为空");
|
||||||
|
return;
|
||||||
|
}
|
||||||
String userStr = getSelectedUsers();
|
String userStr = getSelectedUsers();
|
||||||
if (userStr == null || userStr == "") {
|
if (userStr == null || userStr == "") {
|
||||||
UIUtl.toastI("请添加要加入会议的分机号");
|
UIUtl.toastI("请添加要加入会议的分机号");
|
||||||
|
|||||||
@@ -174,7 +174,7 @@ public class CreateMeetingActivity extends TrBaseActivity {
|
|||||||
List<String> list = new ArrayList<>();
|
List<String> list = new ArrayList<>();
|
||||||
List<String> listPhone = new ArrayList<>();
|
List<String> listPhone = new ArrayList<>();
|
||||||
for (DBUser u : DBUser.allUser) {
|
for (DBUser u : DBUser.allUser) {
|
||||||
if (mapUsers.get(u.phone) == null) {
|
if (mapUsers.get(u.phone) == null && (!u.isBusy())) { // 只有空间的才加入
|
||||||
listPhone.add(u.phone);
|
listPhone.add(u.phone);
|
||||||
list.add(u.phone + " | " + u.name);
|
list.add(u.phone + " | " + u.name);
|
||||||
}
|
}
|
||||||
@@ -256,16 +256,17 @@ public class CreateMeetingActivity extends TrBaseActivity {
|
|||||||
Net.createMeeting(meetingTopic.getText().toString(), meetingDesc.getText().toString(), userStr, new HttpUtl.CallBack() {
|
Net.createMeeting(meetingTopic.getText().toString(), meetingDesc.getText().toString(), userStr, new HttpUtl.CallBack() {
|
||||||
@Override
|
@Override
|
||||||
public void onRequestComplete(int cmd, String result, Object orgs) {
|
public void onRequestComplete(int cmd, String result, Object orgs) {
|
||||||
JSONObject jo = JSONObject.parseObject(result);
|
// JSONObject jo = JSONObject.parseObject(result);
|
||||||
if (jo != null) {
|
// if (jo != null) {
|
||||||
String code = "";
|
// String code = "";
|
||||||
if(isVideo) {
|
// if(isVideo) {
|
||||||
code = jo.getString("video_code");
|
// code = jo.getString("video_code");
|
||||||
} else {
|
// } else {
|
||||||
code = jo.getString("audio_code");
|
// code = jo.getString("audio_code");
|
||||||
}
|
// }
|
||||||
SipEngine.getInstance().CallNumber(code, isVideo);
|
// SipEngine.getInstance().CallNumber(code, isVideo);
|
||||||
}
|
// }
|
||||||
|
UIUtl.toastS("临时会议创建成功");
|
||||||
dialog.dismiss();
|
dialog.dismiss();
|
||||||
finish();
|
finish();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -147,9 +147,21 @@ public class InCallMeetingActivity extends TrBaseActivity implements OnClickList
|
|||||||
allUsers.clear();
|
allUsers.clear();
|
||||||
setUsers();
|
setUsers();
|
||||||
getMembers();
|
getMembers();
|
||||||
|
getMemberTimer();
|
||||||
initTabAndPager();
|
initTabAndPager();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void getMemberTimer() {
|
||||||
|
CONS.SENDMESSAGETO(handler_CallActivity, -1, null);
|
||||||
|
handler_CallActivity.postDelayed(getMemberRunner, 2000);
|
||||||
|
}
|
||||||
|
static Runnable getMemberRunner = new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
getMemberTimer();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
private void initview() {
|
private void initview() {
|
||||||
View view = findViewById(R.id.IncallMeetingRoot);
|
View view = findViewById(R.id.IncallMeetingRoot);
|
||||||
gridUser = view.findViewById(R.id.GridUser);
|
gridUser = view.findViewById(R.id.GridUser);
|
||||||
@@ -393,7 +405,7 @@ public class InCallMeetingActivity extends TrBaseActivity implements OnClickList
|
|||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
qa.addAction(new QMUIQuickAction.Action().icon(R.drawable.fullscreen).text("切到主界面").onClick(
|
qa.addAction(new QMUIQuickAction.Action().icon(R.drawable.fullscreen).text("主界面").onClick(
|
||||||
new QMUIQuickAction.OnClickListener() {
|
new QMUIQuickAction.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(QMUIQuickAction quickAction, QMUIQuickAction.Action action, int position) {
|
public void onClick(QMUIQuickAction quickAction, QMUIQuickAction.Action action, int position) {
|
||||||
@@ -490,11 +502,13 @@ public class InCallMeetingActivity extends TrBaseActivity implements OnClickList
|
|||||||
stopVideoStream(true);
|
stopVideoStream(true);
|
||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
SipEngine.getInstance().hangup(callid);
|
SipEngine.getInstance().hangup(callid);
|
||||||
|
handler_CallActivity.removeCallbacks(getMemberRunner);
|
||||||
handler_CallActivity = null;
|
handler_CallActivity = null;
|
||||||
if (wakeLock != null) {
|
if (wakeLock != null) {
|
||||||
wakeLock.release();
|
wakeLock.release();
|
||||||
wakeLock = null;
|
wakeLock = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -553,6 +567,9 @@ public class InCallMeetingActivity extends TrBaseActivity implements OnClickList
|
|||||||
case Net
|
case Net
|
||||||
.CMD_getGroupMenbers:
|
.CMD_getGroupMenbers:
|
||||||
break;
|
break;
|
||||||
|
case -1:
|
||||||
|
getMembers();
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -658,7 +675,7 @@ public class InCallMeetingActivity extends TrBaseActivity implements OnClickList
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
));
|
));
|
||||||
qa.addAction(new QMUIQuickAction.Action().icon(R.drawable.unmute).text("全部取消禁言").onClick(
|
qa.addAction(new QMUIQuickAction.Action().icon(R.drawable.unmute).text("取消禁言").onClick(
|
||||||
new QMUIQuickAction.OnClickListener() {
|
new QMUIQuickAction.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(QMUIQuickAction quickAction, QMUIQuickAction.Action action, int position) {
|
public void onClick(QMUIQuickAction quickAction, QMUIQuickAction.Action action, int position) {
|
||||||
@@ -687,7 +704,7 @@ public class InCallMeetingActivity extends TrBaseActivity implements OnClickList
|
|||||||
.dimAmount(0.5f)
|
.dimAmount(0.5f)
|
||||||
.skinManager(QMUISkinManager.defaultInstance(InCallMeetingActivity.this))
|
.skinManager(QMUISkinManager.defaultInstance(InCallMeetingActivity.this))
|
||||||
.edgeProtection(QMUIDisplayHelper.dp2px(InCallMeetingActivity.this, 20));
|
.edgeProtection(QMUIDisplayHelper.dp2px(InCallMeetingActivity.this, 20));
|
||||||
qa.addAction(new QMUIQuickAction.Action().icon(R.drawable.unvideo).text("全部关闭视频").onClick(
|
qa.addAction(new QMUIQuickAction.Action().icon(R.drawable.unvideo).text("全部关闭").onClick(
|
||||||
new QMUIQuickAction.OnClickListener() {
|
new QMUIQuickAction.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(QMUIQuickAction quickAction, QMUIQuickAction.Action action, int position) {
|
public void onClick(QMUIQuickAction quickAction, QMUIQuickAction.Action action, int position) {
|
||||||
@@ -705,7 +722,7 @@ public class InCallMeetingActivity extends TrBaseActivity implements OnClickList
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
));
|
));
|
||||||
qa.addAction(new QMUIQuickAction.Action().icon(R.drawable.video).text("全部恢复视频").onClick(
|
qa.addAction(new QMUIQuickAction.Action().icon(R.drawable.video).text("全部恢复").onClick(
|
||||||
new QMUIQuickAction.OnClickListener() {
|
new QMUIQuickAction.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(QMUIQuickAction quickAction, QMUIQuickAction.Action action, int position) {
|
public void onClick(QMUIQuickAction quickAction, QMUIQuickAction.Action action, int position) {
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ public class DBUser {
|
|||||||
public String name = "";
|
public String name = "";
|
||||||
public String phone = "";
|
public String phone = "";
|
||||||
public String status = "";
|
public String status = "";
|
||||||
public boolean isManager = false;
|
public boolean isManager = true;
|
||||||
public boolean isAddFlag = false;
|
public boolean isAddFlag = false;
|
||||||
|
|
||||||
public boolean isMute = false;
|
public boolean isMute = false;
|
||||||
@@ -37,7 +37,7 @@ public class DBUser {
|
|||||||
this.status = d.getString("sip_state");
|
this.status = d.getString("sip_state");
|
||||||
String weight = d.getString("weight");
|
String weight = d.getString("weight");
|
||||||
if (weight != null) {
|
if (weight != null) {
|
||||||
this.isManager = weight.equals("1");
|
this.isManager = weight.equals("1") ? true : false;
|
||||||
} else {
|
} else {
|
||||||
this.isManager = false;
|
this.isManager = false;
|
||||||
}
|
}
|
||||||
@@ -66,7 +66,7 @@ public class DBUser {
|
|||||||
u = new DBUser((JSONObject) o);
|
u = new DBUser((JSONObject) o);
|
||||||
allUser.add(u);
|
allUser.add(u);
|
||||||
mapUsers.put(u.phone, u);
|
mapUsers.put(u.phone, u);
|
||||||
if (mySelf != null && u.phone == mySelf.phone) {
|
if (mySelf != null && u.phone.equals(mySelf.phone)) {
|
||||||
mySelf = u;
|
mySelf = u;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ import java.util.List;
|
|||||||
|
|
||||||
public class LoginActivity extends TrBaseActivity {
|
public class LoginActivity extends TrBaseActivity {
|
||||||
private TextView show;
|
private TextView show;
|
||||||
private EditText username, userpw, userip, userport;
|
private EditText username, userpw, userip, userport, httpHost, httpPort;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 账号密码服务器地址端口直接在这输入
|
* 账号密码服务器地址端口直接在这输入
|
||||||
@@ -54,6 +54,8 @@ public class LoginActivity extends TrBaseActivity {
|
|||||||
private String pw = "";
|
private String pw = "";
|
||||||
private int port = 0;
|
private int port = 0;
|
||||||
private String ip = "";
|
private String ip = "";
|
||||||
|
private String http_ip = "";
|
||||||
|
private int http_port = 0;
|
||||||
QMUITipDialog dialogLoading;
|
QMUITipDialog dialogLoading;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -65,6 +67,8 @@ public class LoginActivity extends TrBaseActivity {
|
|||||||
userpw = findViewById(R.id.userpw);
|
userpw = findViewById(R.id.userpw);
|
||||||
userip = findViewById(R.id.userip);
|
userip = findViewById(R.id.userip);
|
||||||
userport = findViewById(R.id.userport);
|
userport = findViewById(R.id.userport);
|
||||||
|
httpHost = findViewById(R.id.http_host);
|
||||||
|
httpPort = findViewById(R.id.http_port);
|
||||||
if (Build.VERSION.SDK_INT >= 23) {//6.0才用动态权限
|
if (Build.VERSION.SDK_INT >= 23) {//6.0才用动态权限
|
||||||
initPermission();
|
initPermission();
|
||||||
}
|
}
|
||||||
@@ -75,7 +79,11 @@ public class LoginActivity extends TrBaseActivity {
|
|||||||
username.setText(obj.getString("name"));
|
username.setText(obj.getString("name"));
|
||||||
userpw.setText(obj.getString("password"));
|
userpw.setText(obj.getString("password"));
|
||||||
userip.setText(obj.getString("ip"));
|
userip.setText(obj.getString("ip"));
|
||||||
userport.setText(obj.getInteger("port").toString());
|
Integer port = obj.getInteger("port");
|
||||||
|
userport.setText(port == null? "" : port.toString());
|
||||||
|
httpHost.setText(obj.getString("http_ip"));
|
||||||
|
port = obj.getInteger("http_port");
|
||||||
|
httpPort.setText(port == null? "" : port.toString());
|
||||||
|
|
||||||
handler.postDelayed(new Runnable() {
|
handler.postDelayed(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
@@ -122,9 +130,13 @@ public class LoginActivity extends TrBaseActivity {
|
|||||||
public void doLogin() {
|
public void doLogin() {
|
||||||
if (SipEngine.getInstance().isonLine())
|
if (SipEngine.getInstance().isonLine())
|
||||||
return;
|
return;
|
||||||
if (!isEnable())
|
if (!isEnable()) {
|
||||||
|
UIUtl.toastI("请填写完整的设置信息");
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
dialogLoading = UIUtl.toastLoading("");
|
dialogLoading = UIUtl.toastLoading("");
|
||||||
|
Net.ip = http_ip;
|
||||||
|
Net.port = http_port;
|
||||||
SipEngine.getInstance().init();//先初始化
|
SipEngine.getInstance().init();//先初始化
|
||||||
new Handler().postDelayed(new Runnable() {
|
new Handler().postDelayed(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
@@ -143,6 +155,8 @@ public class LoginActivity extends TrBaseActivity {
|
|||||||
boolean b = false;
|
boolean b = false;
|
||||||
boolean c = false;
|
boolean c = false;
|
||||||
boolean d = false;
|
boolean d = false;
|
||||||
|
boolean e = false;
|
||||||
|
boolean f = false;
|
||||||
if (username.getText().toString() != null && !username.getText().toString().equals("")) {
|
if (username.getText().toString() != null && !username.getText().toString().equals("")) {
|
||||||
name = username.getText().toString();
|
name = username.getText().toString();
|
||||||
a = true;
|
a = true;
|
||||||
@@ -160,7 +174,16 @@ public class LoginActivity extends TrBaseActivity {
|
|||||||
d = true;
|
d = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return a && b && c && d;
|
if (httpHost.getText().toString() != null && !httpHost.getText().toString().equals("")) {
|
||||||
|
http_ip = httpHost.getText().toString();
|
||||||
|
e = true;
|
||||||
|
}
|
||||||
|
if (httpPort.getText().toString() != null && !httpPort.getText().toString().equals("")) {
|
||||||
|
http_port = Integer.parseInt(httpPort.getText().toString());
|
||||||
|
f = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return a && b && c && d && e && f;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -175,6 +198,8 @@ public class LoginActivity extends TrBaseActivity {
|
|||||||
jo.put("password", password);
|
jo.put("password", password);
|
||||||
jo.put("ip", ip);
|
jo.put("ip", ip);
|
||||||
jo.put("port", port);
|
jo.put("port", port);
|
||||||
|
jo.put("http_ip", http_ip);
|
||||||
|
jo.put("http_port", http_port);
|
||||||
SharedPreferences sp = getSharedPreferences("UserInfor", MODE_PRIVATE);
|
SharedPreferences sp = getSharedPreferences("UserInfor", MODE_PRIVATE);
|
||||||
sp.edit().putString("content", jo.toJSONString()).commit();
|
sp.edit().putString("content", jo.toJSONString()).commit();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import android.graphics.Color;
|
|||||||
import android.media.AudioManager;
|
import android.media.AudioManager;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.os.Handler;
|
||||||
import android.os.Message;
|
import android.os.Message;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
@@ -56,6 +57,7 @@ import java.util.ArrayList;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class MainActivity extends TrBaseActivity {
|
public class MainActivity extends TrBaseActivity {
|
||||||
|
public static Handler mainHandler;
|
||||||
TextView textVolum;
|
TextView textVolum;
|
||||||
TextView textSelfNum;
|
TextView textSelfNum;
|
||||||
QMUITabSegment mTabSegment;
|
QMUITabSegment mTabSegment;
|
||||||
@@ -71,6 +73,8 @@ public class MainActivity extends TrBaseActivity {
|
|||||||
ImageView buttonAddVol;
|
ImageView buttonAddVol;
|
||||||
ImageView buttonDelVol;
|
ImageView buttonDelVol;
|
||||||
DBHead currSelectData;
|
DBHead currSelectData;
|
||||||
|
ImageView imageViewSelfStatus;
|
||||||
|
TextView textViewSelfStatus;
|
||||||
|
|
||||||
GridView gridUser;
|
GridView gridUser;
|
||||||
List<Object> allUsers = new ArrayList<>();
|
List<Object> allUsers = new ArrayList<>();
|
||||||
@@ -119,6 +123,8 @@ public class MainActivity extends TrBaseActivity {
|
|||||||
setContentView(R.layout.activity_main);
|
setContentView(R.layout.activity_main);
|
||||||
textVolum = findViewById(R.id.Volumne);
|
textVolum = findViewById(R.id.Volumne);
|
||||||
textSelfNum = findViewById(R.id.textViewSelfNum);
|
textSelfNum = findViewById(R.id.textViewSelfNum);
|
||||||
|
imageViewSelfStatus = findViewById(R.id.imageViewSelfStatus);
|
||||||
|
textViewSelfStatus = findViewById(R.id.textViewSelfStatus);
|
||||||
mTabSegment = findViewById(R.id.HeadList);
|
mTabSegment = findViewById(R.id.HeadList);
|
||||||
gridUser = findViewById(R.id.GridUser);
|
gridUser = findViewById(R.id.GridUser);
|
||||||
mContentViewPager = findViewById(R.id.contentViewPager);
|
mContentViewPager = findViewById(R.id.contentViewPager);
|
||||||
@@ -144,6 +150,7 @@ public class MainActivity extends TrBaseActivity {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
mainHandler = this.handler;
|
||||||
|
|
||||||
ButtonDelGroup.setVisibility(View.INVISIBLE);
|
ButtonDelGroup.setVisibility(View.INVISIBLE);
|
||||||
StartMeetingVoice.setVisibility(View.INVISIBLE);
|
StartMeetingVoice.setVisibility(View.INVISIBLE);
|
||||||
@@ -155,7 +162,7 @@ public class MainActivity extends TrBaseActivity {
|
|||||||
headers.add(currSelectData);
|
headers.add(currSelectData);
|
||||||
initTabAndPager();
|
initTabAndPager();
|
||||||
Net.getGroups(null, null);
|
Net.getGroups(null, null);
|
||||||
Net.getUsers(null, null);
|
getUsersData();
|
||||||
checkBeforeMeetingState();
|
checkBeforeMeetingState();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -243,6 +250,7 @@ public class MainActivity extends TrBaseActivity {
|
|||||||
if (currSelectData.isAll()) {
|
if (currSelectData.isAll()) {
|
||||||
allUsers.addAll(DBUser.allUser);
|
allUsers.addAll(DBUser.allUser);
|
||||||
setUsers();
|
setUsers();
|
||||||
|
Net.getUsers(null, null);
|
||||||
} else {
|
} else {
|
||||||
DBGroup group = DBGroup.getGroup(currSelectData.id);
|
DBGroup group = DBGroup.getGroup(currSelectData.id);
|
||||||
if (group != null) {
|
if (group != null) {
|
||||||
@@ -290,6 +298,17 @@ public class MainActivity extends TrBaseActivity {
|
|||||||
buttonAddGroup.setVisibility(View.INVISIBLE);
|
buttonAddGroup.setVisibility(View.INVISIBLE);
|
||||||
imageViewAddGroupIcon.setVisibility(View.INVISIBLE);
|
imageViewAddGroupIcon.setVisibility(View.INVISIBLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (DBUser.mySelf.isBusy()) {
|
||||||
|
imageViewSelfStatus.setColorFilter(Color.RED);
|
||||||
|
textViewSelfStatus.setText("通话中");
|
||||||
|
} else if (DBUser.mySelf.isOnline()) {
|
||||||
|
imageViewSelfStatus.setColorFilter(Color.GREEN);
|
||||||
|
textViewSelfStatus.setText("在线");
|
||||||
|
} else {
|
||||||
|
imageViewSelfStatus.setColorFilter(Color.GRAY);
|
||||||
|
textViewSelfStatus.setText("离线");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void chgVolum(View v, boolean isAdd) {
|
void chgVolum(View v, boolean isAdd) {
|
||||||
@@ -314,7 +333,7 @@ public class MainActivity extends TrBaseActivity {
|
|||||||
static Runnable runGetUsers = new Runnable() {
|
static Runnable runGetUsers = new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
Net.getUsers(null, null);
|
getUsersData();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -322,8 +341,9 @@ public class MainActivity extends TrBaseActivity {
|
|||||||
return gridUser;
|
return gridUser;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void getUsersData() {
|
public static void getUsersData() {
|
||||||
handler.postDelayed(runGetUsers, 3000);
|
Net.getUsers(null, null);
|
||||||
|
mainHandler.postDelayed(runGetUsers, 3000);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setUsers() {
|
public void setUsers() {
|
||||||
@@ -404,7 +424,7 @@ public class MainActivity extends TrBaseActivity {
|
|||||||
public void onClick(QMUIQuickAction quickAction, QMUIQuickAction.Action action, int position) {
|
public void onClick(QMUIQuickAction quickAction, QMUIQuickAction.Action action, int position) {
|
||||||
quickAction.dismiss();
|
quickAction.dismiss();
|
||||||
QMUITipDialog dialog = UIUtl.toastLoading("");
|
QMUITipDialog dialog = UIUtl.toastLoading("");
|
||||||
Net.kickMember4Group(currSelectData.audio_code, d.phone, new HttpUtl.CallBack() {
|
Net.deleteMember4Group(currSelectData.id, d.phone, new HttpUtl.CallBack() {
|
||||||
@Override
|
@Override
|
||||||
public void onRequestComplete(int cmd, String result, Object orgs) {
|
public void onRequestComplete(int cmd, String result, Object orgs) {
|
||||||
UIUtl.toastS("移除分机成功");
|
UIUtl.toastS("移除分机成功");
|
||||||
@@ -526,6 +546,7 @@ public class MainActivity extends TrBaseActivity {
|
|||||||
@Override
|
@Override
|
||||||
protected void onDestroy() {
|
protected void onDestroy() {
|
||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
|
mainHandler.removeCallbacks(runGetUsers);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -535,12 +556,12 @@ public class MainActivity extends TrBaseActivity {
|
|||||||
finish();
|
finish();
|
||||||
break;
|
break;
|
||||||
case Net.CMD_getUsers:
|
case Net.CMD_getUsers:
|
||||||
getUsersData();
|
|
||||||
if (currSelectData.isAll()) {
|
if (currSelectData.isAll()) {
|
||||||
allUsers.clear();
|
allUsers.clear();
|
||||||
allUsers.addAll(DBUser.allUser);
|
allUsers.addAll(DBUser.allUser);
|
||||||
setUsers();
|
setUsers();
|
||||||
}
|
}
|
||||||
|
refreshView();
|
||||||
break;
|
break;
|
||||||
case Net.CMD_getGroupMenbers:
|
case Net.CMD_getGroupMenbers:
|
||||||
NetPkg pkg = (NetPkg) (m.obj);
|
NetPkg pkg = (NetPkg) (m.obj);
|
||||||
@@ -555,8 +576,8 @@ public class MainActivity extends TrBaseActivity {
|
|||||||
u.isAddFlag = true;
|
u.isAddFlag = true;
|
||||||
allUsers.add(u);
|
allUsers.add(u);
|
||||||
}
|
}
|
||||||
setUsers();
|
|
||||||
}
|
}
|
||||||
|
setUsers();
|
||||||
break;
|
break;
|
||||||
case Net.CMD_getGroups:
|
case Net.CMD_getGroups:
|
||||||
refreshHeaders();
|
refreshHeaders();
|
||||||
@@ -568,7 +589,6 @@ public class MainActivity extends TrBaseActivity {
|
|||||||
@Override
|
@Override
|
||||||
protected void onStop() {
|
protected void onStop() {
|
||||||
super.onStop();
|
super.onStop();
|
||||||
handler.removeCallbacks(runGetUsers);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addVolume(View view) {
|
public void addVolume(View view) {
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ public class Net {
|
|||||||
public static final int CMD_unvmuteMember4Group = 7013;
|
public static final int CMD_unvmuteMember4Group = 7013;
|
||||||
public static final int CMD_vidlayoutMember4Group = 7014;
|
public static final int CMD_vidlayoutMember4Group = 7014;
|
||||||
public static final int CMD_vidfloorMember4Group = 7015;
|
public static final int CMD_vidfloorMember4Group = 7015;
|
||||||
|
public static final int CMD_deleteMember4Group = 7016;
|
||||||
|
|
||||||
static HttpUtl.CallBack _callback = new HttpUtl.CallBack() {
|
static HttpUtl.CallBack _callback = new HttpUtl.CallBack() {
|
||||||
@Override
|
@Override
|
||||||
@@ -97,7 +98,7 @@ public class Net {
|
|||||||
|
|
||||||
public static void createMeeting(String topic, String description, String members, HttpUtl.CallBack callBack, Object orgs) {
|
public static void createMeeting(String topic, String description, String members, HttpUtl.CallBack callBack, Object orgs) {
|
||||||
String url = "http://" + ip + ":" + port + "/api/conferences/conference/insert";
|
String url = "http://" + ip + ":" + port + "/api/conferences/conference/insert";
|
||||||
String _params = "topic=" + topic + "&description=" + description + "&members=" + members + "&typ=prompt" + "&start_member=" + DBUser.mySelf.phone;
|
String _params = "topic=" + topic + "&description=" + description + "&members=" + members + "&type=prompt" + "&start_member=" + DBUser.mySelf.phone;
|
||||||
Object[] params = {callBack, orgs};
|
Object[] params = {callBack, orgs};
|
||||||
HttpUtl.doPostAsyn(url, _params, _callback, CMD_createMeeting, params);
|
HttpUtl.doPostAsyn(url, _params, _callback, CMD_createMeeting, params);
|
||||||
}
|
}
|
||||||
@@ -135,6 +136,13 @@ public class Net {
|
|||||||
HttpUtl.doPostAsyn(url, _params, _callback, CMD_addUser2Group, params);
|
HttpUtl.doPostAsyn(url, _params, _callback, CMD_addUser2Group, params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void deleteMember4Group(String task_uuid, String members, HttpUtl.CallBack callBack, Object orgs) {
|
||||||
|
String url = "http://" + ip + ":" + port + "/api/conferences/conference/delete";
|
||||||
|
String _params = "task_uuid=" + task_uuid + "&members=" + members;
|
||||||
|
Object[] params = {callBack, orgs};
|
||||||
|
HttpUtl.doPostAsyn(url, _params, _callback, CMD_deleteMember4Group, params);
|
||||||
|
}
|
||||||
|
|
||||||
public static void kickMember4Group(String task_uuid, String members, HttpUtl.CallBack callBack, Object orgs) {
|
public static void kickMember4Group(String task_uuid, String members, HttpUtl.CallBack callBack, Object orgs) {
|
||||||
String url = "http://" + ip + ":" + port + "/api/conferences/conference/update";
|
String url = "http://" + ip + ":" + port + "/api/conferences/conference/update";
|
||||||
String _params = "opr_nbr=" + task_uuid + "&opr_member=" + members + "&opr_action=kick";
|
String _params = "opr_nbr=" + task_uuid + "&opr_member=" + members + "&opr_action=kick";
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ public class TrBaseActivity extends AppCompatActivity implements Handler.Callbac
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onResume() {
|
protected void onResume() {
|
||||||
super.onResume();
|
super.onResume();
|
||||||
@@ -25,10 +26,18 @@ public class TrBaseActivity extends AppCompatActivity implements Handler.Callbac
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onStop() {
|
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||||
super.onStop();
|
super.onCreate(savedInstanceState);
|
||||||
ActivityMgr.onHideActivity(this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onStop() {
|
||||||
|
super.onStop();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onDestroy() {
|
||||||
|
super.onDestroy();
|
||||||
|
ActivityMgr.onHideActivity(this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -114,7 +114,7 @@ public class UIUtl {
|
|||||||
System.out.println(e);
|
System.out.println(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, 1200);
|
}, 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static TrAdapter setList(Context context, GridView grid, int convertViewId, Object list, TrAdapter.Callback callback) {
|
public static TrAdapter setList(Context context, GridView grid, int convertViewId, Object list, TrAdapter.Callback callback) {
|
||||||
|
|||||||
@@ -1,10 +1,19 @@
|
|||||||
package com.tianrun.sipcall.utils;
|
package com.tianrun.sipcall.utils;
|
||||||
|
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.content.pm.PackageItemInfo;
|
||||||
import android.graphics.Bitmap;
|
import android.graphics.Bitmap;
|
||||||
import android.graphics.BitmapFactory;
|
import android.graphics.BitmapFactory;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
|
import android.os.Bundle;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
|
import com.tianrun.sipcall.App;
|
||||||
|
import com.tianrun.sipcall.SipEngine;
|
||||||
|
import com.tianrun.sipcall.login.LoginActivity;
|
||||||
|
import com.tianrun.sipcall.ui.ActivityMgr;
|
||||||
|
import com.tianrun.sipcall.ui.UIUtl;
|
||||||
|
|
||||||
import java.io.BufferedReader;
|
import java.io.BufferedReader;
|
||||||
import java.io.ByteArrayOutputStream;
|
import java.io.ByteArrayOutputStream;
|
||||||
import java.io.DataOutputStream;
|
import java.io.DataOutputStream;
|
||||||
@@ -137,13 +146,14 @@ public class HttpUtl {
|
|||||||
baos.write(buf, 0, len);
|
baos.write(buf, 0, len);
|
||||||
}
|
}
|
||||||
baos.flush();
|
baos.flush();
|
||||||
if (baos.toString()==null||baos.toString().equals("")) {
|
if (baos.toString() == null || baos.toString().equals("")) {
|
||||||
Log.i("http", "result为空");
|
Log.i("http", "result为空");
|
||||||
} else {
|
} else {
|
||||||
Log.i("http", baos.toString());
|
Log.i("http", baos.toString());
|
||||||
}
|
}
|
||||||
return baos.toString();
|
return baos.toString();
|
||||||
} else {
|
} else {
|
||||||
|
checkTokenFailed(retCode);
|
||||||
throw new RuntimeException(" responseCode :" + retCode);
|
throw new RuntimeException(" responseCode :" + retCode);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -166,6 +176,25 @@ public class HttpUtl {
|
|||||||
// return null;
|
// return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void checkTokenFailed(int code) {
|
||||||
|
if(code == 401) {
|
||||||
|
UIUtl.toastI("Token 失效");
|
||||||
|
|
||||||
|
if(ActivityMgr.topActivity != null) {
|
||||||
|
SipEngine.getInstance().onLine = false;
|
||||||
|
SipEngine.getInstance().isRelogin = true;
|
||||||
|
// SipEngine.getInstance().Unregister();
|
||||||
|
// SipEngine.getInstance().stop();
|
||||||
|
Intent intent = new Intent(App.getContext(), LoginActivity.class);
|
||||||
|
Bundle bundle = new Bundle();
|
||||||
|
bundle.putBoolean("donotAutoLogin", true);
|
||||||
|
intent.putExtras(bundle);
|
||||||
|
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||||
|
ActivityMgr.topActivity.startActivity(intent);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 向指定 URL 发送POST方法的请求
|
* 向指定 URL 发送POST方法的请求
|
||||||
*
|
*
|
||||||
@@ -217,6 +246,9 @@ public class HttpUtl {
|
|||||||
if (result .equals("{}")){
|
if (result .equals("{}")){
|
||||||
result = conn.getResponseCode()+"";
|
result = conn.getResponseCode()+"";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int retCode = conn.getResponseCode();
|
||||||
|
checkTokenFailed(retCode);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
Log.i("http", e.toString());
|
Log.i("http", e.toString());
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="fill_parent"
|
android:layout_height="fill_parent"
|
||||||
android:background="@color/whitesmoke"
|
android:background="@color/whitesmoke"
|
||||||
@@ -11,8 +12,8 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:layout_marginTop="20dp"
|
android:layout_marginTop="20dp"
|
||||||
android:text="null"
|
android:text="设置"
|
||||||
android:textColor="#FFFFFF"
|
android:textColor="#363636"
|
||||||
android:textSize="20sp"
|
android:textSize="20sp"
|
||||||
android:visibility="gone" />
|
android:visibility="gone" />
|
||||||
|
|
||||||
@@ -23,62 +24,229 @@
|
|||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="10dp"
|
android:orientation="vertical">
|
||||||
android:gravity="center"
|
|
||||||
android:orientation="vertical"
|
<TextView
|
||||||
android:padding="10dp">
|
android:id="@+id/textView3"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="40dp"
|
||||||
|
android:layout_marginLeft="5dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:text="SIP设置"
|
||||||
|
android:textColor="#CCCCCC"
|
||||||
|
android:textSize="18sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="fill_parent"
|
||||||
|
android:layout_height="50dp"
|
||||||
|
android:background="#FFFFFF"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:visibility="visible">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="fill_parent"
|
||||||
|
android:layout_marginLeft="5dp"
|
||||||
|
android:layout_weight="0.5"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:text="分机号"
|
||||||
|
android:textColor="#000000"
|
||||||
|
android:textSize="18sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
<EditText
|
<EditText
|
||||||
android:id="@+id/username"
|
android:id="@+id/username"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="0dp"
|
||||||
android:layout_height="50sp"
|
android:layout_height="fill_parent"
|
||||||
android:layout_marginTop="10dp"
|
android:layout_weight="1.5"
|
||||||
android:background="@drawable/corners_black"
|
android:hint="请输入"
|
||||||
android:hint="账号"
|
android:singleLine="true"
|
||||||
android:padding="5dp"
|
android:textColor="#000000"
|
||||||
android:text="5503"
|
android:textSize="16sp" />
|
||||||
android:textColor="@color/blackcolor"
|
|
||||||
android:textColorHint="@color/gray"
|
</LinearLayout>
|
||||||
android:textSize="15sp" />
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
android:background="#FFFFFF"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:visibility="visible">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="fill_parent"
|
||||||
|
android:layout_marginLeft="5dp"
|
||||||
|
android:layout_weight="0.5"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:text="密码"
|
||||||
|
android:textColor="#000000"
|
||||||
|
android:textSize="18sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
<EditText
|
<EditText
|
||||||
android:id="@+id/userpw"
|
android:id="@+id/userpw"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="0dp"
|
||||||
android:layout_height="50sp"
|
android:layout_height="fill_parent"
|
||||||
android:layout_marginTop="10dp"
|
android:layout_weight="1.5"
|
||||||
android:background="@drawable/corners_black"
|
android:hint="请输入"
|
||||||
android:hint="密码"
|
android:singleLine="true"
|
||||||
android:padding="5dp"
|
android:textColor="#000000"
|
||||||
android:text="!@#123Qw"
|
android:textSize="16sp" />
|
||||||
android:textColor="@color/blackcolor"
|
|
||||||
android:textColorHint="@color/gray"
|
</LinearLayout>
|
||||||
android:textSize="15sp" />
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
android:background="#FFFFFF"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:visibility="visible">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="fill_parent"
|
||||||
|
android:layout_marginLeft="5dp"
|
||||||
|
android:layout_weight="0.5"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:text="SIP服务器"
|
||||||
|
android:textColor="#000000"
|
||||||
|
android:textSize="18sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
<EditText
|
<EditText
|
||||||
android:id="@+id/userip"
|
android:id="@+id/userip"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="0dp"
|
||||||
android:layout_height="50sp"
|
android:layout_height="fill_parent"
|
||||||
android:layout_marginTop="10dp"
|
android:layout_weight="1.5"
|
||||||
android:background="@drawable/corners_black"
|
android:hint="请输入"
|
||||||
android:hint="服务器地址"
|
android:singleLine="true"
|
||||||
android:padding="5dp"
|
android:textColor="#000000"
|
||||||
android:text="47.111.20.34"
|
android:textSize="16sp" />
|
||||||
android:textColor="@color/blackcolor"
|
|
||||||
android:textColorHint="@color/gray"
|
</LinearLayout>
|
||||||
android:textSize="15sp" />
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
android:background="#FFFFFF"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:visibility="visible">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="fill_parent"
|
||||||
|
android:layout_marginLeft="5dp"
|
||||||
|
android:layout_weight="0.5"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:text="SIP端口"
|
||||||
|
android:textColor="#000000"
|
||||||
|
android:textSize="18sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
<EditText
|
<EditText
|
||||||
android:id="@+id/userport"
|
android:id="@+id/userport"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="fill_parent"
|
||||||
|
android:layout_weight="1.5"
|
||||||
|
android:hint="请输入"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:textColor="#000000"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/textView4"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="40dp"
|
||||||
|
android:layout_marginLeft="5dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:text="服务器设置"
|
||||||
|
android:textColor="#CCCCCC"
|
||||||
|
android:textSize="18sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
android:background="#FFFFFF"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:visibility="visible">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="fill_parent"
|
||||||
|
android:layout_marginLeft="5dp"
|
||||||
|
android:layout_weight="0.5"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:text="服务器"
|
||||||
|
android:textColor="#000000"
|
||||||
|
android:textSize="18sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/http_host"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="fill_parent"
|
||||||
|
android:layout_weight="1.5"
|
||||||
|
android:hint="请输入"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:textColor="#000000"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="50sp"
|
android:layout_height="50dp"
|
||||||
android:layout_marginTop="10dp"
|
android:layout_marginTop="5dp"
|
||||||
android:background="@drawable/corners_black"
|
android:background="#FFFFFF"
|
||||||
android:hint="端口"
|
android:orientation="horizontal"
|
||||||
android:padding="5dp"
|
android:visibility="visible">
|
||||||
android:text="5060"
|
|
||||||
android:textColor="@color/blackcolor"
|
<TextView
|
||||||
android:textColorHint="@color/gray"
|
android:layout_width="0dp"
|
||||||
android:textSize="15sp" />
|
android:layout_height="fill_parent"
|
||||||
|
android:layout_marginLeft="5dp"
|
||||||
|
android:layout_weight="0.5"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:text="端口"
|
||||||
|
android:textColor="#000000"
|
||||||
|
android:textSize="18sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/http_port"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="fill_parent"
|
||||||
|
android:layout_weight="1.5"
|
||||||
|
android:hint="请输入"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:textColor="#000000"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/textView5"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="30dp"
|
||||||
|
android:layout_weight="1" />
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
@@ -86,7 +254,7 @@
|
|||||||
android:layout_margin="10dp"
|
android:layout_margin="10dp"
|
||||||
android:background="@drawable/callpad_bg"
|
android:background="@drawable/callpad_bg"
|
||||||
android:onClick="login"
|
android:onClick="login"
|
||||||
android:text="登录"
|
android:text="确定"
|
||||||
android:textColor="#FFFFFF"
|
android:textColor="#FFFFFF"
|
||||||
android:textSize="20sp" />
|
android:textSize="20sp" />
|
||||||
|
|
||||||
@@ -102,7 +270,8 @@
|
|||||||
android:textColor="#FFFFFF"
|
android:textColor="#FFFFFF"
|
||||||
android:textSize="20sp"
|
android:textSize="20sp"
|
||||||
android:visibility="invisible" />
|
android:visibility="invisible" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
|
|
||||||
</LinearLayout>
|
</RelativeLayout>
|
||||||
@@ -94,9 +94,33 @@
|
|||||||
android:layout_marginBottom="50dp"
|
android:layout_marginBottom="50dp"
|
||||||
android:background="@drawable/bt_bgd"
|
android:background="@drawable/bt_bgd"
|
||||||
android:onClick="logout"
|
android:onClick="logout"
|
||||||
android:text="退出"
|
android:text="设置"
|
||||||
android:textColor="#FFFFFF" />
|
android:textColor="#FFFFFF" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/imageViewSelfStatus"
|
||||||
|
android:layout_width="10dp"
|
||||||
|
android:layout_height="10dp"
|
||||||
|
android:layout_alignParentStart="true"
|
||||||
|
android:layout_alignParentBottom="true"
|
||||||
|
android:layout_marginStart="18dp"
|
||||||
|
android:layout_marginBottom="7dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
app:srcCompat="@drawable/circle"
|
||||||
|
app:tint="#5EE463" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/textViewSelfStatus"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentStart="true"
|
||||||
|
android:layout_alignParentBottom="true"
|
||||||
|
android:layout_marginStart="30dp"
|
||||||
|
android:layout_marginBottom="5dp"
|
||||||
|
android:text="在线"
|
||||||
|
android:textAlignment="textStart"
|
||||||
|
android:textSize="12sp" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/textViewSelfNum"
|
android:id="@+id/textViewSelfNum"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
@@ -105,7 +129,7 @@
|
|||||||
android:layout_alignParentStart="true"
|
android:layout_alignParentStart="true"
|
||||||
android:layout_alignParentBottom="true"
|
android:layout_alignParentBottom="true"
|
||||||
android:layout_marginEnd="5dp"
|
android:layout_marginEnd="5dp"
|
||||||
android:layout_marginBottom="20dp"
|
android:layout_marginBottom="24dp"
|
||||||
android:text="号码:xxxx"
|
android:text="号码:xxxx"
|
||||||
android:textAlignment="center"
|
android:textAlignment="center"
|
||||||
android:textSize="12sp" />
|
android:textSize="12sp" />
|
||||||
|
|||||||
@@ -78,6 +78,7 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
|
android:background="@drawable/qmui_divider"
|
||||||
android:onClick="exit"
|
android:onClick="exit"
|
||||||
android:text="取消"
|
android:text="取消"
|
||||||
android:textColor="@color/redcolor"
|
android:textColor="@color/redcolor"
|
||||||
@@ -88,8 +89,10 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
|
android:background="@drawable/callpad_bg"
|
||||||
android:onClick="createGroup"
|
android:onClick="createGroup"
|
||||||
android:text="创建分组" />
|
android:text="创建分组"
|
||||||
|
android:textColor="#FFFFFF" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|||||||
@@ -4,8 +4,7 @@
|
|||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:id="@+id/IncallMeetingRoot"
|
android:id="@+id/IncallMeetingRoot"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="fill_parent"
|
android:layout_height="fill_parent">
|
||||||
android:background="@drawable/callbackground">
|
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/imageView3"
|
android:id="@+id/imageView3"
|
||||||
@@ -94,8 +93,8 @@
|
|||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="fill_parent"
|
android:layout_height="fill_parent"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:background="@drawable/qmui_divider"
|
android:background="@drawable/bt_bgd"
|
||||||
android:src="@drawable/voice2"
|
android:src="@drawable/mute"
|
||||||
tools:visibility="visible" />
|
tools:visibility="visible" />
|
||||||
|
|
||||||
<ImageButton
|
<ImageButton
|
||||||
@@ -103,7 +102,7 @@
|
|||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="fill_parent"
|
android:layout_height="fill_parent"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:background="@drawable/qmui_divider"
|
android:background="@drawable/bt_bgd"
|
||||||
android:src="@drawable/unvideo"
|
android:src="@drawable/unvideo"
|
||||||
tools:visibility="visible" />
|
tools:visibility="visible" />
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user