liuzhenxing1118 hai 5 meses
pai
achega
b2e119ec33

+ 4 - 4
app/src/main/java/com/sikey/skphone/activity/BaseActionActivity.java

@@ -47,14 +47,14 @@ public class BaseActionActivity extends BaseActivity {
         finish();
     }
 
-    public void videoAction(String userId) {
-        Log.d(TAG, "videoAction: " + userId);
+    public void videoAction(String value) {
+        Log.d(TAG, "videoAction: " + value);
         String pkg = "com.sikey.skvideo";
         String cls = pkg + ".activity.MainActivity";
         ComponentName componet = new ComponentName(pkg, cls);
         Intent intent = new Intent();
-        intent.putExtra("ExtraVideoType", 1); //1:呼出 2:呼入
-        intent.putExtra("ExtraVideoTargetId", userId);
+        intent.putExtra(Constant.EXTRA_VIDEO_TYPE, 1); //1:呼出 2:呼入
+        intent.putExtra(Constant.INTENT_VIEW_VALUE, value);
         intent.setComponent(componet);
         startActivity(intent);
         finish();

+ 1 - 1
app/src/main/java/com/sikey/skphone/activity/CallActivity.java

@@ -62,7 +62,7 @@ public class CallActivity extends BaseActionActivity {
         }
 
         videoLayout.setOnClickListener(v -> {
-            videoAction(mContactModel.userId);
+            videoAction(mContactModel.id);
         });
         callLayout.setOnClickListener(v -> {
             if (mType == 0) {

+ 4 - 4
app/src/main/java/com/sikey/skphone/model/ContactBean.java

@@ -3,7 +3,6 @@ package com.sikey.skphone.model;
 public class ContactBean extends BaseModel {
     public long _id = 0;
     public String id = "";
-    public String userId = "";
     public String name = "";
     public String profile = ""; //头像
     public String profilePath = "";//头像本地路径
@@ -11,18 +10,19 @@ public class ContactBean extends BaseModel {
     public String countryPN = "";
     public int rate = 0;
     public int unRead = 0;
-    public int isVideo = 1; //是否支持视频通话
 
     // 1 : First guardian(SOS target)
     // 2 : Second guardian
     // 3 : General contact(Not member of XPLORA server)
     // 4 : Friend
     public int type = 0;
+    public int isVideo = 1; //是否支持视频通话
 
     public String beanToString() {
-        return "_id:" + _id + " id:" + id + " type:" + type + " userId:" + userId +
+        return "_id:" + _id + " id:" + id + " type:" + type +
                 " name:" + name + " profilePath:" + profilePath +
                 " countryPN:" + countryPN + " phoneNumber : " + phoneNumber +
-                " unRead:" + unRead;
+                " unRead:" + unRead +
+                " isVideo:" + isVideo;
     }
 }

+ 1 - 1
app/src/main/java/com/sikey/skphone/model/RecentBean.java

@@ -15,7 +15,7 @@ public class RecentBean extends BaseModel {
     //- 42 : income fail, not in contact
     //- 50 : The other party rejects the call (outgoing)
     //- 80 : Failed to outgoing due to other reasons (outgoing)
-    public int type = 1;
+    public int type = 0;
 
     public ContactBean contactBean = null;
 }

+ 2 - 0
app/src/main/java/com/sikey/skphone/utils/Constant.java

@@ -4,6 +4,8 @@ public class Constant {
     public static String PACKAGE_NAME = "com.sikey.skphone";
     public static String INTENT_VIEW_TYPE = "intent_view_type";
     public static String INTENT_VIEW_VALUE = "intent_view_value";
+    public final static String EXTRA_VIDEO_TYPE = "ExtraVideoType";
+    public final static String EXTRA_VIDEO_TARGET_ID = "ExtraVideoTargetId";
 
     public enum CellType {
         TITLE,