e> 7 5
 public class SessionPresenterImpl implements SessionContract.SessionPresenter ,SessionInteractor.SessionListener{
8 6
 
9
-    private Activity context;
10
-    private SessionContract.SessionView sessionView;
11 7
     private SessionInteractor interactor;
12 8
     private ArrayList<PhotoBean> photoList;
9
+    private SessionContract.SessionView sessionView;
13 10
 
14
-    public SessionPresenterImpl(Activity context, SessionContract.SessionView view){
15
-        this.context = context;
11
+    public SessionPresenterImpl(String sessionId, SessionContract.SessionView view){
16 12
         this.sessionView = view;
17 13
         photoList = new ArrayList<>();
18
-        interactor = new SessionInteractor(this);
14
+        interactor = new SessionInteractor(sessionId,this);
19 15
     }
20 16
 
21 17
     @Override
22 18
     public void start() {
23
-        interactor.startCapture();
19
+        interactor.startSession();
24 20
         if(photoList.size()==0){
25 21
             sessionView.showEmptyView();
26 22
         }else{
@@ -30,7 +26,17 @@ public class SessionPresenterImpl implements SessionContract.SessionPresenter ,S
30 26
 
31 27
     @Override
32 28
     public void stop() {
33
-        interactor.stopCapture();
29
+        interactor.endSession();
30
+    }
31
+
32
+    @Override
33
+    public void onSessionStartSuccess(String session) {
34
+
35
+    }
36
+
37
+    @Override
38
+    public void onSessionStartError(String session) {
39
+
34 40
     }
35 41
 
36 42
     @Override
@@ -38,4 +44,9 @@ public class SessionPresenterImpl implements SessionContract.SessionPresenter ,S
38 44
         sessionView.showPhotoRecyclerView();
39 45
         sessionView.addNewPhoto(bean);
40 46
     }
47
+
48
+    @Override
49
+    public void onSessionEnd(String session) {
50
+
51
+    }
41 52
 }

+ 1 - 0
app/src/main/java/ai/pai/lensman/upload/SessionBean.java

@@ -8,6 +8,7 @@ import ai.pai.lensman.session.PhotoBean;
8 8
 public class SessionBean implements Serializable{
9 9
 
10 10
     public int sessionSeq;
11
+    public String sessionId;
11 12
     public ArrayList<PhotoBean> sessionPhotos;
12 13
 
13 14
 }

kodo - Gogs: Go Git Service

Nav apraksta

huangqimin: 6d06194a0c SubscribeUserInfo 6 gadi atpakaļ
..
__init__.py 6d06194a0c SubscribeUserInfo 6 gadi atpakaļ