Problems accessing camera/mic/geolocation on Nexus 5

edited January 2016 in Android Mode

Hi there,

I'm having trouble accessing all the stuff that needs permission (Camera, Mic, Geolocation). What I do is just launching the examples included in android-processing. Everything launches as expected but for some reason the the cam/mic does not launch. In the cam example included (see below) for example I get the screen with the text on it, but nothing happens when i tap the screen. The necessary permissions are set.

Could this be a problem with my device?

Thanks a lot!

import ketai.camera.*;

KetaiCamera cam;

void setup() {
  orientation(LANDSCAPE);
  imageMode(CENTER);
  textSize(45);
}

void draw() {

  if(cam != null && cam.isStarted())
    image(cam, width/2, height/2, width, height);
  else
    {
      background(128);
      text("Waiting for camera....touch to activate", 100, height/2);
    }
}

void onCameraPreviewEvent()
{
  cam.read();
}

// start/stop camera preview by tapping the screen
void mousePressed()
{
  //HACK: Instantiate camera once we are in the sketch itself
  if(cam == null)
      cam = new KetaiCamera(this, 640, 480, 24);

  if (cam.isStarted())
  {
    cam.stop();
  }
  else
    cam.start();
}
void keyPressed() {
  if(cam == null)
    return;

  if (key == CODED) {
    if (keyCode == MENU) {
      if (cam.isFlashEnabled())
        cam.disableFlash();
      else
        cam.enableFlash();
    }
  }
}

Answers

Sign In or Register to comment.