title: Android Error : Can't Connect to the Camara
body: <p>I want to open the default mobile camera on a button click. I have tried the following code:</p>
  
  <pre><code>  Camera=(Button)findViewById(R.id.CameraID);
    Camera.setOnClickListener(new OnClickListener() {
  
      @Override
      public void onClick(View v) {
          // TODO Auto-generated method stub
          Intent Intent3=new   Intent(MediaStore.INTENT_ACTION_STILL_IMAGE_CAMERA);
          startActivity(Intent3); 
      }
  });
  </code></pre>
  
  <p>I also added the following permission in the Android Manifest file:</p>
  
  <pre><code> &lt;uses-permission android:name="android.permission.CAMERA" /&gt;
   &lt;uses-feature android:name="android.hardware.camera" /&gt;
  </code></pre>
  
  <p>I still see an error when I click on the camera button. The camera is loading but immediately after that I get a message <strong>Can't connect to the camara</strong> on screen. </p>