Code example for SurfaceTexture

0
                                GL10.GL_TEXTURE_WRAP_S, GL10.GL_CLAMP_TO_EDGE);
                        GLES20.glTexParameteri(
                                GLES11Ext.GL_TEXTURE_EXTERNAL_OES,
                                GL10.GL_TEXTURE_WRAP_T, GL10.GL_CLAMP_TO_EDGE);
 
                        FlashDevice.surfaceTexture = new SurfaceTexture(textures[0]);
                        mCamera.setPreviewTexture(FlashDevice.surfaceTexture);
                        surfaceCreated = true;
                        mCamera.startPreview();
                    } 
                    mParams = mCamera.getParameters();
                    mParams.setFlashMode(Camera.Parameters.FLASH_MODE_TORCH);
                    mCamera.setParameters(mParams);
                    if (!mWakeLock.isHeld()) {  // only get the wakelock if we don't have it already
                        mWakeLock.acquire(); // we don't want to go to sleep while cam is up
                    } 
                } 
            } else { 
                // Devices with sysfs toggle and sysfs luminosity 
                if (mFlashDeviceLuminosity != null && mFlashDeviceLuminosity.length() > 0) {
Stop searching for code, let great code find you!  Add Codota to your java IDE