Can't use TextureView in Android

Hi all,

I’m developing a RA app using JMonkeyEngine. For phone < Android L, I’m using Camera API, and for other Camera2 API.

It works fine with Camera API. With Camera2 API, you have to use TextureView instead of SurfaceView.

In my case, no camera preview is displayed on screen…

Is TextureView compatible with JMonkeyEngine ?

Here a part of my code :

public class RAActivity extends AndroidHarness {

public void onCreate(Bundle savedInstanceState) {
    mTextureView = new TextureView(mActivity);
    ViewGroup.LayoutParams lp = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT);
    addContentView(mTextureView, lp);

public void onResume() {

    if (mTextureView.isAvailable()) {
        openCamera(mTextureView.getWidth(), mTextureView.getHeight());
    } else {

// [...]

Thank you for your help

Is someone can help me ?

have you tried getting the bitmap and putting it into a texture? Perhaps this method