Skip to content
This repository has been archived by the owner on Mar 2, 2018. It is now read-only.

connectOnFrameAvailable fails to connectSurface #111

Open
sjfricke opened this issue Jul 10, 2017 · 1 comment
Open

connectOnFrameAvailable fails to connectSurface #111

sjfricke opened this issue Jul 10, 2017 · 1 comment

Comments

@sjfricke
Copy link

I have spent a lot of time making sure my example is exactly as that of hello_video and I keep getting

TangoErrorType TangoService_connectOnFrameAvailable(TangoCameraId, void*, void (*)(void*, TangoCameraId, const TangoImageBuffer*)): Done connecting callbacks.
...
interface E/tango_client_api: TangoErrorType TangoService_connect(void*, TangoConfig): Internal error: Failed to connectSurface, cam id: 0.

While what it SHOULD be is

I/tango_client_api: TangoErrorType TangoService_connectOnFrameAvailable(TangoCameraId, void*, void (*)(void*, TangoCameraId, const TangoImageBuffer*)) called for cam id(0) before TangoService_connect(). Callback will be registered on next call to TangoService_connect().
...
I/tango_client_api: TangoErrorType TangoService_connect(void*, TangoConfig): Successfully connected to Tango.
@sjfricke
Copy link
Author

sjfricke commented Jul 10, 2017

I found if I manually run adb shell am grant com.my.app.package android.permission.CAMERA it works, but not sure why this isn't automatic

Other option is to add

private static final int MY_CAMERA_REQUEST_CODE = 100;

if (checkSelfPermission(Manifest.permission.CAMERA) != PackageManager.PERMISSION_GRANTED)
{
  requestPermissions(new String[]{Manifest.permission.CAMERA}, MY_CAMERA_REQUEST_CODE);
}

to the samples

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant