1

I am trying to implement vidyo.io in my android app. Everything looks good but I am unable to figure out why camera/video does not start in my app.

So, after giving CAMERA,INTERNET permissions in android.manifest file,

I have my video.java file where I am trying to use vidyo.

This is where my video should get started:

 public void Start(View v) {

    Connector vc  = new Connector(videoFrame, Connector.ConnectorViewStyle.VIDYO_CONNECTORVIEWSTYLE_Default,
            5, "warning info","", 0);
    vc.showViewAt(videoFrame, 0, 0, videoFrame.getWidth(), videoFrame.getHeight());
   }

upon clicking start button, a preview framework opens but video does not start. How to fix this?

Phantômaxx
  • 37,901
  • 21
  • 84
  • 115
user
  • 1,681
  • 5
  • 18
  • 42

1 Answers1

0

Ok, I figured out that camera permissions need to be explicitly given in the app as--

 if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.M){
        if(checkSelfPermission(Manifest.permission.CAMERA) != PackageManager.PERMISSION_GRANTED){
            ActivityCompat.requestPermissions(this,new String[]{Manifest.permission.CAMERA},1);
user
  • 1,681
  • 5
  • 18
  • 42