|
@@ -26,6 +26,8 @@ import android.support.v7.app.AppCompatActivity;
|
26
|
26
|
|
27
|
27
|
import java.net.URL;
|
28
|
28
|
|
|
29
|
+import com.facebook.react.modules.core.DefaultHardwareBackBtnHandler;
|
|
30
|
+
|
29
|
31
|
/**
|
30
|
32
|
* Base Activity for applications integrating Jitsi Meet at a higher level. It
|
31
|
33
|
* contains all the required wiring between the <tt>JKConferenceView</tt> and
|
|
@@ -37,10 +39,13 @@ import java.net.URL;
|
37
|
39
|
* hooked to the React Native subsystem via proxy calls through the
|
38
|
40
|
* <tt>JKConferenceView</tt> static methods.
|
39
|
41
|
*/
|
40
|
|
-public class JitsiMeetActivity extends AppCompatActivity {
|
|
42
|
+public class JitsiMeetActivity
|
|
43
|
+ extends AppCompatActivity
|
|
44
|
+ implements DefaultHardwareBackBtnHandler {
|
|
45
|
+
|
41
|
46
|
/**
|
42
|
47
|
* The request code identifying requests for the permission to draw on top
|
43
|
|
- * of other apps. The value must be 16-bit and is arbitrarily chosen here.
|
|
48
|
+ * of other apps. The value must be 16-bit and is arbitrarily chosen here.
|
44
|
49
|
*/
|
45
|
50
|
private static final int OVERLAY_PERMISSION_REQUEST_CODE
|
46
|
51
|
= (int) (Math.random() * Short.MAX_VALUE);
|
|
@@ -128,6 +133,15 @@ public class JitsiMeetActivity extends AppCompatActivity {
|
128
|
133
|
}
|
129
|
134
|
}
|
130
|
135
|
|
|
136
|
+ /**
|
|
137
|
+ * This method is called if the JS part does not handle the physical back
|
|
138
|
+ * button press.
|
|
139
|
+ */
|
|
140
|
+ @Override
|
|
141
|
+ public void invokeDefaultOnBackPressed() {
|
|
142
|
+ super.onBackPressed();
|
|
143
|
+ }
|
|
144
|
+
|
131
|
145
|
/**
|
132
|
146
|
* {@inheritDoc}
|
133
|
147
|
*/
|
|
@@ -201,7 +215,7 @@ public class JitsiMeetActivity extends AppCompatActivity {
|
201
|
215
|
protected void onResume() {
|
202
|
216
|
super.onResume();
|
203
|
217
|
|
204
|
|
- JitsiMeetView.onHostResume(this);
|
|
218
|
+ JitsiMeetView.onHostResume(this, this);
|
205
|
219
|
}
|
206
|
220
|
|
207
|
221
|
/**
|