Skip main navigation
We use cookies to give you a better experience, if that’s ok you can close this message and carry on browsing. For more info read our cookies policy.
We use cookies to give you a better experience. Carry on browsing if you're happy with this, or read our cookies policy for more information.

Securing Activities

Activities are started by calling startActivity() (or startActivityForResult() if a result is expected) with either an explicit or an implicit Intent.

To control which apps can start an Activity, add the appropriate permission using the android:permission attribute of the <activity> element in the app’s AndroidManifest.xml file.

<manifest >
  <application >
    <activity android:name="com.example.myamazingapp.SomeActivity"

Only apps that have requested (and been granted) that permission will then be able to start the Activity.

Share this article:

This article is from the free online course:

Secure Android App Development

University of Southampton

Contact FutureLearn for Support