title: Android permission for camera and Internet
body: <p>In Android, I remember that it was mandatory to request permission(s) to use the camera or to access the Internet in an app.</p>
  
  <p>But I did a small test in which I did not request any of the above permissions and I expected my test app to crash and burn.</p>
  
  <p>But this did not happen!!</p>
  
  <p>I was able to use the camera and access the Internet without requesting for permissions, and I've tested on 3 devices, all with different versions of Android.</p>
  
  <p>Here is the code:</p>
  
  <pre><code>public class MainActivity extends Activity implements View.OnClickListener
  {
      private int cameraCode = 0;
      private Button start_cam;
      private Button start_internet;
  
      @Override
      protected void onCreate(Bundle savedInstanceState)
      {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
  
          start_cam = (Button) findViewById(R.id.camera);
          start_internet = (Button) findViewById(R.id.internet);
  
          start_cam.setOnClickListener(this);
          start_internet.setOnClickListener(this);
      }
  
      @Override
      public void onClick(View v)
      {
          switch(v.getId())
          {
              case R.id.camera:
                  Intent intent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
                  startActivityForResult(intent, cameraCode);
                  break;
              case R.id.internet:
                  Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("http://www.imdb.com"));
                  startActivity(browserIntent);
                  break;
          }
      }
  }
  </code></pre>
  
  <p>the manifest:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="com.permissions.linux.android"&gt;
  
      &lt;uses-sdk
          android:minSdkVersion="10"
          android:targetSdkVersion="16" /&gt;
  
      &lt;application
          android:icon="@mipmap/ic_launcher"
          android:label="@string/app_name"&gt;
  
          &lt;activity
              android:name="com.permissions.linux.androi.android.MainActivity"
              android:label="@string/app_name"&gt;
              &lt;intent-filter&gt;
                  &lt;action android:name="android.intent.action.MAIN" /&gt;
                  &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
              &lt;/intent-filter&gt;
          &lt;/activity&gt;
  
  
      &lt;/application&gt;
  
  &lt;/manifest&gt;
  </code></pre>
  
  <p>The question is, why didn't it crash?</p>