Skip to content

Commit df00b7d

Browse files
committed
PApplet is not a fragment anymore
Signed-off-by: Umair Khan <[email protected]>
1 parent c6cc8ad commit df00b7d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/in/omerjerk/processing/video/android/Capture.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import java.util.ArrayList;
66
import java.util.List;
77

8+
import android.app.Activity;
89
import android.graphics.SurfaceTexture;
910
import android.hardware.Camera;
1011
import android.hardware.Camera.Size;
@@ -25,6 +26,8 @@ public class Capture extends PImage implements PConstants,
2526
CameraHandlerCallback, SurfaceTexture.OnFrameAvailableListener {
2627

2728
private static final boolean DEBUG = true;
29+
30+
private Activity activity;
2831

2932
public static void log(String log) {
3033
if (DEBUG)
@@ -89,7 +92,8 @@ public void run() {
8992
}
9093
});
9194
// pg.setCache(this, customTexture);
92-
parent.runOnUiThread(new Runnable() {
95+
activity = parent.getActivity();
96+
activity.runOnUiThread(new Runnable() {
9397
@Override
9498
public void run() {
9599
mCameraHandler = new CameraHandler(Capture.this);

0 commit comments

Comments
 (0)